Sc
Applies To: Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, Windows Server 2003 with SP2, Windows Server 2003 R2, Windows Server 2008 R2, Windows Server 2012, Windows Server 2003 with SP1, Windows 8
Communicates with the Service Controller and installed services. The SC.exe program provides capabilities similar to those provided in Services in the Control Panel.
For the syntax of any of the commands in the following table, click the command name.
Sc Commands
Sc command |
Description |
---|---|
Indicates whether the last boot should be saved as the last-known good boot configuration. |
|
Modifies the value of a service's entries in the registry and in the Service Control Manager database. |
|
Sends a CONTINUE control request to a paused service. |
|
Sends a control to a service. |
|
Creates a subkey and entries for the service in the registry and in the Service Control Manager database. |
|
Deletes a service subkey from the registry. |
|
Sets the description string for a service. |
|
Lists the services that cannot run unless the specified service is running. |
|
Specifies one or more actions to be taken if a particular service fails. |
|
Specifies whether to trigger recovery actions when a service stops as the result of an error. |
|
Gets the display name associated with a particular service. |
|
Gets the key name associated with a particular service, using the display name as input. |
|
Sends an INTERROGATE control request to a service. |
|
Locks the Service Control Manager's database. |
|
Sends a PAUSE control request to a service. |
|
Queries the configuration information for a service. |
|
Displays a service's description string. |
|
Displays the actions that will be performed if the specified service fails. |
|
Obtains and displays information about the specified service, driver, type of service, or type of driver. |
|
Obtains and displays detailed information about the specified service, driver, type of service, or type of driver. |
|
Queries and displays the lock status for the Service Control Manager database. |
|
Sets a service's security descriptor, using Security Descriptor Definition Language (SDDL). |
|
Displays a service's security descriptor, using SDDL. |
|
Starts a service. |
|
Sends a STOP control request to a service. |
Remarks
-
SC.exe retrieves and sets control information about services.
-
You can use SC.exe for testing and debugging service programs.
-
Service properties stored in the registry can be set to control how service applications are started at boot time and can be run as background processes.
-
You can use the SC.exe parameters to configure a specific service, retrieve the current status of a service, and stop and start a service.
-
You can create batch files that call various SC.exe commands to automate the startup or shutdown sequence of services.