How to get IE version info in Winform? [duplicate]

半世苍凉 提交于 2020-01-10 01:40:10

问题


I am developing an winform application in .NET framework 3.5, using C#.

In the application I need to display the IE version number, installed on the machine on which it runs. How can I do that, can anybody tell me?


回答1:


You can read the version from the registry:

var ieVersion = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Internet Explorer").GetValue("Version");



回答2:


With Windows 8 you should use the "svcVersion" rather than the "Version" key. Otherwise it will report that IE 9 is installed instead of IE 10. Possibly also the case with Windows 7 if you have upgraded to IE10 (I have IE 9 installed so I can't say for sure).




回答3:


I think this may help:

private string GetIEVersion()
{
    string key = @"Software\Microsoft\Internet Explorer";
    RegistryKey dkey = Registry.LocalMachine.OpenSubKey(key, false);
    string data = dkey.GetValue("Version").ToString();
    return data;
}



回答4:


Look at HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Version registry key



来源:https://stackoverflow.com/questions/6197794/how-to-get-ie-version-info-in-winform

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!