I've got a setup project for a Windows Service (.net 3.5, visual studio 2008).
The Windows Service needs to be run under the Administrator account, does anyone know how I can get the Setup Project to set the "user to log on as" setting for the windows service as part of the setup process?
At the moment I have to manually right click on the service and set it to log on as the administrator everytime I update the service.
Thanks!
You should be able to add a new ServiceProcessInstaller in the InitializeComponent() method of your installer. This class will allow you to set account type, username, and password that you want the service to run as. For example:
If you don't want to hardcode a password into your setup project, then leave it blank and a popup dialog should appear asking for this during install.