In this article, you can learn how to Install and Uninstall Windows Service using the InstallUtil.exe utility. InstallUtil.exe is the command-line utility that is available in the .NET framework installation folder.
Install and Uninstall Windows Service using InstallUtil.exe:
The windows service applications created using .NET Framework use the command line utility InstallUtil.exe to install and uninstall the services. This tool is usually available under the Microsoft .NET framework installation path. It can vary the version number.
How to Install Windows services using command line?
To install the .NET service, you need to run the below command by using command-prompt by specifying the full path of the .NET service application.
How to UnInstall Windows services using command line?
To Uninstall the .NET service, you need to run the below command by using command-prompt by specifying the full path of the .NET service application.
You can also run InstallUtil.exe directly by using the Visual Studio Developer Command Prompt. In this case, InstallUtil.exe should be on the system path. Otherwise, you can add it to the path or use the fully qualified path to invoke it. This tool is installed with the .NET Framework in %WINDIR%\Microsoft.NET\Framework\
For the 32-bit version of the .NET Framework 4 or 4.5 and later, the default path is C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe.
Also, for the 64-bit version of the .NET Framework 4 or 4.5 and later, the default path is C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe.
Note: The v4.0.30319 is the framework version.
– Article ends here –