Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing a .NET service using InstallUtil

I'm trying to install a .NET service I wrote. As recommended by MSDN, I'm using InstallUtil. But I have missed how I can set the default service user on the command-line or even in the service itself. Now, when InstallUtil is run, it will display a dialog asking the user for the credentials for a user. I'm trying to integrate the service installation into a larger install and need the service installation to remain silent.

like image 581
Karim Avatar asked Aug 28 '08 13:08

Karim


People also ask

What is the use of InstallUtil exe?

Installutil.exe detects and executes these installer components. You can specify multiple assemblies on the same command line. Any option that occurs before an assembly name applies to that assembly's installation. Except for /u and /AssemblyName , options are cumulative but overridable.

How do I remove a service using InstallUtil exe?

Uninstall using InstallUtil.exe utilityFrom the Start menu, select the Visual Studio <version> directory, then select Developer Command Prompt for VS <version>. The Developer Command Prompt for Visual Studio appears. After the executable for a service is deleted, the service might still be present in the registry.


1 Answers

I think I may have found it. In the service itself, the automatically created ServiceProcessInstaller component has a property "Account" which can be set to "LocalService", "LocalSystem", "NetworkService" or "User". It was defaulting to "User" which must have displayed the prompt.

like image 157
Karim Avatar answered Sep 24 '22 15:09

Karim