最近卸载了测试机上的VMware workstation,,重启后发现此软件的两个服务vmnat和vmdhcp还在服务中。修改注册表无果,清理服务名也无效,后search到如下,通过vbs脚本删除服务。
脚本如下:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where Name = '填写你所要删除的服务名'")
For Each objService in colListOfServices
objService.StopService()
objService.Delete()
Next
用记事本将此脚本另存为一个*.vbs,运行即可。