There are usually two tools for installing Windows service
The Installutil.exe tool under the 1.Framework directory.
2.visual Studio Command-line tools
What I want to say here is that when we use systems that are 64-bit, the framework contains 1.0,2.0,3.0,3.5,4.0 and their 64-bit versions.
First, the use of Installutil.exe
x86-based 4.0 applications created using Visual Studio 2010, using the When the Installutil.exe tool is installed, you will find a lot of Installutil.exe in the Microsoft.NET directory, including x86 and x64 tools for different versions of the framework, which of course use the 32-bit version of the 4.0 Installutil.exe tool, Generally in C:\Windows\Microsoft.NET\Framework64\v4.0.30319 this directory.
Commands to install and uninstall programs using this tool
1. Install. Under command line, go to C:\Windows\Microsoft.NET\Framework\v4.0.30319 directory, Installutil.exe application path, such as my f disk has a ServiceTest.exe program. The command is: installutil.exe "F:\ServiceTest.exe" (Specified to EXE, that is, the XML Configuration File)
2.Uninstall. The download only needs to precede the application name with/U. For example:installutil.exe/u "F:\ServiceTest.exe"
Ii. using Visual Studio command-line tools
Using the Visual Studio 2010 command-line tool is simple, under 64-bit systems, Visual Studio 2010 provides two tools for Visual Studio Command Prompt (2010) and Visual Studio x64 Win64 Command Prompt
The first one installs the uninstall x86 program and the second installs the uninstall x64 program.
But the commands are slightly different, still with the above F:\ServiceTest.exe as an example, open Visual Studio Command Prompt (2010).
1. Install. InstallUtil "F:\ServiceTest.exe"
2. Uninstall. installutil "F:\ServiceTest.exe"/u
Installing and uninstalling Windows programs