http://bugs.winehq.org/show_bug.cgi?id=14817
Summary: Msi property names passed on the command line need to be interpreted as uppercase (Corel Draw X3 installer) Product: Wine Version: CVS/GIT Platform: PC URL: http://download.chip.eu/en/CorelDraw-Graphics-Suite-X3- 13.0.0.739_74294.html OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msi AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net
Hello,
while solving bug 10368 I came across another one before hitting bug 2547
Note: To get to this bug one needs my private heap patch for bug 10368 so just believe it for now until AJ provides a fix ;-)
There is a custom action "Set_AKPARAMS_CGS" which lets the installer fail:
--- snip --- 002d:trace:msi:ACTION_CustomAction Handling custom action L"Set_AKPARAMS_CGS" (33 L"AKPARAMS" L"[PCUPath]|[PCUNLRFilename]|[LangPath]|[PCUDllFilename]|[regkey]|[DTAFilename]|[PIDprefix]|[LANG]") .. --- snip ---
There are 8 properties fetched to build the string:
--- snip --- 002d:trace:msi:MSI_GetPropertyW returning L"C:\windows\temp\Corel\6926A426-654D-11DD-879C-000AE4C88BC2\Programs\" for property L"PCUPath" .. 002d:trace:msi:MSI_GetPropertyW returning L"DRPCUNLR.dll" for property L"PCUNLRFilename" .. 002d:trace:msi:MSI_GetPropertyW returning L"C:\windows\temp\Corel\6926A426-654D-11DD-879C-000AE4C88BC2\Languages\DE\Programs\" for property L"LangPath" .. 002d:trace:msi:MSI_GetPropertyW property L"PCUDllFilename" not found .. 002d:trace:msi:MSI_GetPropertyW returning L"SOFTWARE\Corel\TempKey2B9006B6\6926A426-654D-11DD-879C-000AE4C88BC2" for property L"regkey" .. 002d:trace:msi:MSI_GetPropertyW returning L"DR13" for property L"DTAFilename" .. 002d:trace:msi:MSI_GetPropertyW returning L"DR13" for property L"PIDprefix" .. 002d:trace:msi:MSI_GetPropertyW returning L"EN" for property L"LANG" .. --- snip ---
One property "PCUDllFilename" is not found.
The properties are passed on command line:
--- snip --- 002d:Call msi.MsiInstallProductA(00a00b40 "C:\windows\temp\CorelPreInstall.msi",00a00be0 "ACTIONTODO="AcquireKey" MAIN_INSTALL_DLG_TITLE="Setup Initialization" SERIALNUMBER="DR13WTX-9999998-YSP" USERNAME="" PCUSOURCEID="100001" PRODUCT_REGKEY="CorelDRAW\13.0" LANG="EN" PCU_SUBFOLDER="Programs\" PCUNLRFILENAME="DRPCUNLR.dll" PCU_LANG_SUBFOLDER="Languages\DE\Programs\"...) ret=1000372b --- snip ---
Debug/relay truncated it, here is the full command line (formatted one property per line):
--- snip --- ACTIONTODO="AcquireKey" MAIN_INSTALL_DLG_TITLE="Setup Initialization" SERIALNUMBER="DR13WTX-9999998-YSP" USERNAME="" PCUSOURCEID="100001" PRODUCT_REGKEY="CorelDRAW\13.0" LANG="EN" PCU_SUBFOLDER="Programs" PCUNLRFILENAME="DRPCUNLR.dll" PCU_LANG_SUBFOLDER="Languages\DE\Programs" PCU_LANG_RELATIVE_PATH="..\Languages\DE\Programs" PCUDllFilename="PCUDataIntl.dll" PIDPREFIX="DR13" DTAFILENAME="DR13" PCUURLLANG="DE" --- snip ---
All property names are hard coded literals in this brain damaged installer and "PCUDllFilename" was the only one not passed as uppercase. Probably not intended but completely valid.
Next, these properties are set within msi_parse_command_line(). Because wine msi takes the property names as case sensitive, the property "PCUDllFilename" is set with value "PCUDataIntl.dll" (and not "PCUDLLFILENAME").
A bit later, a custom action for each property maps the property names again to its case-dependant representation:
--- snip --- 002d:trace:msi:ACTION_CustomAction Handling custom action L"Set_PCUDllFilename" (33 L"PCUDllFilename" L"[PCUDLLFILENAME]") .. 002d:trace:msi:MSI_FormatRecordW (L"[PCUDLLFILENAME]") .. 002d:trace:msi:MSI_DatabaseOpenViewW L"SELECT `Value` FROM `_Property` WHERE `_Property`='PCUDLLFILENAME'" 0x7ed3cf9c .. 002d:trace:msi:MSI_GetPropertyW property L"PCUDLLFILENAME" not found --- snip ---
Because "PCUDLLFILENAME" wasn't found due to msi command line bug, "PCUDllFilename" will be overwritten with empty string, leading to later failure.
My fix was to convert all property passed to msi_parse_command_line() to uppercase. This lets the installer proceed further - only to run into bug 2547
MSDN info here: http://msdn.microsoft.com/en-us/library/aa367988.aspx
--- quote --- .. Only public properties can be modified using the command line. All property names on the command line are interpreted as uppercase but the value retains case sensitivity. If you enter MyProperty at a command line, the installer overrides the value of MYPROPERTY and not the value of MyProperty in the Property table. --- quote ---
Regards