我们如何检查当前操作系统是win8还是蓝色 [英] How can we check if the current OS is win8 or blue

查看:109
本文介绍了我们如何检查当前操作系统是win8还是蓝色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Win8.1和Win8具有相同的操作系统版本。我们如何检查当前操作系统是Win8还是蓝色?
Environment.OSVersion给出了相同的结果:




Environment.OSVersion 6.2.9200.0
Environment.OSVersion.Version 6.2.9200.0
Environment.OSVersion.Version.Major 6
Environment.OSVersion.Version.Minor 2

解决方案

Windows 8.1将骗你,并告诉你是Window 8.改变这个谎言需要编辑嵌入到你的程序中的清单,以便Windows知道你不会想要撒谎项目+添加新项目,选择应用程序清单文件项目模板。复制粘贴到< application> 元素下面的这个动词:

  ; compatibility xmlns =urn:schemas-microsoft-com:compatibility.v1> 
< application>
< supportedOS Id ={1f676c76-80e1-4239-95bb-83d0f6d0da78}/>
< / application>
< / compatibility>


Win8.1 and Win8 has the same OS Version. How can we check if the current OS is Win8 or Blue? The Environment.OSVersion is giving us the same results:

Environment.OSVersion 6.2.9200.0 Environment.OSVersion.Version 6.2.9200.0 Environment.OSVersion.Version.Major 6 Environment.OSVersion.Version.Minor 2

解决方案

Windows 8.1 will lie to you and tell you it is Window 8. Changing that lie requires editing the manifest that is embedded in your program so that Windows knows you don't want to be lied to. Project + Add New Item, select the Application Manifest File item template. Copy paste this verbiage underneath the <application> element:

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
    <application> 
        <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
    </application> 
</compatibility>

这篇关于我们如何检查当前操作系统是win8还是蓝色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆