Skip to content
Snippets Groups Projects
Commit 5b4dcf00 authored by Tank_Master's avatar Tank_Master
Browse files

Correctly identify Server 2008, Server 2008 R2, Server 2012, and Windows 8

parent 113f532e
No related branches found
No related tags found
No related merge requests found
......@@ -188,22 +188,30 @@ LLOSInfo::LLOSInfo() :
if(osvi.wProductType == VER_NT_WORKSTATION)
mOSStringSimple = "Microsoft Windows XP x64 Edition ";
else
mOSStringSimple = "Microsoft Windows Server 2003 ";
mOSStringSimple = "Microsoft Windows Server 2003 ";
}
else if(osvi.dwMajorVersion == 6 && osvi.dwMinorVersion <= 1)
else if(osvi.dwMajorVersion == 6 && osvi.dwMinorVersion <= 2)
{
if(osvi.dwMinorVersion == 0)
{
mOSStringSimple = "Microsoft Windows Vista ";
if(osvi.wProductType == VER_NT_WORKSTATION)
mOSStringSimple = "Microsoft Windows Vista ";
else
mOSStringSimple = "Windows Server 2008 ";
}
else if(osvi.dwMinorVersion == 1)
{
mOSStringSimple = "Microsoft Windows 7 ";
if(osvi.wProductType == VER_NT_WORKSTATION)
mOSStringSimple = "Microsoft Windows 7 ";
else
mOSStringSimple = "Windows Server 2008 R2 ";
}
if(osvi.wProductType != VER_NT_WORKSTATION)
else if(osvi.dwMinorVersion == 2)
{
mOSStringSimple += "Server ";
if(osvi.wProductType == VER_NT_WORKSTATION)
mOSStringSimple = "Microsoft Windows 8 ";
else
mOSStringSimple = "Windows Server 2012 ";
}
///get native system info if available..
......@@ -308,8 +316,7 @@ LLOSInfo::LLOSInfo() :
std::string compatibility_mode;
if(got_shell32_version)
{
if(osvi.dwMajorVersion != shell32_major
|| osvi.dwMinorVersion != shell32_minor)
if(osvi.dwMajorVersion != shell32_major || osvi.dwMinorVersion != shell32_minor)
{
compatibility_mode = llformat(" compatibility mode. real ver: %d.%d (Build %d)",
shell32_major,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment