C# – Prompting username password while installing the windows service in c#

cwindows-services

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?

Best Answer

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.