SC is a command line used to communicate with the Service Control Manager. Program .
Usage:
SC <Server> [command] [service name] <option1> <option2>...
the format of option is "\ servername"
you can type "SC [command]" for further help.
command:
query ----------- query service status,
or enumerative service status.
queryex --------- query the extended status of the service.
or enumerate the status of the service type.
Start ----------- start the service.
pause ----------- send a pause control request to the service.
interrogate ----- sends an interrogate control request to the service.
continue -------- send a continue control request to the service.
stop ------------ send a stop request to the service.
config ---------- (permanently) change the service configuration.
description ----- modify the service description.
failure --------- modify the operation performed when the service fails.
QC ------------ query service configuration information.
qdescription ---- query the service description.
qfailure -------- operations performed by the failed query service.
Delete ---------- (from the Registry) Delete the service.
Create ---------- create a service (add it to the registry ).
Control --------- send control to service.
sdshow ---------- displays the security descriptor of the service.
sdset ----------- set the security descriptor of the service.
getdisplayname -- get the displayname of the service.
getkeyname ------ obtain the servicekeyname of the service.
enumdepend ------ enumeration service dependency.
the following command does not query the service name:
SC
boot ------------ (OK | bad) indicates whether to save the last startup as
the last known STARTUP configuration
lock ---------- lock the Service database
querylock ------- Query lockstatus of the scmanager database
example:
SC start myservice