Querying Internet Explorer version from the command line does not always work?

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

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

It will work and give me the IE version as follows:

  ! REG.EXE VERSION 3.0 HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer version REG_SZ 7.0.5730.13 

Step 2 Now I am trying to use this command:

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

This will not work and will 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 return 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 don’t understand is the reason that step 2 failed, and why step 3 will fail because it matches step 1.

+6
source share
2 answers

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

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

I found this command more accurate in my version number report reg query "HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Internet Explorer" / v "svcVersion"

+4
source

Source: https://habr.com/ru/post/909296/


All Articles