The difference between SC and net commands

Source: Internet
Author: User
Tags net command

The Windows Service Operations Command has the SC and net two commands;

sc stop ServiceName SC start serviceName

net stop serviceName net start serviceName

Although 2 can reach the stop service and start the service effect, but when restarting the service, is the use of batch first stop after start to achieve a restart, if the service is in the start state using SC stop after start, the result service cannot start, The start command cannot be started because the SC command does not wait for the execution of the batch to proceed immediately after the stop operation, when the service is in a stopped state.

NET command stops waiting at stop, and after the service has stopped completely before continuing with the statement after the batch, the net restart command is normal.

The difference between SC and net commands

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.