Installing and uninstalling Services

Source: Internet
Author: User

Unlike most projects created in Visual Studio, Windows service projects cannot be run directly from the development environment by pressing F5. This is because the project cannot run until the service in the project has to be installed.

By using a command-line utility named InstallUtil.exe, you can quickly install a service application. You can also create a setup project that contains the output of your project and use it to create a custom action that runs the Setup program associated with the project and installs the service. For an example, see Walkthrough: Creating a Windows Service application in the Component Designer. For more information about installation projects, see installation Projects. For more information about custom actions, see Walkthrough: Creating a Custom action. Manual Installation Services

Access the directory where the compiled executable files in the project reside.

Run InstallUtil.exe from the command line with the output of the project as an argument. Enter the following code on the command line: Copy

InstallUtil Yourproject.exe
Manual Uninstall Service

Run InstallUtil.exe from the command line with the output of the project as an argument. Enter the following code on the command line: Copy

Installutil/u Yourproject.exe
Tips:

You can start Server Explorer, and then verify that the service is installed or uninstalled. For more information, see How to: Access and Initialize Server Explorer/Database Explorer.

Please see task How to: Create a Windows Service How to: Add an installer to a service application how to: Configure Installation Components How to: Override default methods on installation components Walkthrough: Creating a Windows Service application in the Component Designer Walkthrough: Creating a Custom action

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.