Blog

Detect Internet Explorer Version

Someone requested how to determine what version of IE (internet explorer) was installed on a machine.
The version registry entry was unreliable so this gets the version straight from the executable.

1
2
3
4
5
6
7
8
9
10
11
12
13
strComputer = "."
 
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
 
sQuery="select * from cim_datafile where path=""\\Program Files\\Internet Explorer\\"" and filename=""iexplore"" and extension=""exe"""
set col=objWMIService.execquery(sQuery)
 
for each obj in col
    wscript.echo obj.version
next
 
set col = Nothing
Set objWMIService = Nothing

Posted in: Scripts

Leave a Comment (0) ↓

Leave a Comment