开发者

How to get the IE version number from the Windows registry? [duplicate]

开发者 https://www.devze.com 2023-01-25 21:29 出处:网络
This question already has answers here: How do I detect which version of Internet Explorer is installed?
This question already has answers here: How do I detect which version of Internet Explorer is installed? (5 answers) Closed 8 years ago.

My Java application needs to know what version of IE (if any) is installed on the local machine, and querying t开发者_开发问答he 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.


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.


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'.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号