看看这篇文章:
原文链接:https://www.f2er.com/windows/371168.htmlOperating system version changes in Windows 8.1 Preview
GetVersion(Ex)
APIs have been deprecated. That means that while you can still call the APIs,if your app does not specifically target Windows 8.1 Preview,you will get Windows 8 versioning (6.2.0.0).
它说的是GetVersion是关于真正的操作系统版本,除非你明确地指示8.1在你的清单.
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> * <!-- Windows 8.1 --> * <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <!-- Windows Vista --> <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> <!-- Windows 7 --> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!-- Windows 8 --> <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> </application> </compatibility>
如果您不想这样做,可以检查以下注册表项:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
当前版本会给你6.3
当前构建nmber将为9431