我有两个旧的服务,我想完全卸载。我该怎么做呢?


当前回答

在删除服务之前,您应该检查依赖项。

你可以查看一下:

开放服务。找到服务名,切换到“Dependencies”选项卡。

来源:http://www.sysadmit.com/2016/03/windows-eliminar-un-servicio.html

其他回答

对我来说,我创建的服务必须在控制面板>程序和功能中卸载

您可以使用我的小型服务列表编辑器实用工具服务管理器

可以选择任意业务>修改>删除。方法立即工作,不需要重新启动。

可执行文件:[下载]

源代码:[下载]

博客文章:[BlogLink]

服务编辑器类:WinServiceUtils.cs

Sc删除名称

使用SC命令,像这样(你需要在命令提示符下执行本文中的命令):

SC STOP shortservicename
SC DELETE shortservicename

Note: You need to run the command prompt as an administrator, not just logged in as the administrator, but also with administrative rights. If you get errors above about not having the necessary access rights to stop and/or delete the service, run the command prompt as an administrator. You can do this by searching for the command prompt on your start menu and then right-clicking and selecting "Run as administrator". Note to PowerShell users: sc is aliased to set-content. So sc delete service will actually create a file called delete with the content service. To do this in Powershell, use sc.exe delete service instead


如果需要查找服务的短服务名,使用以下命令生成包含服务列表及其状态的文本文件:

SC QUERY state= all >"C:\Service List.txt"

要获得更简洁的列表,执行以下命令:

SC QUERY state= all | FIND "_NAME"

简短的服务名称将被列在显示名称的上方,如下所示:

SERVICE_NAME: MyService
DISPLAY_NAME: My Special Service

因此要删除该服务:

SC STOP MyService
SC DELETE MyService
SC DELETE "service name"

以管理员身份在cmd上运行命令,否则将得到以下错误:-

Openservice失败访问被拒绝