使用英语阅读

通过


删除 sc.exe

从注册表中删除服务子项。 如果服务正在运行,或者另一个进程具有服务的打开句柄,则服务将被标记为要删除。

备注

不建议使用此命令删除内置作系统服务,如 DHCP、DNS 或 Internet Information Services。 若要安装、删除或重新配置作系统角色、服务和组件,请参阅 安装或卸载角色、角色服务或功能

语法

sc.exe [<servername>] delete [<servicename>]

参数

参数 说明
<servername> 指定服务所在的远程服务器的名称。 该名称必须使用通用命名约定 (UNC) 格式(例如 \myserver)。 若要在本地运行 SC.exe,请不要使用此参数。
<servicename> 指定由 getkeyname作返回的服务名称。
/? 在命令提示符下显示帮助。

例子

若要从本地计算机上的注册表中删除服务子项 NewServ,请键入:

sc.exe delete NewServ

其他资源

活动

Windows Server Summit

4月29日 14时 - 4月30日 19时

Join the ultimate Windows Server virtual event April 29-30 for deep-dive technical sessions and live Q&A with Microsoft engineers.

Sign up now