8

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.

Andrew Swan
  • 13,427
  • 22
  • 69
  • 98

3 Answers3

9

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.

Andrew Swan
  • 13,427
  • 22
  • 69
  • 98
  • 1
    Thanks mate ...It even helped me ... Cheers :) – Makky Mar 13 '13 at 16:55
  • 1
    More info here: http://support.microsoft.com/kb/969393 – vt. May 20 '13 at 20:10
  • 3
    Microsoft lies about the version value in IE10 to avoid breaking programs that can only recognize a single digit version number. A more (hackish) way is to check IE version is to check the file version of mshtml.dll – Sheng Jiang 蒋晟 Sep 11 '13 at 00:06
8

Stumbled across this while trying to solve the same problem.

Andrew's answer from 2010 is correct, but since then, newer Internet Explorers (10 and 11) do not show their true version number in the registry value: 'Version'. Instead, it is recorded in the registry value: 'svcVersion'.

jrun1
  • 96
  • 1
  • 1
  • I've accepted your answer as being more up to date than my original one. – Andrew Swan Jul 31 '14 at 08:53
  • 1
    I ran across this problem this morning. The proper locations are: `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\svcUpdateVersion` and `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\svcVersion`. You can expect to receive data from the values like this: `svcVersion = 11.0.9600.17691` while `svcUpdateVersion = 11.0.7` – Beems Apr 03 '15 at 15:08
1

In newer version IE 10 and 11 true version is recorded in value 'svcVersion' and value 'Version' contains at the beginning '9.'

Krzysztof Gapski
  • 528
  • 6
  • 10