Reputation: 825
Even after a reboot, the service is still there, even though the executable file is gone. I'm using WIX version 3.0.5419.0
<Component Id="IdiomServer.exe" Guid="7a751e1e-5e9e-41d2-be60-dc905ab1ccad">
<File Id="IdiomServer.exe" Source="$(var.IdiomServer.TargetDir)IdiomServer.exe" KeyPath="yes" />
<ServiceInstall Id="IdiomServer_Service" Name="IdiomServer 4.0" Account="LocalSystem" Description="Idiom Repository Server" ErrorControl="normal" Start="auto" Type="ownProcess" Vital="yes" />
<ServiceControl Id="IdiomServer_Service" Name="IdiomServer 4.0" Remove="uninstall" Stop="uninstall" Wait="yes" />
</Component>
Installing the Windows Service works fine. Uninstalling it appears to do nothing. Section of the log file from the uninstall:
MSI (s) (D8:5C) [09:43:58:033]: Doing action: StopServices
MSI (s) (D8:5C) [09:43:58:033]: Note: 1: 2205 2: 3: ActionText
Action start 9:43:58: StopServices.
Action ended 9:43:58: StopServices. Return value 1.
MSI (s) (D8:5C) [09:43:58:033]: Doing action: DeleteServices
MSI (s) (D8:5C) [09:43:58:033]: Note: 1: 2205 2: 3: ActionText
Action start 9:43:58: DeleteServices.
Action ended 9:43:58: DeleteServices. Return value 1.
Any help would be much appreciated.
Upvotes: 27
Views: 20235
Reputation: 1
I had a similar issue. Ie uninstalling removed everyhing BUT the entry in the services list (Win 7 - local admin). First I installed from a network share and that was when the uninstall didn't complete. When copying the installation program to a local disk before installing, then the uninstall worked just great!
Upvotes: 0
Reputation: 42136
If changing the component guid worked, I'd suspect that the issue might relate to an erronous SharedDLL ref counter in the registry at : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls
These are legacy style reference counters that MSI can increment (if asked to) - and they will override the MSI's own reference counting. For some dumb reason Installshield increments the legacy ref count for all files (whether they are versioned or not), and this frequently makes for mysterious "stray files on uninstall" occurring on development pcs. The same can occur in Wix if you enable the shared dll ref count and in rare cases the ref count can get corrupted during major upgrades.
Upvotes: 1
Reputation: 51
I had the same issue of the service not deleting. I had copied the Component, Service Install and ServiceControl elements from another project without changing the Guid or IDs. After updating with new GUID and IDs the service now deletes.
Upvotes: 5
Reputation: 1150
I also had a similar problem. In my case, I just had to make sure that both ServiceInstall and ServiceControl's "Name" attributes are the same, and the problem went away.
Upvotes: 14
Reputation: 181
I had a similar problem to that described by Rupert. In my case the service was not uninstalled from the Service Control Manager and the .exe was also left behind. After much digging the answer was pretty straightforward. In the containing <Component> element the GUID attribute was set to "" (i.e. empty string). Replacing with <Component ... GUID="56CD2588-B976-4198-B815-FAB7E1E57CD7" > resolved the problem
Upvotes: 2
Reputation: 3753
I have an almost identical installer that works fine. The only differences are that my ServiceControl element has a different Id to the ServiceInstall element, and a 'Start="install"' property too.
I suspect your problem is either the Id of the ServiceControl element, or you have a stray service hanging around.
Try the following:
Upvotes: 16