How to install and uninstall Windows services

Source: Internet
Author: User

Installation

Create the "install. bat" file and open the file with Notepad with the contents

C:\windows\microsoft.net\framework\v4.0.30319\InstallUtil.exe E:\program\vs2010\Test\TestWindowsService1\bin\ Debug\testwindowsservice1.exe

Save the file. The first half of the content is the service installer path for. NET4 (if other versions are developed, select the path of the appropriate version), and the second half is the service program path to be installed.

You can simply double-click the "Install. bat" file when you install it, and you'll see this service in the list of services.

Unloading

Create the Uninstall. bat file and open the file with Notepad with the contents

SC Delete TestService1

Save the file. Where TestService1 is the name of the service and is set at development time, not necessarily the same as the program name.

When uninstalling, simply double-click on the "Uninstall. Bat" file to run, at which point the service is no longer present in the list of services.

How to install and uninstall Windows services

Related Article

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.