Windows service Setup project

  • Thread starter Thread starter mr_super_genius
  • Start date Start date
M

mr_super_genius

Guest
Hi Guys

I have created a windows service which is working fine. I used the installutil to install and uninstall the service and everything seems to be working in order.

I then created a setup project with some custom actions (to update some values in the app.config file) and built the project. The step worked fine as well and I could see whatever values I entered in the setup were updated in the app.config file and the service installed without any error. I ran the service and it looked fine.

The only thing that is not working for me at the moment is the uninstall feature. When I tried uninstalling the service using the setup, it seemed to have finished successfully and removed all files from the folder but I could still see the service in the services console. I had to delete it using "sc DELETE servicename" command but I don't want to do that. I want the setup project to uninstall it automatically. If installutil can uninstall it, why isn't the setup project doing it? Is there something I need to add?

Any help would be much appreciated.

I am using Visual Studio 2019

Continue reading...
 
Back
Top