Computing.Net > Forums > Programming > IE Version Detection Parsing

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

IE Version Detection Parsing

Reply to Message Icon

Name: scrfix
Date: May 2, 2009 at 21:24:50 Pacific
OS: Windows XP and Vista
CPU/Ram: 4 Gigabytes
Product: Any pc / Any model
Subcategory: Batch
Comment:

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 (
ECHO %%A
)
@pause

The Result
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version Vector
IE REG_SZ 7.0000
VML REG_SZ 1.0
WLPG REG_SZ 3

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.

Thanks,

Wayne



Sponsored Link
Ads by Google

Response Number 1
Name: Judago
Date: May 3, 2009 at 01:59:36 Pacific
Reply:

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.....


0

Response Number 2
Name: scrfix
Date: May 3, 2009 at 05:39:17 Pacific
Reply:

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


0

Response Number 3
Name: Judago
Date: May 3, 2009 at 16:46:24 Pacific
Reply:

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: IE Version Detection Parsing

Version Checker www.computing.net/answers/programming/version-checker/16203.html

Color Changing Text... www.computing.net/answers/programming/color-changing-text/807.html

Show hardware list using batch www.computing.net/answers/programming/show-hardware-list-using-batch/17412.html