我对vbs不熟悉。我已经尝试了几种变体。我正在尝试在安装软件更新之前进行卸载先决条件。我也希望它静默卸载。对此的任何帮助表示赞赏。
Set oWMIroot = GetObject("WinMgmts:root/cimv2")
Set oWMIColl = oWMIroot.ExecQuery("Select IdentifyingNumber, Name FROM Win32_Product")
For Each oWMIval In oWMIColl
if oWMIval.Name = "John's MIND" then
'WScript.Echo oWMIval.Name & " = " & oWMIval.IdentifyingNumber ' this is correct
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "msiexec /x oWMIval.IdentifyingNumber",1,True
End if
Next
如果我oWMIval.IdentifyingNumber
用实际的 GUID 替换它就可以了。谢谢