# How to: Install and uninstall Windows services

If you’re developing a Windows service with the .NET Framework, you can quickly install your service app by using the InstallUtil.exe command-line utility. Developers who want to release a Windows service that users can install and uninstall should use InstallShield. For more information, see Create an installer package (Windows client).

Warning

If you want to uninstall a service from your computer, don’t follow the steps in this article. Instead, find out which program or software package installed the service, and then choose Apps in Settings to uninstall that program. Note that many services are integral parts of Windows; if you remove them, you might cause system instability.

You can't run Windows service projects directly from the Visual Studio development environment by pressing F5. Before you can run the project, you must install the service in the project.

Tip

1. From the Start menu, select the Visual Studio <version> directory, then select Developer Command Prompt for VS <version>.

The Developer Command Prompt for Visual Studio appears.

2. Access the directory where your project's compiled executable file is located.

3. Run InstallUtil.exe from the command prompt with your project's executable as a parameter:

installutil <yourproject>.exe


If you’re using the Developer Command Prompt for Visual Studio, 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[64]\<framework_version>.

For example:

• For the 32-bit version of the .NET Framework 4 or 4.5 and later, if your Windows installation directory is C:\Windows, the default path is C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe.
• 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.

installutil /u <yourproject>.exe