IE Version Detection Parsing

May 2, 2009 at 21:24:50
Specs: Windows XP and Vista, 4 Gigabytes
Currently, I found a script in another forum that will tell me the version of Internet Explorer installed onto the computer. I need to know how to parse this information

The Script
Echo Get IE Version
SET KEY=Reg query "HKLM\SOFTWARE\Microsoft\Internet Explorer\Version Vector"
FOR /F "tokens=1 delims=" %%A in ('%KEY%' ) DO (

The Result
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version Vector
IE REG_SZ 7.0000

I just want the 7 or 6. I don't need anything else. I do not want the rest of it.

Can someone help put me in the right direction or provide a script that will accomplish this?

Any help would be greatly appreciated.



See More: IE Version Detection Parsing

Report •

May 3, 2009 at 01:59:36
If you want the full version number take the "." out of delims....

set alias=Reg query "HKLM\SOFTWARE\Microsoft\Internet Explorer\Version Vector"
FOR /F "TOKENS=3 DELIMS=.	 " %%A IN ('%alias%^|FIND /I "IE"') DO ECHO %%A

I normally wouldn't use the variable myself, but it makes
it easier to read on the forum so I copied it...

"I just want the 7 or 6. I don't need anything else. I do not want the rest of it."

Don't forget the 8, they are pushing it out via windows update now and apparently some this don't display quite right.....

Report •

May 3, 2009 at 05:39:17
Why wouldn't you use the variable?

That worked phenomenally. Thanks. I was searching for hours trying to figure out how to do this. I am a beginner to beginner-intermediate on batch files. Every time I think that I know something and am doing good I read more and more that make me think WOW, there is a hell of a lot more to know about these things than what I know. lol

Report •

May 3, 2009 at 16:46:24
Why wouldn't you use the variable?

Because it's static information, personally I find it easier use that type of thing as is, one less variable/chunk of memory in use...

There is no nothing wrong with using it if you like, just one of those little habits of mine I guess.

Report •

Related Solutions

Ask Question