http://bugs.winehq.org/show_bug.cgi?id=14875
Summary: VS 2008 Express Editions (SP1) installer fails with directory resolution error (bug in msi appsearch action) Product: Wine Version: CVS/GIT Platform: PC URL: http://www.microsoft.com/express/download/ OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msi AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net
Hello,
downloaded full DVD image of Visual Studio 2008 Express Edition with SP1.
Minimal set of prerequisites needed to reproduce this bug:
1. sh winetricks volnum (bug 5351) 2. MsiSetExternalUIRecord patch (bug 10547)
The installer stops with error "directory resolution failed".
--- snip --- 002c:Call msi.MsiGetPropertyW(00000001,00cee4c8 L"VS7.3643236F_FC70_11D3_A536_0090278A1BB8",39e262f8,0032ab10) ret=39e55231 002c:trace:msi:MSI_GetProperty 1 L"VS7.3643236F_FC70_11D3_A536_0090278A1BB8" 0x39e262f8 0x32ab10 .. 002c:trace:msi:MSI_DatabaseOpenViewW L"SELECT `Value` FROM `_Property` WHERE `_Property`='VS7.3643236F_FC70_11D3_A536_0090278A1BB8'" 0x32a9c4 .. 002c:Ret msi.MsiGetPropertyW() retval=000000ea ret=39e55231 .. 002c:Call KERNEL32.FormatMessageW(00000b00,3aa70000,0000108e,00000400,0032a7bc,00000000,00000000) ret=39ea74fb 002c:Ret KERNEL32.FormatMessageW() retval=00000024 ret=39ea74fb .. 002c:Call oleaut32.SysAllocString(00cdcd08 L"Microsoft Visual C++ 2008 Express Edition with SP1 - DEU") ret=39e4bc58 .. 002c:Call oleaut32.SysAllocString(00cee978 L"VS7.3643236F_FC70_11D3_A536_0090278A1BB8: Fehler bei Verzeichnisaufl\00f6sung.") ret=39e4bc58 .. 002c:Call oleaut32.SysFreeString(010ab66c L"ERROR processed; exception was thrown for retail build\n\tDeveloper Comment: \n\tBuild Time: Thu Dec 11 15:04:18 2003\n\tDWORD: 234") ret=39e40e56 .. 002c:Call oleaut32.SysFreeString(010ab5ec L"Microsoft Visual C++ 2008 Express Edition with SP1 - DEU") ret=39e40e5f .. 002c:Call KERNEL32.RaiseException(e06d7363,00000001,00000003,0032a9d8) ret=39e80d28 002c:trace:seh:raise_exception code=e06d7363 flags=1 addr=0x7b8433b0 --- snip ---
Property "VS7.3643236F_FC70_11D3_A536_0090278A1BB8" (= Visual Studio install directory) does not exist (anymore) at this install stage.
Besides from a bug in dlls/msi/install.c:msi_strcpy_to_awstring(), which results in wrong ERROR_MORE_DATA for empty unicode strings (see previous snippet, str=L"" + len=0), the following sequences lead to this bug...
The installation directory property is created/set first here:
--- snip --- .. 002c:trace:msi:MsiDoActionW L"CA_SetVcvars32batProp_x86_deu.3643236F_FC70_11D3_A536_0090278A1BB8" 002c:trace:msi:ACTION_PerformUIAction Performing action (L"CA_SetVcvars32batProp_x86_deu.3643236F_FC70_11D3_A536_0090278A1BB8") .. 002c:trace:msi:ACTION_CustomAction Handling custom action L"CA_SetVcvars32batProp_x86_deu.3643236F_FC70_11D3_A536_0090278A1BB8" (33 L"CA_SetVcvars32bat_x86_deu.3643236F_FC70_11D3_A536_0090278A1BB8" L"[#FL_vsvars_bat_10582_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8];[#FL_vcvars32_bat_5369_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8];@SET VSINSTALLDIR=[VS7.3643236F_FC70_11D3_A536_0090278A1BB8]|@SET VCINSTALLDIR=[VC7.3643236F_FC70_11D3_A536_0090278A1BB8]|@SET FrameworkDir=[Framework_x86.3643236F_FC"...) .. 002c:trace:msi:MSI_GetPropertyW returning L"C:\Program Files\Microsoft Visual Studio 9.0\" for property L"VS7.3643236F_FC70_11D3_A536_0090278A1BB8" .. --- snip ---
("@SET VSINSTALLDIR=[VS7.3643236F_FC70_11D3_A536_0090278A1BB8]")
But is removed/reset at later install stage, when this custom action is run:
--- snip --- 002c:trace:msi:ACTION_CustomAction Handling custom action L"CA_VIntegration_Exec_VS7_x86_deu.3643236F_FC70_11D3_A536_0090278A1BB8" (33 L"VS7.3643236F_FC70_11D3_A536_0090278A1BB8" L"[VS7.3643236F_FC70_11D3_A536_0090278A1BB8_RO.3643236F_FC70_11D3_A536_0090278A1BB8]") 002c:trace:msidb:MSI_CreateRecord 1 .. 002c:trace:msi:MSI_GetPropertyW property L"VS7.3643236F_FC70_11D3_A536_0090278A1BB8_RO.3643236F_FC70_11D3_A536_0090278A1BB8" not found .. 002c:trace:msi:MSI_SetPropertyW 0xbcbec8 L"VS7.3643236F_FC70_11D3_A536_0090278A1BB8" L"" .. 002c:trace:msi:MSI_GetPropertyW property L"VS7.3643236F_FC70_11D3_A536_0090278A1BB8" not found 002c:trace:msi:MSI_DatabaseOpenViewW L"DELETE FROM `_Property` WHERE `_Property` = 'VS7.3643236F_FC70_11D3_A536_0090278A1BB8'" 0x32b298 .. --- snip ---
The removal/reset was due to property L"VS7.3643236F_FC70_11D3_A536_0090278A1BB8_RO.3643236F_FC70_11D3_A536_0090278A1BB8" not existing.
Using ORCA tool on msi setup database, one can find this property referenced in "AppSearch" table:
--- snip --- Property ; Signature VS7.3643236F_FC70_11D3_A536_0090278A1BB8_RO.3643236F_FC70_11D3_A536_0090278A1BB8 VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8 --- snip ---
Signature is "VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8"
"CompLocator" table:
--- snip --- Signature ; ComponentId ; Type VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8 {2883180F-8F0F-4B82-B0BA-D48CE920DFAF} 0 --- snip ---
"Component" table:
--- snip --- Component ; ComponentId ; Directory ; Attribute ; Condition ; KeyPath VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8 {2883180F-8F0F-4B82-B0BA-D48CE920DFAF} VS7.3643236F_FC70_11D3_A536_0090278A1BB8 0 --- snip ---
Armed with this information, one can find the following in trace log:
--- snip --- 002c:trace:msi:iterate_appsearch L"VS7.3643236F_FC70_11D3_A536_0090278A1BB8_RO.3643236F_FC70_11D3_A536_0090278A1BB8" L"VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" 002c:trace:msi:ACTION_AppSearchGetSignature package 0xbcbec8, sig 0x32b304 .. 002c:trace:msi:ACTION_AppSearchGetSignature failed to query signature for L"VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" 002c:trace:msi:ACTION_AppSearchComponents L"VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" .. .. 002c:trace:msi:MsiLocateComponentW L"{2883180F-8F0F-4B82-B0BA-D48CE920DFAF}" 0x32b040 0x32b248 002c:trace:msi:MsiGetProductCodeW L"{2883180F-8F0F-4B82-B0BA-D48CE920DFAF}" 0x32afae .. 002c:trace:msi:MSIREG_OpenUserDataComponentKey L"{2883180F-8F0F-4B82-B0BA-D48CE920DFAF}" .. 002c:trace:msi:MSIREG_OpenUserDataComponentKey squished (L"F0813882F0F828B40BAB4DC89E02FDFA") .. 002c:trace:msi:ACTION_AppSearchReg L"VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" .. 002c:trace:msi:ACTION_AppSearchReg failed to query RegLocator for L"VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" 002c:trace:msi:ACTION_AppSearchIni L"VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" .. 002c:trace:msi:ACTION_AppSearchIni failed to query IniLocator for L"VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" 002c:trace:msi:ACTION_AppSearchDr L"VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" .. 002c:trace:msi:ACTION_AppSearchDr failed to query DrLocator for L"VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" .. --- snip ---
This results in property "VS7.3643236F_FC70_11D3_A536_0090278A1BB8_RO.3643236F_FC70_11D3_A536_0090278A1BB8" and depending property "VS7.3643236F_FC70_11D3_A536_0090278A1BB8" reset.
MSDN info for AppSearch table here: http://msdn.microsoft.com/en-us/library/aa367579.aspx
and AppSearch action: http://msdn.microsoft.com/en-us/library/aa367578.aspx
Specifically:
--- quote --- The AppSearch action requires that the Signature table be present in the installation package. [..] A signature that is not in the Signature table denotes a directory and the action sets the property to the directory path for that signature. --- quote ---
This "VInt_VS7_X86_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" key is not present in "Signature" table, it's actually a directory.
If we look in the previously posted "Component" table we see the directory is actually "VS7.3643236F_FC70_11D3_A536_0090278A1BB8"
By looking into "Directory" table we find the following:
--- snip --- Directory ; Directory Parent ; DefaultDir VS7.3643236F_FC70_11D3_A536_0090278A1BB8 ProgramFilesFolder_x86.3643236F_FC70_11D3_A536_0090278A1BB8 VS90.NET|Microsoft Visual Studio 9.0 --- snip ---
So "VS7.3643236F_FC70_11D3_A536_0090278A1BB8_RO.3643236F_FC70_11D3_A536_0090278A1BB8" should resolve to "VS7.3643236F_FC70_11D3_A536_0090278A1BB8" -> L"C:\Program Files\Microsoft Visual Studio 9.0\" (install dir)
This looks like bug in wine msi appsearch action impl.
Regards