Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query for Internet Explorer Version

Status
Not open for further replies.
Aug 22, 2003
2
0
0
US
I am modifying an existing VBS script file to remotely install patches from MS03-032. I need to know how to check for the existing Internet Explorer Version (on a remote computer) so that I can apply the appropriate patch.

Thanks
 
Set oShell = CreateObject("Wscript.Shell")

sRegPath = "HKLM\SOFTWARE\Microsoft\Internet Explorer\Version"

sIEVer = "" ' init value
On Error Resume Next
sIEVer = oShell.RegRead(sRegPath)

If Err.Number <> 0 Or sIEVer = &quot;&quot; Then
' IE version is 3.0 or less, set it to 0
sIEVer = &quot;0.0.0.0&quot;
End If
On Error Goto 0

aIEVer = Split(sIEVer, &quot;.&quot;)

SetLocale &quot;en-us&quot; ' Do not remove
iIEVersion = CDbl(aIEVer(0) & &quot;.&quot; & aIEVer(1))
iIEBuildVersion = CDbl(aIEVer(2) & &quot;.&quot; & aIEVer(3))
msgbox = iIEVersion & &quot;.&quot; & iIEBuildVersion
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top