C# Windows Service installutil.exe

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#?
 
W

Willy Denoyette [MVP]

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.
 
K

Ken Kolda

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top