Install/Uninstall & Start/stop for Windows services through batch processing

Source: Internet
Author: User

Installation Services

1 @echo off2 3 Setchecked=24 Setpaths=%~sdp05 6 EchoPress any key to perform the installation ...?7 Pause>nul8 if%checked% EQU 2 (9%paths%installutil.exe%paths%windowsservice1.exe 2>&1Ten)Else EchoThe net Framework is not installed - Pause>nul

Uninstall Service

1 @echo off2 3 Setchecked=24 Setpaths=%~sdp05 6 EchoPress any key to perform the uninstallation ...7 Pause>nul8 if%checked% EQU 2 (9%paths%installutil.exe/u%paths%windowsservice1.exe 2>&1Ten)Else EchoUninstall failed One  A Pause>nul

Start the service

1 @echo off 2 Net start service name    2>&13pause>nul

Stop Service

1 @echo off 2 Net
3 Pause>nul

Install/Uninstall & Start/stop for Windows services through batch processing

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.