0
我想一起獲取VBS腳本作爲啓動腳本來卸載Silverlight,如果它是一個5以下的版本,但我的代碼在嘗試比較值時不斷給我一個類型不匹配。VBS卸載應用程序
版本是5.1.10411.0。我如何將此值與整數值進行比較?
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Product WHERE Caption = 'Microsoft Silverlight'")
Dim item
For each item in colItems
prodVer = item.Version
Next
If prodVer < 5 Then
set WshShell = CreateObject("WScript.Shell")
set oExec = WshShell.Exec("wmic product where caption='Microsoft Silverlight' call uninstall")
End If