I need to use InstallUtil to install a C# windows service. I need to set the service logon credentials (username and password). All of this needs to be done silently.
Is there are way to do something like this:
installutil.exe myservice.exe /customarg1=username /customarg2=password
A much easier way than the posts above and with no extra code in your installer is to use the following:
installUtil.exe /username=domain\username /password=password /unattended C:\My.exe
Just ensure the account you use is valid. If not you will receive a "No mapping between account names and security id's was done" exception