Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 606
neo Avatar asked Feb 24 '12 18:02

neo


People also ask

What version of Internet Explorer do I have Windows 10 CMD?

Press the Alt key (next to the Spacebar) on the keyboard to open a menu bar. Click Help and select About Internet Explorer. The IE version is displayed in the pop-up window.

How do I determine IE version?

In the upper corner of Internet Explorer, select the Tools button, and then select About Internet Explorer. Open Internet Explorer, at the upper right, select the Tools button, and then choose About Internet Explorer.

How do I run Internet Explorer from the command line?

Open Internet Explorer from Command Prompt Like any other program, the Internet Explorer browser can also be launched from Command Prompt. In the Command Prompt, type @start iexplore and then press Enter key to open Internet Explorer browser.

How do you change IE version?

To open Internet Explorer, select the Start button, type Internet Explorer, and then select the top search result. To be sure you have the latest version of Internet Explorer 11, select the Start button, select Settings > Update & security > Windows Update, and then select Check for updates.


1 Answers

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"
like image 199
MBu Avatar answered Jan 01 '23 10:01

MBu