neo
neo

Reputation: 2471

Query Internet Explorer version from command line does not always work?

Step 1, I use the following command to get my local IE version from command line window:

reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v  version" 

It will work and give me the IE version like this:

  ! REG.EXE VERSION 3.0

HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer
    version     REG_SZ  7.0.5730.13

Step 2, Now I try to use this command:

 reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v  version"  | find "version"

It would fail and tell me the following:

! REG.EXE VERSION 3.0

HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer

Error:  The system was unable to find the specified registry key or value

Step 3, Now if I go back to the first command:

 reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v  version"

it will give me the same error as in step 2. What I dont understand is why step 2 would fail, and why step 3 will fail since it's the same as step 1.

Upvotes: 7

Views: 22528

Answers (2)

ycl
ycl

Reputation: 51

I found this command to be more accurate in its reporting of the version number reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v "svcVersion"

Upvotes: 5

MBu
MBu

Reputation: 2950

In step 2 you are looking for registry value named version" | find "version. Remove the double quote after version and everything will be OK:

reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v version | find "version"

Upvotes: 7

Related Questions