[英]IN guest account in windows 8 how to determine the version of windows?
当我们从Windows 8中的来宾帐户登录并尝试查找版本时,它给出错误并与Windows 8具有相同的值。请建议一些适用于Windows 8和Windows 8.1的代码或API。
This gives you some background knowledge: How can we check if the current OS is win8 or blue 这为您提供了一些背景知识: 我们如何检查当前的操作系统是win8还是蓝色
And this is what works for me: 这就是对我有效的方法:
// this might only work as long as there's no successor to Windows 8.1
public Version GetVersion()
{
var reportedVersion = System.Environment.OSVersion.Version;
if (reportedVersion.Major==6 && reportedVersion.Minor==2)
{
bool _IsWindows8Point1OrGreater = Type.GetType("Windows.UI.Xaml.Controls.Flyout, Windows.UI.Xaml, ContentType=WindowsRuntime", false) != null;
if(_IsWindows8Point1OrGreater )
reportedVersion = new Version(6,3);
}
return reportedVersion;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.