https://bugs.winehq.org/show_bug.cgi?id=50580
Bug ID: 50580 Summary: iTunes 12.11.0.26 - installer doesn't recognize Windows 10 Product: Wine Version: 6.0 Hardware: x86-64 URL: https://web.archive.org/web/20210124051812/https://sec ure-appldnld.apple.com/itunes12/001-82541-20201113-960 CFAAE-25EC-11EB-864A-F0B0133BD450/iTunes64Setup.exe OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msi Assignee: wine-bugs@winehq.org Reporter: winetaste@gmx.net Distribution: ---
iTunes 12.11.0.26 drops support for Windows 7 and 8.1. I set Version to "Windows 10", but it doesn't help. Starting the installer I get:
"Install Failed - iTunes requires that your computer is running Windows 10"
--- snip --- ... 0108:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 0114:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 0114:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 012c:fixme:wbemprox:client_security_SetBlanket 0000000001B0ECF0, 00000000000B86B0, 10, 0, (null), 3, 3, 0000000000000000, 0x00000000 012c:fixme:wbemprox:client_security_Release 0000000001B0ECF0 012c:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 0108:err:msi:ITERATE_Actions Execution halted, action L"LaunchConditions" returned 1603 ... --- snip ---
$ sha1sum iTunes64Setup.exe f9f299710993b5ea5c7bd430afc451bc908b7208 iTunes64Setup.exe
$ du -sh iTunes64Setup.exe 192M iTunes64Setup.exe
Direct download: https://secure-appldnld.apple.com/itunes12/001-82541-20201113-960CFAAE-25EC-...
$ wine --version wine-6.0
https://bugs.winehq.org/show_bug.cgi?id=50580
--- Comment #1 from winetaste@gmx.net --- Extracting the installer and editing iTunes64.msi:
There are two LaunchConditions checking for Windows 10:
1. "Installed OR ((VersionNT=601 AND ServicePackLevel>=1) OR VersionNT>601)"
2. "Installed OR (VersionNT>=603 AND BUSEROSVERSION AND BUSEROSVERSION>=10) OR DISABLE_OS_VERSION_CHECK"
Deleting the second condition fixes this problem and after more testing:
Wine returns BUSEROSVERSION=6 instead of >=10
https://bugs.winehq.org/show_bug.cgi?id=50580
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, Installer Ever confirmed|0 |1 CC| |focht@gmx.net Status|UNCONFIRMED |NEW Component|msi |wmi&wbemprox Summary|iTunes 12.11.0.26 - |iTunes 12.11.0.26 installer |installer doesn't recognize |doesn't recognize WinVer |Windows 10 |'Windows 10' setting (WMI | |'Win32_OperatingSystem' | |class uses 'GetVersionEx' | |API to retrieve OS version | |info, a deprecated API in | |Windows 10)
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
--- snip --- ... 013c:trace:msi:ACTION_LaunchConditions Checking launch conditions ... 013c:trace:msi:ACTION_CustomAction Handling custom action L"WinOSVersion" (141 L"iTunes_CustomActions.dll" L"WinOSVersion") ... 013c:trace:msi:HANDLE_CustomType1 Calling function L"WinOSVersion" from L"C:\users\focht\Temp\msi5132.tmp" ... 013c:trace:msi:wait_thread_handle waiting for L"WinOSVersion" ... 0160:Call KERNEL32.LoadLibraryW(000a2590 L"C:\users\focht\Temp\msi5132.tmp") ret=180025153 ... 0160:Ret KERNEL32.LoadLibraryW() retval=014a0000 ret=180025153 0160:Call KERNEL32.GetProcAddress(014a0000,000a4750 "WinOSVersion") ret=18002516d 0160:Ret KERNEL32.GetProcAddress() retval=014a3450 ret=18002516d ... 0160:Call oleaut32.SysAllocString(015ef790 L"SELECT * FROM Win32_OperatingSystem") ret=014a6dbc ... 0160:Call KERNEL32.GetVersionExW(015ef4c8) ret=0161842c ... 0160:Call KERNEL32.GetVersionExW(015ef4c8) ret=0161842c ... 0160:Call KERNEL32.GetProductInfo(00000006,00000000,00000000,00000000,015ef418) ret=01618a46 ... 0160:Ret KERNEL32.GetProductInfo() retval=00000001 ret=01618a46 0160:Call KERNEL32.GetNativeSystemInfo(015ef418) ret=01618a63 ... 0160:Ret KERNEL32.GetNativeSystemInfo() retval=7b09a958 ret=01618a63 .... 0160:Call advapi32.RegOpenKeyExW(ffffffff80000002,01634072 L"Software\Microsoft\Windows NT\CurrentVersion",00000000,00020019,015ef418) ret=01618adb ... 0160:Call KERNEL32.WideCharToMultiByte(00000000,00000000,000abd38 L"6.2.9200",00000009,00000000,00000000,00000000,00000000) ret=014a6c03 0160:Ret KERNEL32.WideCharToMultiByte() retval=00000009 ret=014a6c03 ... 0160:Call msi.MsiRecordSetStringW(00000002,00000000,015cf7f0 L"Operating System Version number is: 6") ret=014a147a ... 0160:Call msi.MsiSetPropertyW(00000001,014ba550 L"BUSEROSVERSION",015ef8f8 L"6") ret=014a3880 ... 0158:trace:msi:msi_set_property 00000000000AA950 L"BUSEROSVERSION" L"6" -1 ... 0160:Ret msi.MsiSetPropertyW() retval=00000000 ret=014a3880 ... 0160:Call msi.MsiRecordSetStringW(00000002,00000000,015cf7f0 L"Operating System BuildVersion number is: 9200") ret=014a147a ... 0160:Call msi.MsiSetPropertyW(00000001,014ba5e8 L"BUSEROSBUILDVERSION",015ef8f8 L"9200") ret=014a390f ... 0160:Ret msi.MsiSetPropertyW() retval=00000000 ret=014a390f ... 013c:trace:msi:msi_get_property returning L"6" for property L"BUSEROSVERSION" ... 0024:trace:msi:msi_get_property property L"DISABLE_OS_VERSION_CHECK" not found 0024:trace:msi:MSI_EvaluateConditionW 0 <- L"Installed OR (VersionNT>=603 AND BUSEROSVERSION AND BUSEROSVERSION>=10) OR DISABLE_OS_VERSION_CHECK" 0024:trace:msi:MSI_FormatRecordW 0017A288 001B8C50 00000000 0031F748 0024:trace:msi:msi_get_property 00157E18 L"ProductName" 00000000 0031F690 0024:trace:msi:MSI_DatabaseOpenViewW L"SELECT `Value` FROM `_Property` WHERE `_Property`=?" 0031F600 0024:trace:msi:MSI_ParseSQL Parse returned 0 ... 013c:Call user32.MessageBoxW(00000000,016db3e0 L"iTunes requires that your computer is running Windows 10.",18009f418 L"Install Failed",00000000) ret=18000f47e --- snip ---
The installer custom action 'WinOSVersion' uses WMI to query for OS version properties. Wine WMI implementation uses 'GetVersionEx' to retrieve the version info. GetVersionEx is deprecated starting with Windows 10. Calling 'GetVersionEx' will always return major/minor of 6.2 for backwards compatibility reasons.
Here is a small vbscript to demonstrate the current Wine behaviour. Call it 'osversion.vbs':
--- 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 ---
For testing with different 'WinVer' values use the following scriptlet:
--- snip --- $ for ver in win7 win8 win81 win10 ; do \ ( \ export WINEDEBUG=-all echo "======" && \ winecfg -v $ver && \ winecfg -v | tee && \ wine cscript osversion.vbs \ ) ; done --- snip ---
NOTE: 'tee' is used to work around console bug, forcing 'winecfg' output.
Output:
--- snip --- ====== win7 BuildNumber: 7601 Caption: Microsoft Windows 7 Professional CSDVersion: Service Pack 1 CSName: LINUX Version: 6.1.7601 ====== win8 BuildNumber: 9200 Caption: Microsoft Windows 8.1 Pro CSDVersion: CSName: LINUX Version: 6.2.9200 ====== win81 BuildNumber: 9200 Caption: Microsoft Windows 8.1 Pro CSDVersion: CSName: LINUX Version: 6.2.9200 ====== win10 BuildNumber: 9200 Caption: Microsoft Windows 8.1 Pro CSDVersion: CSName: LINUX Version: 6.2.9200 --- snip ---
Wine source:
https://source.winehq.org/git/wine.git/blob/f72ef20e88fba67254caf0124ab8713e...
--- snip --- 3513 static enum fill_status fill_operatingsystem( struct table *table, const struct expr *cond ) 3514 { 3515 struct record_operatingsystem *rec; 3516 enum fill_status status = FILL_STATUS_UNFILTERED; 3517 OSVERSIONINFOEXW ver; 3518 UINT row = 0; 3519 3520 if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED; 3521 3522 ver.dwOSVersionInfoSize = sizeof(ver); 3523 GetVersionExW( (OSVERSIONINFOW *)&ver ); 3524 3525 rec = (struct record_operatingsystem *)table->data; 3526 rec->buildnumber = get_osbuildnumber( &ver ); 3527 rec->caption = get_oscaption( &ver ); 3528 rec->codeset = get_codeset(); 3529 rec->countrycode = get_countrycode(); 3530 rec->csdversion = ver.szCSDVersion[0] ? heap_strdupW( ver.szCSDVersion ) : NULL; 3531 rec->csname = get_computername(); 3532 rec->currenttimezone = get_currenttimezone(); 3533 rec->freephysicalmemory = get_available_physical_memory() / 1024; 3534 rec->installdate = L"20140101000000.000000+000"; 3535 rec->lastbootuptime = get_lastbootuptime(); 3536 rec->localdatetime = get_localdatetime(); 3537 rec->locale = get_locale(); 3538 rec->manufacturer = L"The Wine Project"; 3539 rec->name = get_osname( rec->caption ); 3540 rec->operatingsystemsku = get_operatingsystemsku(); 3541 rec->osarchitecture = get_osarchitecture(); 3542 rec->oslanguage = GetSystemDefaultLangID(); 3543 rec->osproductsuite = 2461140; /* Windows XP Professional */ 3544 rec->ostype = 18; /* WINNT */ 3545 rec->primary = -1; 3546 rec->serialnumber = get_osserialnumber(); 3547 rec->servicepackmajor = ver.wServicePackMajor; 3548 rec->servicepackminor = ver.wServicePackMinor; 3549 rec->suitemask = 272; /* Single User + Terminal */ 3550 rec->systemdirectory = get_systemdirectory(); 3551 rec->systemdrive = get_systemdrive(); 3552 rec->totalvirtualmemorysize = get_total_physical_memory() / 1024; 3553 rec->totalvisiblememorysize = rec->totalvirtualmemorysize; 3554 rec->version = get_osversion( &ver ); 3555 if (!match_row( table, row, cond, &status )) free_row_values( table, row ); 3556 else row++; 3557 3558 TRACE("created %u rows\n", row); 3559 table->num_rows = row; 3560 return status; 3561 } --- snip ---
This obviously can't work for 'Windows 10' setting.
@winetaste:
--- quote --- Deleting the second condition fixes this problem and after more testing: --- quote ---
There is no need for that. You can simply take advantage of the fact there are 'OR' conditions. To bypass the OS version requirement:
--- snip --- $ wine msiexec -i iTunes64.msi DISABLE_OS_VERSION_CHECK=1 --- snip ---
$ sha1sum iTunes64Setup.exe f9f299710993b5ea5c7bd430afc451bc908b7208 iTunes64Setup.exe
$ du -sh iTunes64Setup.exe 192M iTunes64Setup.exe
$ wine --version wine-6.0-293-gf72ef20e88f
Regards
https://bugs.winehq.org/show_bug.cgi?id=50580
--- Comment #3 from Hans Leidekker hans@meelstraat.net --- Created attachment 69260 --> https://bugs.winehq.org/attachment.cgi?id=69260 patch
Try this patch. GetVersionEx is used in more places in Wine that may need the same treatment.
https://bugs.winehq.org/show_bug.cgi?id=50580
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |ba06f7a541c44343a9751cc6105 | |211c1ef058c49 Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/ba06f7a541c44343a9751cc610... ("wbemprox: Report the real OS version.").
Thanks Hans
iTunes 12.11 installer works now as expected for Win10 setting.
'SetupAdmin144.log':
--- snip --- ... MessageType: INSTALLMESSAGE_INFO Message: Property(S): BUSEROSVERSION = 10 Returning: 0L ... --- snip ---
Also my testcase from comment #2:
--- snip --- $ for ver in win7 win8 win81 win10 ; do \ ( \ export WINEDEBUG=-all echo "======" && \ winecfg -v $ver && \ winecfg -v | tee && \ wine cscript osversion.vbs \ ) ; done
======
win7 BuildNumber: 7601 Caption: Microsoft Windows 7 Professional CSDVersion: Service Pack 1 CSName: LINUX Version: 6.1.7601 ====== win8 BuildNumber: 9200 Caption: Microsoft Windows 8.1 Pro CSDVersion: CSName: LINUX Version: 6.2.9200 ====== 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 --version wine-6.1-70-g433b9081ba7
Regards
https://bugs.winehq.org/show_bug.cgi?id=50580
--- Comment #5 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Anastasius Focht from comment #4)
====== win8 BuildNumber: 9200 Caption: Microsoft Windows 8.1 Pro CSDVersion: CSName: LINUX Version: 6.2.9200 ====== win81 BuildNumber: 9600 Caption: Microsoft Windows 8 Pro CSDVersion: CSName: LINUX Version: 6.3.9600 ======
Looks like descriptions for win8 and win81 are reverted.
https://bugs.winehq.org/show_bug.cgi?id=50580
--- Comment #6 from Anastasius Focht focht@gmx.net --- Hello Dmitry,
--- quote --- Looks like descriptions for win8 and win81 are reverted. --- quote ---
indeed, good spot.
I've created bug 50610 ("WMI 'Win32_OperatingSystem' OS caption property descriptions for Windows 8 and 8.1 are reversed") to track this.
Regards
https://bugs.winehq.org/show_bug.cgi?id=50580
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.2.
https://bugs.winehq.org/show_bug.cgi?id=50580
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.0.x
https://bugs.winehq.org/show_bug.cgi?id=50580
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|6.0.x |---
--- Comment #8 from Michael Stefaniuc mstefani@winehq.org --- Removing the 6.0.x milestone from bug fixes included in 6.0.1.