How to get the IE version number from the Windows registry?

Andrew Swan picture Andrew Swan · Nov 18, 2010 · Viewed 34.8k times · Source

My Java application needs to know what version of IE (if any) is installed on the local machine, and querying the registry seems like the easiest way. What registry key and value should I look up?

This needs to work on Windows XP, Windows Server 2003, and later.

Answer

Andrew Swan picture Andrew Swan · Nov 18, 2010

Reading this key using the "reg query" OS command:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer

... with this value:

Version

Returns a number like this:

8.0.7600.16385

Or returns errorCode 1 if that entry does not exist, which presumably indicates that IE is not installed.