I have a Visual Studio Setup Project used to install a Windows service. The service is set to run automatically and it is installing fine at this point by adding my service as a custom action. However, I would like the installer to start the service once the installation is complete. Is this possible?
On a related note, do I need to manually stop the service on uninstalls and/or upgrades?
You can use a custom action too, for starting/stopping the service. From your custom action you just need to call the following utility: http://technet.microsoft.com/en-us/library/cc736564(v=ws.10).aspx
Yes, for upgrades/uninstalls you should stop the service before the files are removed, so you avoid a “Files in Use” prompt from the OS.