我们如何检查当前操作系统是win8还是blue

How can we check if the current OS is win8 or blue(我们如何检查当前操作系统是win8还是blue)
本文介绍了我们如何检查当前操作系统是win8还是blue的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Win8.1 和 Win8 的操作系统版本相同.我们如何检查当前操作系统是 Win8 还是 Blue?Environment.OSVersion 给了我们同样的结果:

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.0Environment.OSVersion.Version 6.2.9200.0Environment.OSVersion.Version.Major 6Environment.OSVersion.Version.Minor 2

推荐答案

Windows 8.1 将 对你撒谎并告诉你它是 Window 8.改变这个谎言需要编辑嵌入在你的程序中的清单,以便 Windows 知道你不想要被骗.Project + Add New Item,选择 Application Manifest File 项模板.在 <application> 元素下面复制粘贴此措辞:

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还是blue的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)