title | description | ms.topic | ms.assetid | ms.author | author | manager | ms.date |
---|---|---|---|---|---|---|---|
sc.exe delete |
Reference article for the sc.exe delete command, which deletes a service subkey from the registry. |
reference |
2fe94fb3-e4d1-47b5-b999-39995ecbb644 |
roharwoo |
robinharwood |
mtillman |
10/16/2017 |
Deletes a service subkey from the registry. If the service is running or if another process has an open handle to the service, the service is marked for deletion.
Note
We don't recommend you to use this command to delete built-in operating system services such as DHCP, DNS, or Internet Information Services. To install, remove, or reconfigure operating system roles, services and components, see Install or Uninstall Roles, Role Services, or Features
sc.exe [<servername>] delete [<servicename>]
Parameter | Description |
---|---|
<servername> |
Specifies the name of the remote server on which the service is located. The name must use the Universal Naming Convention (UNC) format (for example, \myserver). To run SC.exe locally, don't use this parameter. |
<servicename> |
Specifies the service name returned by the getkeyname operation. |
/? | Displays help at the command prompt. |
To delete the service subkey NewServ from the registry on the local computer, type:
sc.exe delete NewServ