Use batch processing to start stop service under Windows

Source: Internet
Author: User
There are more and more software and services running on the system, but the memory is limited, which causes the computer to become more and more slow. As a developer, it is clear that many services are required to run a lot of resources, and most of the services are the default boot, idle time to run a waste of time to go to the control Panel to stop the service, very cumbersome, because I think in Windows with batch processing service start and stop. First, you need to know which command is available to start and stop the service in DOS mode. I'm using Net.exe, a simple introduction to the use of net in service startup and stop. NET START service startup Services net stop Service stop services net Pause Service suspend Services net Continue service resume before suspended services Note: Service is the name of the service that you want to specify, the names of the services can be Services, double-click the service to see the name of the service. For example, I use PHP development, generally to start apache+mysql, then take these two as an example, write two lines of batch processing. 1. Start Apache and Mysql@echo off
net start Apache2.2
net start MySQL56
PAUSE2, stop Apache and Mysql@echo off
net stop Apache2.2
net stop MySQL56
Pause this is just a simple start and stop, you can continue to use other commands to detect whether the service has started, if it is started, stop, if not started, start the specified service.
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.