C# Windows Service installutil.exe

  • Thread starter Thread starter Trevor
  • Start date Start date
T

Trevor

Is "intstallutil.exe" (the program to install/uninstall a C# service)
included with the .NET Runtime? Will an end user who does not have
Visual Studio .NET installed still be able to execute "installutil.exe"
from the command line if only the .NET Runtime is installed? Are there
any other methods of installing a Windows Service written in C#?
 
Trevor said:
Is "intstallutil.exe" (the program to install/uninstall a C# service)
included with the .NET Runtime?

Yes, it's part of the runtime.

Willy.
 
You can also invoke the installutil through an undocumented class named
ManagedInstallerClass, e.g.

System.Configuration.Install.ManagedInstallerClass.InstallHelper(new
string[] { yourServiceExePath });

Similarly, you would uninstall your service as follows:

System.Configuration.Install.ManagedInstallerClass.InstallHelper(new
string[] { "/u", yourServiceExePath });

Ken
 
Back
Top