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


当前回答

这在Windows 10上很管用:

以管理员身份启动cmd.exe 运行SC DELETE "com.docker.service" 重新安装码头工人

其他回答

如果它们是。net创建的服务,您可以使用带有/u开关的installutil.exe 它在。net framework文件夹中 C:\Windows\ Microsoft.NET \ Framework64 \ v2.0.50727

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

你可以查看一下:

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

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

如上所述,我执行:

sc delete ServiceName

然而,这并没有工作,因为我是从PowerShell执行它。

当使用PowerShell时,您必须指定sc.exe的完整路径,因为PowerShell为sc分配了一个默认别名给Set-Content。因为它是一个有效的命令,它实际上并不显示错误消息。

为了解决这个问题,我执行了如下命令:

C:\Windows\System32\sc.exe delete ServiceName

下面是传递给我的vbs脚本:

Set servicelist = GetObject("winmgmts:").InstancesOf ("Win32_Service")

for each service in servicelist
    sname = lcase(service.name)
    If sname = "NameOfMyService" Then 
        msgbox(sname)
        service.delete ' the internal name of your service
    end if
next

如果您使用的是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上进行了测试。