一、检测到的系统版本含义
szCSDVersion含有一个字符串,指示系统更新或服务包版本,比如" B"或"Service Pack 1"。
Win32s on Windows 3.1有可能是"Retail version"等;
Windows 95/98/Me有可能是:"a"、" b"、" A"、" B"、" C"、"A"、"B"等(可在注册表中设置);
Windows NT/2000/XP/2003/Vista/7有可能是:"Service Pack n";
Windows 8以后的操作系统因为没有发布服务包,通常为空。
二、以下字段可用于Windows NT SP6或者更高版本
wServicePackMajor和wServicePackMinor指示安装的服务包版本,例如:
Service Pack 1的wServicePackMajor=1,wServicePackMinor=0
Service Pack 2的wServicePackMajor=2,wServicePackMinor=0
Service Pack 3的wServicePackMajor=3,wServicePackMinor=0
依次类推。
wSuiteMask(已安装产品套装)置位取值,这一位主要用于特殊产品,具体用法参阅msdn。
wProductType(产品类别)的取值:
VER_NT_WORKSTATION = 1 (工作站,如Windows 2000 Professional/XP/Vista/7/8/8.1/10)
VER_NT_DOMAIN_CONTROLLER = 2 (域控制器,开启了域控制器功能的Windows Server)
VER_NT_SERVER = 3 (服务器,未开启域控制器功能的Windows Server)
wReserved保留不用。
| Windows版本 | dwMajorVersion | dwMinorVersion | dwBuildNumber Win9x: byte-byte-word WinNT: dword | dwPlatformId |
| Win32s on Windows 3.1 | 1 | 任意 | 任意 | 0 VER_PLATFORM_WIN32s |
| Windows 95 | 4 | 0 | 4-0-950 4-0-1111(osr2) 4-3-1214(usb) | 1 VER_PLATFORM_WIN32_WINDOWS |
| Windows 98 | 4 | 10 | 4-10-1998 4-10-2222(se) | 1 |
| Windows Me | 4 | 90 | 4-90-3000 | 1 |
| Windows NT 3.1 | 3 | 10 | 528 | [不支持GetVersionEx] |
| Windows NT 3.5 | 3 | 50 | 807 | 2 VER_PLATFORM_WIN32_NT |
| Windows NT 3.51 | 3 | 51 | 1057 | 2 |
| Windows NT 4.0 | 4 | 0 | 1381 | 2 |
| Windows 2000 | 5 | 0 | 2195 | 2 |
| Windows XP | 5 | 1 | 2600 | 2 |
| Windows Server 2003 Windows XP x64 | 5 | 2 | 3790 | 2 |
| Windows Vista Windows Server 2008 | 6 | 0 | 6000/6001/6002 | 2 |
| Windows 7 Windows Server 2008 R2 | 6 | 1 | 7600/7601 | 2 |
| Windows 8 Windows Server 2012 | 6 | 2 | 9200 | 2 |
| Windows 8.1 WindowsServer 2012 R2 | 6 | 3 | 9600 | 2 |
| Windows 10 TH1 | 10 | 0 | 10240 | 2 |
szCSDVersion含有一个字符串,指示系统更新或服务包版本,比如" B"或"Service Pack 1"。
Win32s on Windows 3.1有可能是"Retail version"等;
Windows 95/98/Me有可能是:"a"、" b"、" A"、" B"、" C"、"A"、"B"等(可在注册表中设置);
Windows NT/2000/XP/2003/Vista/7有可能是:"Service Pack n";
Windows 8以后的操作系统因为没有发布服务包,通常为空。
二、以下字段可用于Windows NT SP6或者更高版本
wServicePackMajor和wServicePackMinor指示安装的服务包版本,例如:
Service Pack 1的wServicePackMajor=1,wServicePackMinor=0
Service Pack 2的wServicePackMajor=2,wServicePackMinor=0
Service Pack 3的wServicePackMajor=3,wServicePackMinor=0
依次类推。
wSuiteMask(已安装产品套装)置位取值,这一位主要用于特殊产品,具体用法参阅msdn。
wProductType(产品类别)的取值:
VER_NT_WORKSTATION = 1 (工作站,如Windows 2000 Professional/XP/Vista/7/8/8.1/10)
VER_NT_DOMAIN_CONTROLLER = 2 (域控制器,开启了域控制器功能的Windows Server)
VER_NT_SERVER = 3 (服务器,未开启域控制器功能的Windows Server)
wReserved保留不用。