How to Install Windows Services

Service applications on Windows can run in the background and not interfere with the user interface, making them ideal for anyone who wants programs that work in the background. This wikiHow teaches you how to install a .NET service on any...
Method 1 of 2:

Using the Visual Studio Prompt

  1. How to Install Windows Services Picture 1How to Install Windows Services Picture 1
    Open the Start
    How to Install Windows Services Picture 2How to Install Windows Services Picture 2
    menu and select Visual Studio version. The version number will vary. This opens a list of all Visual Studio tools.
  2. How to Install Windows Services Picture 3How to Install Windows Services Picture 3
    Click Developer Command Prompt for VS version. This opens the Visual Studio command prompt.
  3. How to Install Windows Services Picture 4How to Install Windows Services Picture 4
    Navigate to the directory where your service is compiled. You can use the cd command to change directories. If there are spaces in the path to the directory, you'll need to surround the entire path with quote marks. Example:
    1. cd "C:Program FilesMicrosoft Visual Studio 10.0binDebug".[1]
  4. How to Install Windows Services Picture 5How to Install Windows Services Picture 5
    Type installutil servicename.exe and press Enter. Replace servicename with the name of your service file. This installs the service on your PC.
    1. To check that your service is running, pressing Ctrl+Alt+Del, click Task Manager, and then click the Services tab. If you don't see a Services tab, click More details at the bottom-left corner and it should appear.
    2. If you get an error that Visual Studio cannot find instantly, it might be because your paths are not set correctly. You may need to enter the full path to the installutil to run it. It's usually something like C:WINDOWSMicrosoft.NETFramework64v(version number)InstallUtil.exe.[2]
    3. To uninstall the service, use installutil /u servicename.exe.
Method 2 of 2:

Using the Windows Command Prompt

  1. How to Install Windows Services Picture 6How to Install Windows Services Picture 6
    Right-click the Start
    How to Install Windows Services Picture 7How to Install Windows Services Picture 7
    menu. It's usually at the bottom-left corner of the screen.
  2. How to Install Windows Services Picture 8How to Install Windows Services Picture 8
    Click Command Prompt (Admin) or Windows PowerShell (Admin). One of these two options should be near the center of the menu. This opens an admin-level command prompt.
    1. You may have to click Yes to confirm.
    2. Make sure you know the full path to the service you want to install before you continue.
  3. How to Install Windows Services Picture 9How to Install Windows Services Picture 9
    Type sc.exe create NameOfService binpath= "fullpathtoservice.exe". Replace NameofService with the name you want to give the service, and fullpathtoservice.exe with the full path to the executable.
    1. There is a space between binpath= and "fullpathtoservice.exe".
    2. If you need to pass any options/arguments when running the executable, add optionname="value" to the end, replacing value with what's necessary.
  4. How to Install Windows Services Picture 10How to Install Windows Services Picture 10
    Press Enter to install the service. To check that your service is running, pressing Ctrl+Alt+Del, click Task Manager, and then click the Services tab. If you don't see a Services tab, click More details at the bottom-left corner and it should appear.
4.5 ★ | 2 Vote