From 7d7e62752e6f6819b14d4d01097bbfbd28e5bb3c Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 15 Apr 2015 12:48:17 -0400 Subject: [PATCH] client: Fix formatting issues --- client/hostinfo_win.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/client/hostinfo_win.cpp b/client/hostinfo_win.cpp index 63436b4bd7..30389cdd73 100644 --- a/client/hostinfo_win.cpp +++ b/client/hostinfo_win.cpp @@ -554,15 +554,18 @@ int get_os_information( case PRODUCT_PROFESSIONAL_WMC: strcat(szSKU, "Professional with Media Center "); break; - - } + } + } else if( (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) ) { + if( osvi.wSuiteMask & VER_SUITE_PERSONAL ) { strcat(szSKU, "Home "); } else { strcat(szSKU, "Professional "); } + } else if( (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) ) { + if( osvi.wSuiteMask & VER_SUITE_PERSONAL ) { strcat(szSKU, "Home "); } else if( GetSystemMetrics(SM_TABLETPC) ) { @@ -574,18 +577,23 @@ int get_os_information( } else { strcat(szSKU, "Professional "); } + } else if( (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) ) { + strcat(szSKU, "Professional "); + } else if( (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) ) { + strcat(szSKU, "Workstation "); + } } // Test for the server type. else if ( (osvi.wProductType == VER_NT_SERVER) || (osvi.wProductType == VER_NT_DOMAIN_CONTROLLER) ) { - // all NT6 or higher (Server 2008,2008r2,2012,2012r2,2015...) - if( (osvi.dwMajorVersion >= 6) ) { + // all NT6 or higher (Server 2008,2008r2,2012,2012r2,2015...) + if( (osvi.dwMajorVersion >= 6) ) { switch(dwType) { case PRODUCT_CLUSTER_SERVER: strcat( szSKU, "Cluster Server "); @@ -645,8 +653,8 @@ int get_os_information( strcat( szSKU, "Server For Small Business "); break; case PRODUCT_HYPERV: - strcat( szSKU, "Hyper-V "); - break; + strcat( szSKU, "Hyper-V "); + break; } } else if( (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) ) {