0
votes

We install a windows service from a custom action as described here: CodeProject

Every so often, when uninstalling our application, it does not properly uninstall the service. Instead it "marks the service for deletion".

You can see this message by running installutil.exe /u on our executable, when it is supposedly uninstalled.

Has anyone seen this issue or know a workaround? If a service is somehow installed with the same name as ours, we'd like to replace it. Instead the msi setup fails, giving a message saying our service is already installed.

Is there a way to do it without making a custom action to first uninstall any existing instances of our service's name before running the install custom action?

2

2 Answers

3
votes

Is the service control panel (services.msc) open while you uninstall? This prevents your service from correctly being uninstalled.

If nothing else helps a reboot might be required as recommended in this article (though originally applying to .NET 1.1).

0
votes

Check, if your service correctly stops additional thread(s) started from the service.