I am currently adding a deployment project to my C# solution which installs a windows service and I have been trying to find a property that will make the installer prompt the user to reboot the system once installation has completed. I would prefer to simply set a property rather than create a small application that I run at the end of the install. if there is any code to restart then where i'll use this code in installer class or elsewhere?
+3
A:
If you use a MSI-based installer (which would be the case if you're using a VS setup project), setting REBOOT=Force should do the trick.
Under normal circumstances, though, the installer will itself detect if a reboot is needed: if you're not currently getting a reboot prompt, that's a good indication your service should work just fine without that reboot.
You may be able to extend your setup logic to start the service after installing it (and also to launch any auto-start GUI components if required). That's much friendlier than forcing a reboot, and you'll do your bit to help Windows get rid of its "you moved your mouse, please reboot" image problem...
mdb
2010-05-03 05:41:25