Export (0) Print
Expand All
10 out of 30 rated this helpful - Rate this topic

How to: Install and Uninstall Services

You can quickly install your service application by using a command-line utility called InstallUtil.exe.

Unlike most projects you create inVisual Studio, Windows Service projects cannot be run directly from the development environment by pressing F5. This is because the service in the project must be installed before the project can run.

To install your service manually

  1. On the Windows Start menu, choose Visual Studio 2010, Visual Studio Tools, Visual Studio Command Prompt (2010).

    A Visual Studiocommand prompt appears.

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

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

    installutil yourproject.exe
    

To uninstall your service manually

  • On the Windows Start menu, choose Visual Studio 2010, Visual Studio Tools, Visual Studio Command Prompt (2010).

    A Visual Studiocommand prompt appears.

  • Run InstallUtil.exe from the command prompt with your project's output as a parameter. Enter the following command:

    installutil /u yourproject.exe
    
    TipTip

    You can launch Server Explorer and verify that your service has been installed or uninstalled. For more information, see How to: Access and Initialize Server Explorer/Database Explorer.

Show:
© 2014 Microsoft. All rights reserved.