windows系统版本号
| 操作系统 | 版本号 | 
| Windows 11 | 10.0* | 
| Windows 10 | 10.0* | 
| Windows Server 2022 | 10.0* | 
| Windows Server 2019 | 10.0* | 
| Windows Server 2016 | 10.0* | 
| Windows 8.1 | 6.3* | 
| Windows Server 2012 R2 | 6.3* | 
| Windows 8 | 6.2 | 
| Windows Server 2012 | 6.2 | 
| Windows 7 | 6.1 | 
| Windows Server 2008 R2 | 6.1 | 
| Windows Server 2008 | 6.0 | 
| Windows Vista | 6.0 | 
| Windows Server 2003 R2 | 5.2 | 
| Windows Server 2003 | 5.2 | 
| Windows XP 64 位版本 | 5.2 | 
| Windows XP | 5.1 | 
| Windows 2000 | 5.0 | 
对于已为Windows 8.1或Windows 10清单的应用程序。 未为Windows 8.1或Windows 10清单的应用程序将返回 (6.2) Windows 8 OS 版本值。
详细的版本信息
| 操作系统名称 | 版本号 | 
| Windows 95 OEM Service Release 1 (95A) | 4.00.950 | 
| Windows 95 OEM Service Release 2 (95B) | 4.00.1111 | 
| Windows 95 OEM Service Release 2.1 | 4.03.1212-1214 | 
| Windows 95 OEM Service Release 2.5 C | 4.03.1214 | 
| Windows 98 | 4.10.1998 | 
| Windows 98 Second Edition (SE) | 4.10.2222 A | 
| Windows Millenium | 4.90.3000 | 
| Windows NT 3.1 | 3.10.528 | 
| Windows NT 3.5 | 3.50.807 | 
| Windows NT 3.51 | 3.51.1057 | 
| Windows NT 4.00 | 4.00.1381 | 
| Windows 2000 | 5.00.2195 | 
| Windows XP | 5.1.2600 | 
| Windows XP Service Pack 1 | 5.1.2600.1105-1106 | 
| Windows XP Service Pack 2 | 5.1.2600.2180 | 
| Windows XP Service Pack 3 | 5.1.2600 | 
| Windows Server 2003 | 5.2.3790 | 
| Windows Server 2003 Service Pack 1 | 5.2.3790.1180 | 
| Windows Server 2003 | 5.2.3790.1218 | 
| Windows Home Server | 5.2.3790 | 
| Windows Vista RTM | 6.0.6000.16386 | 
| Windows Vista | 6.0.6000 | 
| Windows Vista Service Pack 2 | 6.0.6002 | 
| Windows Server 2008 | 6.0.6001 | 
| Windows 7 RTM | 6.1.7601 | 
| Windows Server 2008 R2 RTM | 6.1.7600.16385 | 
| Windows Server 2008 R2 SP1 | 6.1.7601 | 
| Windows Home Server 2011 | 6.1.8400 | 
| Windows Server 2012 | 6.2.9200 | 
| Windows 8 | 6.2.9200 | 
| Windows Server 2012 R2 | 6.3.9200 | 
| Windows 8.1 | 6.3.9200 | 
| Windows 8.1 Update 1 | 6.3.9600 | 
| Windows Server 2012 R2 | 6.3.9600 | 
| Windows 10 | 10.0.10240 | 
| Windows 11 | 10.0.22000.739 | 
# 调用接口查询版本
以下函数可用于确定当前操作系统版本,或确定它是Windows还是Windows服务器版本。 这些函数提供简单的测试,这些测试使用 VerifyVersionInfo 函数,并推荐的大于或等于被证明为确定操作系统版本的可靠方法的比较。
这些 API 由 versionhelpers.h 定义,Windows 8.1软件开发工具包中包括 (SDK) 。 此文件可用于其他Microsoft Visual Studio版本,以便在Windows 8.1之前为Windows版本实现相同的功能。
查询接口
示例
| 12
 3
 4
 5
 6
 
 | #include <VersionHelpers.h>
 if (!IsWindows8OrGreater())
 {
 MessageBox(NULL, "You need at least Windows 8", "Version Not Supported", MB_OK);
 }
 
 | 
参考
- https://www.sysgeek.cn/windows-operating-system-version-numbers
- https://docs.microsoft.com/zh-cn/windows/win32/sysinfo/operating-system-version?redirectedfrom=MSDN
- https://docs.microsoft.com/zh-cn/windows/win32/sysinfo/version-helper-apis