Detect Internet Explorer Version

Table of Contents

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.

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