Starting with Internet Explorer version 4.0, the Version Value Name, a string (REG_SZ) data type, at HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer, contains the version. Here is a table, that is up to date, with the exception of the current betas:

<b>   Version          Product
   -----------------------------------------------------------------</b>
   4.40.308         Internet Explorer 1.0 (Plus! for Windows 95)
   4.40.520         Internet Explorer 2.0
   4.70.1155        Internet Explorer 3.0
   4.70.1158        Internet Explorer 3.0 (Windows 95 OSR2)
   4.70.1215        Internet Explorer 3.01
   4.70.1300        Internet Explorer 3.02 and 3.02a
   4.71.544         Internet Explorer 4.0 Platform Preview 1.0 (PP1)
   4.71.1008.3      Internet Explorer 4.0 Platform Preview 2.0 (PP2)
   4.71.1712.6      Internet Explorer 4.0
   4.72.2106.8      Internet Explorer 4.01
   4.72.3110.8      Internet Explorer 4.01 Service Pack 1 (Windows 98)
   4.72.3612.1713   Internet Explorer 4.01 Service Pack 2
   5.00.0518.10     Internet Explorer 5 Developer Preview (Beta 1)
   5.00.0910.1309   Internet Explorer 5 Beta (Beta 2)
   5.00.2014.0216   Internet Explorer 5
   5.00.2314.1003   Internet Explorer 5 (Office 2000)
   5.00.2614.3500   Internet Explorer 5 (Windows 98 Second Edition)
   5.00.2516.1900   Internet Explorer 5.01 (Windows 2000 Beta 3, build 5.00.2031)
   5.00.2919.800    Internet Explorer 5.01 (Windows 2000 RC1, build 5.00.2072)
   5.00.2919.3800   Internet Explorer 5.01 (Windows 2000 RC2, build 5.00.2128)
   5.00.2919.6307   Internet Explorer 5.01 (Office 2000 SR-1)
   5.00.2920.0000   Internet Explorer 5.01 (Windows 2000, build 5.00.2195)
   5.00.3103.1000   Internet Explorer 5.01 SP1 (Windows 2000 SP1)
   5.00.3105.0106   Internet Explorer 5.01 SP1 (Windows 95/98 and Windows NT 4.0)
   5.00.3314.2101   Internet Explorer 5.01 SP2 (Windows 95/98 and Windows NT 4.0)
   5.00.3315.1000   Internet Explorer 5.01 SP2 (Windows 2000 SP2)
   5.00.3502.1000   Internet Explorer 5.01 SP3 (Windows 2000 SP3 only)
   5.00.3700.1000   Internet Explorer 5.01 SP4 (Windows 2000 SP4 only)
   5.50.3825.1300   Internet Explorer 5.5 Developer Preview (Beta)
   5.50.4030.2400   Internet Explorer 5.5 & Internet Tools Beta
   5.50.4134.0100   Internet Explorer 5.5 for Windows Me (4.90.3000)
   5.50.4134.0600   Internet Explorer 5.5
   5.50.4308.2900   Internet Explorer 5.5 Advanced Security Privacy Beta
   5.50.4522.1800   Internet Explorer 5.5 Service Pack 1
   5.50.4807.2300   Internet Explorer 5.5 Service Pack 2
   6.00.2462.0000   Internet Explorer 6 Public Preview (Beta)
   6.00.2479.0006   Internet Explorer 6 Public Preview (Beta) Refresh
   6.00.2600.0000   Internet Explorer 6 (Windows XP)
   6.00.2800.1106   Internet Explorer 6 Service Pack 1 (Windows XP SP1)
   6.00.3663.0000   Internet Explorer 6 for Microsoft Windows Server 2003 RC1
   6.00.3718.0000   Internet Explorer 6 for Windows Server 2003 RC2
   6.00.3790.0000   Internet Explorer 6 for Windows Server 2003 (released)
I have scripted IEVersion.bat to retrieve the installed version.

The syntax for using IEVersion.bat is:

IEVersion

The output is displayed on the CMD.EXE console, but you can redirect to a file, or test it in a FOR command.

NOTE: IEVersion.bat use REG.EXE built into Windows XP and later, or from the Support / Tools on the Windows 2000 CD-ROM.

IEVersion.bat contains:

@echo off
setlocal
set qry=reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v Version
set fnd=findstr /I /L /C:"REG_SZ"
for /f "Tokens=2*" %%u in ('%qry%^|%fnd%') do (
 @echo %%v
)
endlocal