https://bugs.winehq.org/show_bug.cgi?id=35833
Bug ID: 35833 Summary: iTunes 7 installer aborts early (automation methods HRESULT incorrectly translated to VBScript runtime Err.number) Product: Wine Version: 1.7.14 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net
Hello folks,
now the VBScript runtime error object and exception handling is implemented the next thing :)
Trace log:
--- snip --- $ WINEDEBUG=+tid,+seh,+relay,+msi,+vbscript,+ole,+variant wine ./iTunesSetup7.exe >>log.txt 2>&1 ... 0039:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"DetectGEARDriverSetDeletion", clsid {000c109e-0000-0000-c000-000000000046} ... 0039:trace:msi:AutomationObject_AddRef (0x183370/0x183370) 0039:trace:vbscript:interp_errmode 1 0039:trace:vbscript:interp_short 2 0039:Call oleaut32.SysAllocString(001f3988 L"SYSTEM\CurrentControlSet\Services\GearAspiWDM") ret=f7343052 0039:trace:ole:SysAllocStringLen L"SYSTEM\CurrentControlSet\Services\GearAspiWDM" 0039:Ret oleaut32.SysAllocString() retval=001f6284 ret=f7343052 0039:trace:vbscript:interp_string 0039:Call oleaut32.SysAllocString(001f39e4 L"DeleteFlag") ret=f7343052 0039:trace:ole:SysAllocStringLen L"DeleteFlag" 0039:Ret oleaut32.SysAllocString() retval=001f97b4 ret=f7343052 0039:trace:vbscript:interp_icall ... 0039:trace:msi:AutomationObject_Invoke Method 11, L"RegistryValue" ... 0039:Call advapi32.RegOpenKeyW(80000002,001f6464 L"SYSTEM\CurrentControlSet\Services\GearAspiWDM",0064df10) ret=7ecdc24c 0039:Ret advapi32.RegOpenKeyW() retval=00000002 ret=7ecdc24c 0039:Call oleaut32.VariantClear(0064def0) ret=7ecdc67d 0039:trace:variant:VariantClear (0x64def0->(VT_I4)) 0039:Ret oleaut32.VariantClear() retval=00000000 ret=7ecdc67d 0039:Call oleaut32.VariantClear(0064dee0) ret=7ecdc68b 0039:trace:variant:VariantClear (0x64dee0->(VT_BSTR)) 0039:Ret oleaut32.VariantClear() retval=00000000 ret=7ecdc68b 0039:Call oleaut32.VariantClear(0064ded0) ret=7ecdc699 0039:trace:variant:VariantClear (0x64ded0->(VT_BSTR)) 0039:Ret oleaut32.VariantClear() retval=00000000 ret=7ecdc699 0039:Call advapi32.RegCloseKey(00000000) ret=7ecdc6a7 0039:Ret advapi32.RegCloseKey() retval=00000006 ret=7ecdc6a7 0039:Call oleaut32.SysFreeString(001f60f4 L"RegistryValue") ret=7ecd7ea6 0039:Ret oleaut32.SysFreeString() retval=00000000 ret=7ecd7ea6 0039:trace:msi:AutomationObject_Invoke Returning 0x8002000b, not ok 0039:trace:msi:AutomationObject_Release (0x185e38/0x185e38) 0039:warn:vbscript:exec_script Failed 8002000b in resume next mode 0039:trace:vbscript:exec_script unwind jmp 642 stack_off 0 ... 0039:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"Err", clsid {000c109e-0000-0000-c000-000000000046} 0039:trace:vbscript:DispatchEx_AddRef (0x1d92c8) ref=2 0039:trace:vbscript:interp_mcall 0039:trace:ole:ITypeInfo_fnGetIDsOfNames (0x1d8de0) Name L"number" cNames 1 ... 0039:trace:vbscript:Err_Number 0039:trace:vbscript:DispatchEx_Release (0x1d92c8) ref=2 0039:trace:vbscript:DispatchEx_Release (0x1d92c8) ref=1 0039:trace:vbscript:interp_short 9 0039:trace:vbscript:interp_nequal 0039:trace:vbscript:var_cmp {VT_I4: -2147352565} {VT_I2: 9} 0039:Call oleaut32.VarCmp(001f5f70,001f5f80,00000000,00000000) ret=f73439a1 ... 0039:Call oleaut32.VariantClear(001f5f70) ret=f733fecd 0039:trace:variant:VariantClear (0x1f5f70->(VT_I4)) 0039:Ret oleaut32.VariantClear() retval=00000000 ret=f733fecd 0039:Call oleaut32.VariantClear(001f5f80) ret=f733fecd 0039:trace:variant:VariantClear (0x1f5f80->(VT_I2)) 0039:Ret oleaut32.VariantClear() retval=00000000 ret=f733fecd 0039:trace:vbscript:interp_jmp_false 667 ... 0037:Call user32.MessageBoxW(00000000,001e6d38 L"Unable to install the GEAR driver set at this time. The GEARAspiWDM service use by the GEAR driver set is scheduled to be deleted during the next system reboot. Please reboot the system and run iTunes again.",7ed51b92 L"Install Failed",00000000) ret=7ecc3d83 --- snip ---
The relevant VBScript snippet:
--- snip --- Sub DetectGEARDriverSetDeletion Dim DeleteFlag
On Error Resume Next DeleteFlag = Session.Installer.RegistryValue(2,"SYSTEM\CurrentControlSet\Services\GearAspiWDM", "DeleteFlag") If Err.number <> 9 Then If IsNumeric(DeleteFlag) Then Session.Property("GEARASPIWDM_SERVICE_DELETED") = "#" + CStr(DeleteFlag) Else Session.Property("GEARASPIWDM_SERVICE_DELETED") = DeleteFlag End If End If End Sub --- snip ---
MSDN: http://msdn.microsoft.com/en-us/library/aa369471%28v=vs.85%29.aspx
--- quote --- The RegistryValue method of the Installer object reads information about a specified registry key of value. If the key or value specified does not exist, the method returns an error of 9, "Subscript out of Range." --- quote ---
Wine MSI InstallerImpl_RegistryValue() returns HRESULT = 0x8002000B (DISP_E_BADINDEX) which seems to be right. This code needs to be translated to VBScript runtime error code. The equivalent would be something like 0x800A0009 ... if one searches for "Subscript out of Range." and "VBscript".
Source: http://source.winehq.org/git/wine.git/blob/fc0ef22a44dee4f78b8784ada501bb8f0...
--- snip --- 2030 HRESULT exec_script(script_ctx_t *ctx, function_t *func, vbdisp_t *vbthis, DISPPARAMS *dp, VARIANT *res) 2031 { 2032 exec_ctx_t exec = {func->code_ctx}; 2033 vbsop_t op; 2034 HRESULT hres = S_OK; 2035 2036 exec.code = func->code_ctx; ... 2106 while(exec.instr) { 2107 op = exec.instr->op; 2108 hres = op_funcs[op](&exec); 2109 if(FAILED(hres)) { 2110 ctx->err_number = hres; 2111 2112 if(exec.resume_next) { ... --- snip ---
$ sha1sum iTunesSetup7.exe 5cdc86b2edb1411b9a022f05b1bfbe858fbcf901 iTunesSetup7.exe
$ du -sh iTunesSetup7.exe 35M iTunesSetup7.exe
$ wine --version wine-1.7.14-234-g6e7440e
Regards
https://bugs.winehq.org/show_bug.cgi?id=35833
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, Installer URL| |http://www.oldapps.com/itun | |es.php?old_itunes=15?downlo | |ad&ModPagespeed=noscript
http://bugs.winehq.org/show_bug.cgi?id=35833
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair@hotmail.com
http://bugs.winehq.org/show_bug.cgi?id=35833
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |4effb57f8862c90b5004c0045d2 | |4b5fd13400b2d Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commits:
http://source.winehq.org/git/wine.git/commitdiff/ccf15675557c437a048e6895ec7... ("vbscript: Map some known error codes to vbscript errors.")
http://source.winehq.org/git/wine.git/commitdiff/4effb57f8862c90b5004c0045d2... ("vbscript: Return only code part of HRESULT for vbscript errors as Err.number.")
Thanks Jacek
The installer now runs to completion without the need of winetricks recipes/overrides ;-)
Regards
https://bugs.winehq.org/show_bug.cgi?id=35833
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.16.
https://bugs.winehq.org/show_bug.cgi?id=35833
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.oldapps.com/itun |https://web.archive.org/web |es.php?old_itunes=15?downlo |/20170926181542/http://appl |ad&ModPagespeed=noscript |dnld.apple.com/iTunes7/Win/ | |061-2768.20060926.tnwN1/iTu | |nesSetup.exe
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello folks,
adding stable download link via Internet Archive for documentation.
https://www.virustotal.com/gui/file/dcfa03446b895b3cd850dcef737489a9df346e05...
$ sha1sum iTunesSetup.exe 9b6800b490c550d02dc590516b5718da0d3c3f46 iTunesSetup.exe
$ du -sh iTunesSetup.exe 35M iTunesSetup.exe
Regards