I am being prompted for user name and password while installing my windows service created in c#. I used the installutil tool to install my service. What is the reason for asking the user name password credentials?
In case you need the same service running on the same host but with different configuration, logically you would use same code just copy the service folder with different configuration and use installutil to install service with a different name.
If you do not want your windows service to prompt for Username/Password, go to Installer Class(Design Mode)
of the service, then right click on ServiceProcessInstaller -> Properties
; set Account
as Local Service
.
Now use the installutil
command. It will not ask for Username/Password.
Right click ServiceProcessInstaller file - > go to properties - > Choose account as LocalService.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With