http://bugs.winehq.org/show_bug.cgi?id=24200
Summary: msi: properly handle msidbComponentAttributes64bit attribute to support x64 installers that mix architectures in a single MSI package (32-bit and 64-bit components, filesystem, registry) Product: Wine Version: 1.3.1 Platform: x86-64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: msi AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net
Hello,
one of the main problems with current Wine msi is there are x64 installers that mix architectures in a single MSI package: 64-bit and 32-bit components (without a separate 32-bit installer for 32-bit components).
Basically 'msidbComponentAttributes64bit' is not handled.
Example: "mscoree.dll" -> .NET bootstrapper
"Component" table:
--- snip 32-bit --- MSCOREE_DLL_____X86.3643236F_FC70_11D3_A536_0090278A1BB8 {173A6EB3-6403-11D4-A53F-0090278A1BB8} DD_SystemFolder_X86.3643236F_FC70_11D3_A536_0090278A1BB8 8 FL_mscoree_dll_____X86.3643236F_FC70_11D3_A536_0090278A1BB8 --- snip 32-bit ---
Attributes = 8
--- snip 64-bit --- MSCOREE_DLL_____A64.3643236F_FC70_11D3_A536_0090278A1BB8 {70B495DC-D747-4182-B6D7-86C8A2244B25} SystemFolder.3643236F_FC70_11D3_A536_0090278A1BB8 264 FL_mscoree_dll_____A64.3643236F_FC70_11D3_A536_0090278A1BB8 --- snip 64-bit ---
Attributes = 264 (256 = msidbComponentAttributes64bit + 8)
When it comes to "InstallFiles" action:
--- snip 32-bit component --- 001b:trace:msi:msi_get_property returning L"C:\windows\system32\" for property L"DD_SystemFolder_X86.3643236F_FC70_11D3_A536_0090278A1BB8" ... 001b:Call KERNEL32.MultiByteToWideChar(00000000,00000000,7fffe7ce1110 "FL_mscoree_dll_____X86.3643236F_FC70_11D3_A536_0090278A1BB8",ffffffff,7fffe7d4ba00,7fff0000003c) ret=7fffed8ff38c ... 001b:trace:msi:resolve_folder Working to resolve L"DD_SystemFolder_X86.3643236F_FC70_11D3_A536_0090278A1BB8" ... 001b:trace:msi:cabinet_copy_file extracting L"C:\windows\system32\mscoree.dll" 001b:Call KERNEL32.CreateFileW(7fffe7d0b980 L"C:\windows\system32\mscoree.dll",c0000000,00000000,00000000,7fff00000002,7fff00000080,00000000) ret=7fffed8ff409 001b:Ret KERNEL32.CreateFileW() retval=000000ac ret=7fffed8ff409 --- snip 32-bit component ---
--- snip 64-bit component --- 001b:trace:msi:msi_get_property returning L"C:\windows\system32\" for property L"SystemFolder.3643236F_FC70_11D3_A536_0090278A1BB8" ... 001b:Call KERNEL32.MultiByteToWideChar(00000000,00000000,7fffe7d247a0 "FL_mscoree_dll_____A64.3643236F_FC70_11D3_A536_0090278A1BB8",ffffffff,7fffe7d15ab0,0000003c) ret=7fffed8ff38c ... 001b:trace:msi:resolve_folder Working to resolve L"SystemFolder.3643236F_FC70_11D3_A536_0090278A1BB8" ... 001b:trace:msi:cabinet_copy_file extracting L"C:\windows\system32\mscoree.dll" 001b:Call KERNEL32.CreateFileW(7fffe7d15b40 L"C:\windows\system32\mscoree.dll",c0000000,00000000,00000000,7fff00000002,00000080,00000000) ret=7fffed8ff409 001b:Ret KERNEL32.CreateFileW() retval=000000b0 ret=7fffed8ff40 --- snip 64-bit component ---
The first extracted 32-bit version that gets (incorrectly) extracted to system32 folder (remember: we're 64-bit install here) and subsequently gets overwritten with 64-bit version later.
For the registry the same applies: In order to create registry values in 64bit HKLM for components marked with "msidbComponentAttributes64bit" there is nothing to change in 64-bit installs.
For 32-bit components (attrs < 256) the registry stuff must go to Wow6432Node. Ideally Wine's msi should also support something like "msidbComponentAttributesDisableRegistryReflection" to allow 32-bit components to write into 64bit HKLM but that's not required for now.
Regards