[分享] 删除软件

[ 4744 查看 / 4 回复 ]

描述 卸载使用 Windows Installer 安装的假定软件程序。 脚本代码
  1. strComputer = "."
  2. Set objWMIService = GetObject("winmgmts:" _
  3. & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
  4. Set colSoftware = objWMIService.ExecQuery _
  5. ("Select * from Win32_Product Where Name = 'Personnel database'")
  6. For Each objSoftware in colSoftware
  7. objSoftware.Uninstall()
  8. Next
复制代码
分享 转发
欢迎大家和我联系 MCSE2003\MCSA2003\MCP\MTO\MVP QQ群:http://www.mcse.org.cn/showtopic-5035.html bbs:http://www.mcse.org.cn msn:lingluo18#hotmail.com mail:lingluo18#gmail.com
TOP

回复:删除软件

有没有卸载不是使用 Windows Installer 安装的脚本? 谢谢了!
TOP

回复:删除软件

谢谢了
TOP

我觉得更方便的方法是用MsiExec.exe 这个命令行来卸载用windwos installer安装的软件!
TOP

谢谢了
TOP