我有两个旧的服务,我想完全卸载。我该怎么做呢?
当前回答
使用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
其他回答
这在Windows 10上很管用:
以管理员身份启动cmd.exe 运行SC DELETE "com.docker.service" 重新安装码头工人
使用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
如果您使用的是Windows Vista或以上版本,请以管理员身份在命令提示符下运行此命令:
sc delete [your service name as shown in service.msc e.g moneytransfer]
例如:sc delete moneytransfer
删除文件夹C:\Program Files\BBRTL\ moneytransfer\
找到转账注册表键并删除它们:
HKEY_CLASSES_ROOT\Installer\Products\
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog\
HKEY_LOCAL_MACHINE\System\CurrentControlSet002\Services\
HKEY_LOCAL_MACHINE\System\CurrentControlSet002\Services\EventLog\
HKEY_LOCAL_MACHINE\Software\Classes\Installer\Assemblies\ [remove .exe references]
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Folders
这些步骤已经在Windows XP、Windows 7、Windows Vista、Windows Server 2003和Windows Server 2008上进行了测试。
对我来说,我创建的服务必须在控制面板>程序和功能中卸载
使用服务。msc或(启动>控制面板>管理工具>服务)以找到有问题的服务。双击查看服务名称和可执行文件的路径。
检查exe版本信息,以找到服务所有者的线索,如果可能的话,使用添加/删除程序进行干净的卸载。
如果做不到,从命令提示符中:
sc stop servicexyz
sc delete servicexyz
不需要重新启动。
推荐文章
- 如何将MongoDB作为Windows服务运行?
- .msi和setup.exe文件之间的具体区别是什么?
- 映射一个网络驱动器供服务使用
- 如何从java应用程序创建一个windows服务
- 'MyClass'的类型初始化式抛出异常
- Crontab每周的日期语法
- 如何找出给定用户的组?
- 检索CLSID {XXXX}组件的COM类工厂失败,原因是以下错误:80040154
- 修改windows服务的“可执行路径”
- 调试Windows服务的简单方法
- 使用Windows命令提示符安装Windows服务?
- “自动”vs“自动(延迟启动)”
- 从可执行文件创建Windows服务
- 如何删除Windows下的服务?
- 如果文件不存在,如何卸载Windows服务?