[Windows][Client] Update client to report correctly Windows 11

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
This commit is contained in:
Vitalii Koshura 2021-07-27 07:37:35 +02:00
parent 077deafd9d
commit 16b67207ee
No known key found for this signature in database
GPG Key ID: CE0DB1726070A5A3
1 changed files with 13 additions and 3 deletions

View File

@ -359,11 +359,21 @@ int get_os_information(
switch (osvi.dwPlatformId) {
case VER_PLATFORM_WIN32_NT:
if ( osvi.dwMajorVersion == 10 && osvi.dwMinorVersion == 0 ) {
if ( osvi.dwMajorVersion == 10 && osvi.dwMinorVersion == 0) {
if( osvi.wProductType == VER_NT_WORKSTATION ) {
strlcat(os_name, "Windows 10", os_name_size);
if ( osvi.dwBuildNumber >= 22000 ) {
strlcat(os_name, "Windows 11", os_name_size);
} else {
strlcat(os_name, "Windows 10", os_name_size);
}
} else {
strlcat(os_name, "Windows Server 2016", os_name_size);
if ( osvi.dwBuildNumber >= 20348 ) {
strlcat(os_name, "Windows Server 2022", os_name_size);
} else if ( osvi.dwBuildNumber >= 17623) {
strlcat(os_name, "Windows Server 2019", os_name_size);
} else {
strlcat(os_name, "Windows Server 2016", os_name_size);
}
}
pGPI( 10, 0, 0, 0, &dwType);
}