https://bugs.winehq.org/show_bug.cgi?id=50610
Bug ID: 50610 Summary: WMI 'Win32_OperatingSystem' OS caption property descriptions for Windows 8 and 8.1 are reversed Product: Wine Version: 6.1 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: wmi&wbemprox Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
spotted by Dmitry Timoshkov when looking at my test script output which tested for bug 50580
https://bugs.winehq.org/show_bug.cgi?id=50580#c5
To reproduce:
--- snip --- On Error Resume Next
strComputer = "." Set objWMIService = GetObject("winmgmts:\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48) For Each objItem in colItems Wscript.Echo "BuildNumber: " & objItem.BuildNumber Wscript.Echo "BuildType: " & objItem.BuildType Wscript.Echo "Caption: " & objItem.Caption Wscript.Echo "CSCreationClassName: " & objItem.CSCreationClassName Wscript.Echo "CSDVersion: " & objItem.CSDVersion Wscript.Echo "CSName: " & objItem.CSName Wscript.Echo "Version: " & objItem.Version Next --- snip ---
Run the script:
--- snip --- $ for ver in win8 win81 ; do \ ( \ export WINEDEBUG=-all echo "======" && \ winecfg -v $ver && \ winecfg -v | tee && \ wine cscript osversion.vbs \ ) ; done
====== win81 BuildNumber: 9600 Caption: Microsoft Windows 8 Pro CSDVersion: CSName: LINUX Version: 6.3.9600 ====== win10 BuildNumber: 17763 Caption: Microsoft Windows 10 Pro CSDVersion: CSName: LINUX Version: 10.0.17763 --- snip ---
Wine source:
https://source.winehq.org/git/wine.git/blob/433b9081ba7c862feb947400f507228e...
--- snip --- 3419 static WCHAR *get_oscaption( OSVERSIONINFOEXW *ver ) 3420 { 3421 static const WCHAR windowsW[] = L"Microsoft Windows "; 3422 static const WCHAR win2000W[] = L"2000 Professional"; 3423 static const WCHAR win2003W[] = L"Server 2003 Standard Edition"; 3424 static const WCHAR winxpW[] = L"XP Professional"; 3425 static const WCHAR winxp64W[] = L"XP Professional x64 Edition"; 3426 static const WCHAR vistaW[] = L"Vista Ultimate"; 3427 static const WCHAR win2008W[] = L"Server 2008 Standard"; 3428 static const WCHAR win7W[] = L"7 Professional"; 3429 static const WCHAR win2008r2W[] = L"Server 2008 R2 Standard"; 3430 static const WCHAR win8W[] = L"8 Pro"; 3431 static const WCHAR win81W[] = L"8.1 Pro"; 3432 static const WCHAR win10W[] = L"10 Pro"; 3433 int len = ARRAY_SIZE( windowsW ) - 1; 3434 WCHAR *ret; 3435 3436 if (!(ret = heap_alloc( len * sizeof(WCHAR) + sizeof(win2003W) ))) return NULL; 3437 memcpy( ret, windowsW, sizeof(windowsW) ); 3438 if (ver->dwMajorVersion == 10 && ver->dwMinorVersion == 0) memcpy( ret + len, win10W, sizeof(win10W) ); 3439 else if (ver->dwMajorVersion == 6 && ver->dwMinorVersion == 3) memcpy( ret + len, win8W, sizeof(win8W) ); 3440 else if (ver->dwMajorVersion == 6 && ver->dwMinorVersion == 2) memcpy( ret + len, win81W, sizeof(win81W) ); 3441 else if (ver->dwMajorVersion == 6 && ver->dwMinorVersion == 1) 3442 { 3443 if (ver->wProductType == VER_NT_WORKSTATION) memcpy( ret + len, win7W, sizeof(win7W) ); 3444 else memcpy( ret + len, win2008r2W, sizeof(win2008r2W) ); 3445 } 3446 else if (ver->dwMajorVersion == 6 && ver->dwMinorVersion == 0) 3447 { 3448 if (ver->wProductType == VER_NT_WORKSTATION) memcpy( ret + len, vistaW, sizeof(vistaW) ); 3449 else memcpy( ret + len, win2008W, sizeof(win2008W) ); 3450 } 3451 else if (ver->dwMajorVersion == 5 && ver->dwMinorVersion == 2) 3452 { 3453 if (ver->wProductType == VER_NT_WORKSTATION) memcpy( ret + len, winxp64W, sizeof(winxp64W) ); 3454 else memcpy( ret + len, win2003W, sizeof(win2003W) ); 3455 } 3456 else if (ver->dwMajorVersion == 5 && ver->dwMinorVersion == 1) memcpy( ret + len, winxpW, sizeof(winxpW) ); 3457 else memcpy( ret + len, win2000W, sizeof(win2000W) ); 3458 return ret; 3459 } --- snip ---
Line 3439 and 3440
$ wine --version wine-6.1-70-g433b9081ba7
Regards