cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sirsergio
Level 2

Can't have my windows service uninstalled!

This is InstallScript MSI project. I've got .NET Window Service to install and start on installation and stop and uninstall on uninstallation. I can easily do first part for installation but on uninstallation my service remains in service list as well as service file on a disk.

I tried to use InstallUtils but it works for admin user, but my requirement is the install/uninstall should be done by regular users.

Is there any solution?:confused:
Labels (1)
0 Kudos
(4) Replies
skolte
Level 7

This is how I have mine and it installs/uninstalls just the way it is supposed to. Not sure why it won't work in your case. In my case, the installShield component for the service has only one file, the exe for the service, all other files (such as config / dependent assemblies etc) are in a separate component, not sure if that matters.

0 Kudos
lvloss
Level 2

I'm having the same exact problem. I also have my events set up the same way you do as well. The only thing my installer does in install the Windows Service and it should uninstall when the user wants.

What's happening during the uninstall is that it will remove all asscociated .dlls except the service host .exe. Windows will say that the service has been uninstalled but when I go to Admin tools->Services it shows my service is still there.

Did you ever get to the solution for your problem? if so can you enlighten me? Can anyone else?

Thanks
0 Kudos
skolte
Level 7

If windows is saying service has been uninstalled, and the service pane is still showing the service still running, can you close it and relaunch it to confirm that it is indeed there? I ran into an issue where it would keep showing up in the service pane, I realized later that service pane doesn't get refreshed.

Also, make sure you set 'Yes' to stop the service on uninstall as shown in my earlier screenshot.
0 Kudos
hidenori
Level 17

I would also suggest that you make sure that all of the components associated with the service are getting uninstalled during the uninstallation by generating a Window Installer verbose log.

(To log it, try using Setup.exe /v"/l*v c:\test.log" at the command line.)
0 Kudos