Thursday, May 1, 2014

Checking Google Chrome Version



This script is used to get the version of Google chrome from the machine.


On Error Resume Next
strComputer = "."
Bool_chrome=FALSE

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery ("Select * from Win32_Product")

For Each objSoftware in colSoftware

StrProduct = objSoftware.Caption
StrVersion = objSoftware.version

If Instr(1,lcase(StrProduct),"google chrome",1) > 0 then
Bool_chrome=TRUE
Exit For
End if
Next


If Bool_chrome=TRUE then
SetVariable"HARVERSION", StrVersion
Else
SetVariable"HARVERSION", "0"
End If

No comments:

Post a Comment