如何在Winform中获取IE版本信息? [重复]

问题描述

|                                                                                                                   这个问题已经在这里有了答案:                                                      

解决方法

        您可以从注册表中读取版本:
var ieVersion = Registry.LocalMachine.OpenSubKey(@\"Software\\Microsoft\\Internet Explorer\").GetValue(\"Version\");
    ,        在Windows 8中,您应该使用\“ svcVersion \”而不是\“ Version \”键。否则,它将报告已安装IE 9而不是IE10。如果您已升级到IE10,则Windows 7也可能会发生这种情况(我安装了IE 9,所以不能肯定地说)。     ,        我认为这可能会有所帮助:
private string GetIEVersion()
{
    string key = @\"Software\\Microsoft\\Internet Explorer\";
    RegistryKey dkey = Registry.LocalMachine.OpenSubKey(key,false);
    string data = dkey.GetValue(\"Version\").ToString();
    return data;
}
    ,        查看HKEY_LOCAL_MACHINE \\ Software \\ Microsoft \\ Internet Explorer \\ Version注册表项     

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...