How to Install or Uninstall Services in Windows

Here is how you can Install or Uninstall Services in Windows using Command Prompt

Windows, being a general-purpose operating system, provides a host of different APIs for implementing your programs as you see ideal. In Windows NT operating systems, Microsoft has introduced an API called a Windows Service. This API allows any application that to register itself as a Windows Service, allowing a computer program to operate in the background as long as it obeys the interface rules and protocols of the Service Control Manager. Theoretically, it is quite similar to how daemons in Unix.

Any Windows Application that is implemented with the services API and is capable of handling low-level tasks with very little or no user interaction can be called a Windows Service. Unlike other programs that comes with their wizards and installation setups, a Service is usually installed using the Windows Command Prompt using Microsoft’s InstallUtil.exe tool, that come packed with the .NET Framework.

If you’ve downloaded the .NET Framework, you can proceed with the service installation. Here is how you can do it,

Install a Windows Service Manually with InstallUtil.exe

  1. Find the path in your Windows directory where your InstallUtil.exe utility is placed. Usually, it is placed in the following path,
    • 32-Bit: If the service you are installing is 32-bit, then if your Windows installation directory is C:\Windows, the default path is C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe.
      You can navigate to C:\Windows\Microsoft.NET\Framework\ to find out which version of the Framework you are using.
    • 64-Bit: If the service you are installing is 64-bit, then if your Windows installation directory is C:\Windows, the default path is C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe.
      You can navigate to C:\Windows\Microsoft.NET\Framework\ to find out which version of the Framework you are using.
  2. Once you have confirmed the path, you can proceed with the installation by opening an elevated command prompt. You can do it by searching for Command Prompt in Windows Search, then right-clicking it and then selecting Run as Administrator. This will give you admin access for running terminal commands.
  3. Now, enter the following command,
    “<path of 32-bit service>” -i  “<path of 32-bit service executable>”
    or
    “<path of 64-bit service>” -i  “<path of 64-bit service executable>”
    For example, see the screenshot attached below.
  4. That’s it. To verify if the service has been installed, you can open the Services Manager by searching for Services using Windows Search, and check if the service you just installed is visible over there.

Uninstall a Windows Service Manually with InstallUtil.exe

  1. Find the path in your Windows directory where your InstallUtil.exe utility is placed. Usually, it is placed in the following path,
    • 32-Bit: If the service you are installing is 32-bit, then if your Windows installation directory is C:\Windows, the default path is C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe.
      You can navigate to C:\Windows\Microsoft.NET\Framework\ to find out which version of the Framework you are using.
    • 64-Bit: If the service you are installing is 64-bit, then if your Windows installation directory is C:\Windows, the default path is C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe.
      You can navigate to C:\Windows\Microsoft.NET\Framework\ to find out which version of the Framework you are using.
  2. Once you have confirmed the path, you can proceed with the installation by opening an elevated command prompt. You can do it by searching for Command Prompt in Windows Search, then right-clicking it and then selecting Run as Administrator. This will give you admin access for running terminal commands.
  3. Now, enter the following command,
    “<path of 32-bit service>” /u  “<path of 32-bit service executable>”
    or
    “<path of 64-bit service>” /u  “<path of 64-bit service executable>”
    For example, see the screenshot attached below.
  4. That’s it. To verify if the service has been installed, you can open the Services Manager by searching for Services using Windows Search, and check if the service you just installed is visible over there.