The Blog Thing

Hints, tips and thoughts about IT, security and privacy

Archive for the ‘IE’ tag

How to get the IE version number in a (login) script

without comments

You might want to have the Internet Explorer version number of a Windows system available as an environment variable, for instance to get an inventory of all systems and the IE version installed.

You can do so by running the script below from the login script on your Windows system.
The script assumes that %TEMP% points to some writable location. Replace “SomeFile” with a file on your network (f.i. on the NETLOGON directory) or remove that “echo” line to only have the environment variable available.

@echo off
SET IE_Ver=
SET RegQry="HKLM\Software\Microsoft\Internet Explorer" /v Version
REG.exe Query %RegQry% > %TEMP%\CheckCC.txt
Find /i "Version" < %TEMP%\CheckCC.txt > %TEMP%\StringCheck.txt
FOR /f "Tokens=3" %%b in (%TEMP%\CheckCC.txt) DO SET IE_Ver=%%b
Echo %COMPUTERNAME%,%IE_Ver% >> SomeFile.csv

Written by Vincent Verhagen

July 14th, 2009 at 14:20 UTC

Posted in Uncatagorized

Tagged with ,