How to Install Windows Service via Command Line?

How to Install Windows Service via Command Line?

Here is How To Install Windows Service via Command-Line with the simple instructions provided on this page. You will need the .net framework which will provide a command-line installer utility for installing services on the Windows system. You can use installutil.exe to install Windows service via the command line. You can get the .net 4 framework under C:\Windows\Microsoft.NET\Framework\v4.0.30319 directory.

How To Install Windows Service Via Command Line?

First of all, go to the directory where the .net framework is located and then run installutil.exe

cd "C:\Windows\Microsoft.NET\Framework\v4.0.30319\"
c:\> installutil.exe "C:\Users\Rahul\WindowsService\bin\Debug\WindowsService.exe"

If the system asks for further authentication then input the username and password. Remember the

username Admin should start with “.\” as shown in the screen below.

install windows service via command line

To Uninstall Windows Service

To Uninstall the Windows service use the “-u” option with the same command as installation. The command for uninstallation should look like below:

c:\> cd "C:\Windows\Microsoft.NET\Framework\v4.0.30319\"
c:\> installutil.exe -u "C:\Users\Rahul\WindowsService\bin\Debug\WindowsService.exe"

Read also:

Leave a Reply

Your email address will not be published. Required fields are marked *

How To Change Language in Huawei nova 8 Pro 5G?