OSDN Git Service

Detect Windows 8 and Windows Server 2012 in config log
authorsdottaka <none@none>
Sun, 3 Mar 2013 14:23:58 +0000 (23:23 +0900)
committersdottaka <none@none>
Sun, 3 Mar 2013 14:23:58 +0000 (23:23 +0900)
Src/ConfigLog.cpp

index c6ea316..9949fa9 100644 (file)
@@ -721,6 +721,13 @@ String CConfigLog::GetWindowsVer()
                        else
                                sVersion = _T("Microsoft Windows Server 2008 R2 ");
                }
+               else if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 2 )
+               {
+                       if (osvi.wProductType == VER_NT_WORKSTATION)
+                               sVersion = _T("Microsoft Windows 8 ");
+                       else
+                               sVersion = _T("Microsoft Windows Server 2012 ");
+               }
                else
                        sVersion = string_format(_T("[? WindowsNT %d.%d] "), 
                                osvi.dwMajorVersion, osvi.dwMinorVersion);