Q:

Windows service not getting installed on major upgrade-WIX

I have my service installed on the machine by an msi package(WIX). But when an major upgrade is done,service gets uninstalled but it doesnt get installed.
This is my code:
 <Component Id="abc" Guid="{E64A8CDD-816F-4544-9ACD-A2E367F7758A}">
              <File Id="EventTraceService.exe" Source="..\..\..\..\Products\abc.exe"  Vital="yes" KeyPath ="yes"/>
              <File Source="..\..\..\..\Products\abc.exe.config" Vital="yes" />
              <ServiceInstall
              Id="ServiceInstaller"
              Type="ownProcess"
              Vital="yes" 
              Name="abc"
              DisplayName="abc"
              Description="Monitoring and management of Trace"
              Start="auto"
              Account="LocalSystem"
              Interactive="yes"
              ErrorControl="normal"
                  />
<ServiceControl Id="StartService" Start="install" Stop="uninstall" Remove="uninstall" Name="abc" Wait="yes" />

Thanks in advance!

A:

One possible explanation is that you changed the GUID of the component. As a result, (the different versions of) the same resources are being managed by different components.
From the windows installer documentation about what happens when the component rules are broken:

An author includes the same resource in two different components.
If two components have a resource under the same name and location and both components are installed into the same folder, then the removal of either component removes the common resource, which damages the remaining component.

Uninstalling either component removes the resource and breaks the other component.
The component reference-counting mechanism is damaged.

This seems to match your symptom.

