1. 代码:VBS
strComputer = "." '这个表示本地计算机
Set objWMIService = GetObject("winmgmts:" & "
{impersonationLevel=impersonate}!\" & strComputer & "
oot
cimv2") '创建一个WMI对象
Set colSoftware = objWMIService.ExecQuery("Select * from Win32_Product Where Name = 'Personnel database'") '
把Personnel database更换成你的程序的名字
if colSoftware <> null then
For Each objSoftware in colSoftware
objSoftware.Uninstall() '卸载
Next
end if
2. 操作:
打开notepad
把代码粘贴复制进去
然后把文件保存为,unstallsoft.vbs
c:>cscript unstallsoft.vbs