Command-line program for Windows Service Control Manager communication-Application Tips

Source: Internet
Author: User
SC is a command-line program used to communicate with the Service Control Manager.
Usage:
SC <server> [command] [service name] <option1> <option2>


The option <server> format is "\\ServerName"
You can type "sc [command]" to get further help for the command
Command:
Query-----------The state of the service,
Or enumerate the state of the service type.
Queryex---------The extended state of the query service,
Or enumerate the state of the service type.
Start-----------starting the service.
Pause-----------Send Pause control requests to the service.
Interrogate-----Send interrogate control requests to the service.
Continue--------send continue control requests to the service.
Stop------------send a stop request to the service.
Config----------(permanently) change the configuration of the service.
Description-----Change the description of the service.
Failure---------to change the operation when a service fails.
The QC--------------the configuration information for the query service.
Qdescription----The description of the query service.
Qfailure the operation--------the query failed service.
Delete----------(from the registry) to remove the service.
The Create----------creates a service (adds it to the registry).
Control---------send controls to the service.
Sdshow----------Display the security descriptor for the service.
Sdset-----------Set the security descriptor for the service.
getdisplayname--gets the DisplayName of the service.
Getkeyname------Get the servicekeyname of the service.
EnumDepend------Enumerate the dependencies of the service.

The following command does not query the service name:
SC <server> <command> <option>
The boot------------(OK | bad) indicates whether the last boot was saved as
The last Known good boot configuration
Lock------------Locking Service database
Querylock-------Query The lockstatus of Scmanager database
Example:
SC start MyService

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.