https://bugs.winehq.org/show_bug.cgi?id=50809
Bug ID: 50809 Summary: Multiple .NET 4.x application installers fail due to 'MsiNetAssemblySupport' property returning incorrect version (IronPython 2.7.5) Product: Wine Version: 6.4 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: msi Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
as it says. Found while checking Atmel Studio 7 full installer logs after running in silent install mode.
The 'IronPython' sub-installer is reported to have failed, although the failure is not treated as critical for overall install result.
Main installer log:
--- snip --- ... [0020:0024][2021-03-15T17:41:16]i323: Registering package dependency provider: {08B74EC9-BC55-418A-A5AA-E589DA2B96C0}, version: 2.7.51000.0, package: IronPython [0100:0104][2021-03-15T17:41:16]i000: VisualInstaller : Message: ExecutePackageBegin [0020:0024][2021-03-15T17:41:16]i301: Applying execute package: IronPython, action: Install, path: C:\ProgramData\Package Cache{08B74EC9-BC55-418A-A5AA-E589DA2B96C0}v2.7.51000.0\IronPython-2.7.5.msi, arguments: ' ALLUSERS="1" MSIFASTINSTALL="7"' [0020:0024][2021-03-15T17:41:16]e000: Error 0x80070643: Failed to install MSI package. [0020:0024][2021-03-15T17:41:16]e000: Error 0x80070643: Failed to execute MSI package. [0100:0104][2021-03-15T17:41:16]e000: Error 0x80070643: Failed to configure per-machine MSI package. [0100:0104][2021-03-15T17:41:16]i000: VisualInstaller : Message: ExecutePackageComplete [0100:0104][2021-03-15T17:41:16]i000: VisualInstaller : Message: Setting result for package: IronPython, Status=-2147023293 [0100:0104][2021-03-15T17:41:16]w350: Applied non-vital package: IronPython, encountered error: 0x80070643. Continuing... --- snip ---
Single installer package can be found here:
https://github.com/IronLanguages/main/releases/tag/ipy-2.7.5
https://github.com/IronLanguages/main/releases/download/ipy-2.7.5/IronPython...
Created stable download link via Internet Archive:
https://web.archive.org/web/20210315174711/https://github.com/IronLanguages/...
Running the installer results in a message box 'IronPython 2.7.5 requires .NET Framework 4.0 or later.' even though native .NET Framework 4.x (4.8) is installed in the 64-WINEPREFIX.
Dumping the Launch condition from 'IronPython-2.7.5.msi' with ORCA:
--- snip --- Installed OR MsiNetAssemblySupport >= "4.0.0.0" [ProductName] requires .NET Framework 4.0 or later. --- snip ---
Relevant part of trace log:
--- snip --- $ WINEDEBUG=+seh,+relay,+msi,+reg,+server wine msiexec -i IronPython-2.7.5.msi
log.txt 2>&1
... 0024:Call advapi32.RegOpenKeyExW(ffffffff80000002,1800ad2ac L"Software\Microsoft\NET Framework Setup\NDP",00000000,00000004,0022ea58) ret=18005c327 ... 0024:Ret advapi32.RegOpenKeyExW() retval=00000000 ret=18005c327 0024:Call advapi32.RegCreateKeyExW(00000098,1800ad302 L"v4\Client",00000000,00000000,00000000,00000001,00000000,0022ea68,00000000) ret=18005c374 ... 0024:Ret advapi32.RegCreateKeyExW() retval=00000000 ret=18005c374 ... 0024:Call advapi32.RegQueryValueExW(0000009c,1800ad316 L"InstallPath",00000000,0022ea7c,0022f080,0022ea74) ret=18005c3b2 ... 0024:Call ntdll.NtQueryValueKey(0000009c,0022e7a0,00000002,0022e7b0,00000100,0022e79c) ret=7b046a18 0024:trace:reg:NtQueryValueKey (0x9c,L"InstallPath",2,0x22e7b0,256) 0024: get_key_value( hkey=009c, name=L"InstallPath" ) 0024: get_key_value() = 0 { type=1, total=98, data={43,00,3a,00,5c,00,77,00,69,00,6e,00,64,00,6f,00,77,00,73,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,2e,00,4e,00,45,00,54,00,5c,00,46,00,72,00,61,00,6d,00,65,00,77,00,6f,00,72,00,6b,00,36,00,34,00,5c,00,76,00,34,00,2e,00,30,00,2e,00,33,00,30,00,33,00,31,00,39,00,5c,00,00,00} } 0024:Ret ntdll.NtQueryValueKey() retval=00000000 ret=7b046a18 0024:Call ntdll.memcpy(0022f080,0022e7bc,00000062) ret=7b046b01 0024:Ret ntdll.memcpy() retval=0022f080 ret=7b046b01 0024:Call ntdll.RtlNtStatusToDosError(00000000) ret=7b046b8d 0024:Ret ntdll.RtlNtStatusToDosError() retval=00000000 ret=7b046b8d 0024:Ret kernelbase.RegQueryValueExW() retval=00000000 ret=7bc437cf 0024:Ret advapi32.RegQueryValueExW() retval=00000000 ret=18005c3b2 0024:Call ntdll.RtlAllocateHeap(00020000,00000000,00000078) ret=18005c9bf 0024:Ret ntdll.RtlAllocateHeap() retval=00100eb0 ret=18005c9bf 0024:Call KERNEL32.GetFileAttributesW(00100eb0 L"\fusion.dll") ret=18005ca06 ... 0024:Ret KERNEL32.GetFileAttributesW() retval=ffffffff ret=18005ca06 0024:Call advapi32.RegCloseKey(0000009c) ret=18005c3c4 ... 0024:Ret advapi32.RegCloseKey() retval=00000000 ret=18005c3c4 ... 0024:trace:msi:msi_set_property 00000000000C61F0 L"MsiNetAssemblySupport" L"2.0.50727.4016" -1 ... 0024:Call user32.MessageBoxW(00000000,0010c850 L"IronPython 2.7.5 requires .NET Framework 4.0 or later.",18009f418 L"Install Failed",00000000) ret=18000f47e --- snip ---
Wine source:
https://source.winehq.org/git/wine.git/blob/4336ed0b84b3dd3097bbbbf8e4b9de2e...
--- snip --- 516 static LPWSTR get_fusion_filename(MSIPACKAGE *package) 517 { 518 HKEY netsetup, hkey; 519 LONG res; 520 DWORD size, len, type; 521 WCHAR windir[MAX_PATH], path[MAX_PATH], *filename = NULL; 522 523 res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\Microsoft\NET Framework Setup\NDP", 0, KEY_CREATE_SUB_KEY, 524 &netsetup); 525 if (res != ERROR_SUCCESS) 526 return NULL; 527 528 if (!RegCreateKeyExW(netsetup, L"v4\Client", 0, NULL, 0, KEY_QUERY_VALUE, NULL, &hkey, NULL)) 529 { 530 size = ARRAY_SIZE(path); 531 if (!RegQueryValueExW(hkey, L"InstallPath", NULL, &type, (BYTE *)path, &size)) 532 { 533 len = lstrlenW(path) + lstrlenW(L"fusion.dll") + 2; 534 if (!(filename = msi_alloc(len * sizeof(WCHAR)))) return NULL; 535 536 lstrcpyW(filename, path); 537 lstrcpyW(filename, L"\"); 538 lstrcatW(filename, L"fusion.dll"); 539 if (GetFileAttributesW(filename) != INVALID_FILE_ATTRIBUTES) 540 { 541 TRACE( "found %s\n", debugstr_w(filename) ); 542 RegCloseKey(hkey); 543 RegCloseKey(netsetup); 544 return filename; 545 } 546 } 547 RegCloseKey(hkey); 548 } 549 550 if (!RegCreateKeyExW(netsetup, L"v2.0.50727", 0, NULL, 0, KEY_QUERY_VALUE, NULL, &hkey, NULL)) 551 { 552 RegCloseKey(hkey); 553 GetWindowsDirectoryW(windir, MAX_PATH); 554 len = lstrlenW(windir) + lstrlenW(L"Microsoft.NET\Framework\") + lstrlenW(L"v2.0.50727") + 555 lstrlenW(L"fusion.dll") + 3; 556 if (!(filename = msi_alloc(len * sizeof(WCHAR)))) return NULL; 557 558 lstrcpyW(filename, windir); 559 lstrcatW(filename, L"\"); 560 lstrcatW(filename, L"Microsoft.NET\Framework\"); 561 lstrcatW(filename, L"v2.0.50727"); 562 lstrcatW(filename, L"\"); 563 lstrcatW(filename, L"fusion.dll"); 564 if (GetFileAttributesW(filename) != INVALID_FILE_ATTRIBUTES) 565 { 566 TRACE( "found %s\n", debugstr_w(filename) ); 567 RegCloseKey(netsetup); 568 return filename; 569 } 570 } 571 572 RegCloseKey(netsetup); 573 return filename; 574 } --- snip ---
The .NET Framework 4.x base install path queried from registry is overwritten by the copying of backslash into filename buffer. Line 537 should have been 'lstrcatW'.
This is a regression introduced by commit https://source.winehq.org/git/wine.git/commitdiff/731bb72c3d00b089ee23297efd... ("msi: Use wide character string literals in package.c.").
Part of Wine 5.21 release.
I'm surprised it took that long until someone ran into this problem.
$ sha1sum IronPython-2.7.5.msi 8f51858be07d58f5d713eeb76a60268684d1471c IronPython-2.7.5.msi
$ du -sh IronPython-2.7.5.msi 16M IronPython-2.7.5.msi
$ wine --version wine-6.4
Regards
https://bugs.winehq.org/show_bug.cgi?id=50809
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, Installer, | |regression URL| |https://web.archive.org/web | |/20210315174711/https://git | |hub.com/IronLanguages/main/ | |releases/download/ipy-2.7.5 | |/IronPython-2.7.5.msi CC| |hans@meelstraat.net Regression SHA1| |731bb72c3d00b089ee23297efdf | |e0496733e96a4
https://bugs.winehq.org/show_bug.cgi?id=50809
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |46424c6196a7b544ff6173d544f | |c120cc9f804d9 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/46424c6196a7b544ff6173d544... ("msi: Fix building the fusion filename.").
Thanks Hans.
$ wine --version wine-6.4-86-g4d5824112e1
Regards
https://bugs.winehq.org/show_bug.cgi?id=50809
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.5.
https://bugs.winehq.org/show_bug.cgi?id=50809
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.0.x
https://bugs.winehq.org/show_bug.cgi?id=50809
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|6.0.x |---
--- Comment #3 from Michael Stefaniuc mstefani@winehq.org --- Removing the 6.0.x milestone from bug fixes included in 6.0.2.