https://bugs.winehq.org/show_bug.cgi?id=10085
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Installer CC| |focht@gmx.net Component|-unknown |msi Hardware|Other |x86 OS|other |Linux
--- Comment #27 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
The file in question is created during a custom action in a temp location 'C:\users\focht\Temp\install.adb'.
The same action inserts an entry into 'MoveFile' table to have the file moved to its final location.
--- snip --- $ WINEDEBUG=+tid,+seh,+relay,+msi wine msiexec -i Adobe\ Bridge\ 1.0.msi
log.txt 2>&1
... 0023:trace:msi:ACTION_PerformUIAction Performing action (L"AMT_WriteInstallationMetadata") ... 0023:trace:msi:ACTION_CustomAction Handling custom action L"AMT_WriteInstallationMetadata" (1 L"AppManagementCALib.63EDEF4F_3240_49D0_A302_3AE1D1DA43F6" L"AMT_WriteInstallationMetadata") ... 0023:trace:msi:HANDLE_CustomType1 Calling function L"AMT_WriteInstallationMetadata" from L"C:\users\focht\Temp\msi44ef.tmp" ... 0025:trace:msi:ACTION_CallDllFunction calling L"AMT_WriteInstallationMetadata" ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b1058 "(Adobe) BEGIN - AMT_WriteInstallationMetadata ") ret=00590d5c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b0fa0 "(Adobe) Requesting property: INSTALLDIR ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b10c8 "(Adobe) Value: C:\Program Files\Adobe\Adobe Bridge\ ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b10b0 "(Adobe) Writing XML to filepath: C:\users\focht\Temp\install.adb ") ret=0059110c ... 0025:Call KERNEL32.CreateFileA(017b0cf0 "C:\users\focht\Temp\install.adb",40000000,00000003,019be5dc,00000002,00000080,00000000) ret=005a12b5 0025:Ret KERNEL32.CreateFileA() retval=00000094 ret=005a12b5 ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b1110 "(Adobe) Requesting property: ProductName ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b11a8 "(Adobe) Value: Adobe Bridge 1.0 ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b1110 "(Adobe) Requesting property: ProductCode ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b1210 "(Adobe) Value: {B74D4E10-1033-0000-0000-000000000001} ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b1110 "(Adobe) Requesting property: UpgradeCode ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b1210 "(Adobe) Value: {B74D4E10-1033-0000-0000-8747ADE00001} ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b1110 "(Adobe) Requesting property: PackageCode ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b1210 "(Adobe) Value: {FF104279-7BA2-4C5D-A6AB-49ADA9CE25F1} ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b1110 "(Adobe) Requesting property: SIFFullPath ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b1210 "(Adobe) Value: C:\Program Files\Adobe\Adobe Bridge\0 ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b1110 "(Adobe) Requesting property: CSAFullPath ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b1210 "(Adobe) Value: C:\Program Files\Adobe\Adobe Bridge\0 ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b11c0 "(Adobe) Setting property: AMTMetadataXmlSrc.63EDEF4F_3240_49D0_A302_3AE1D1DA43F6 ") ret=0059110c ... 0025:Call msi.MsiSetPropertyA(00000002,017b0a88 "AMTMetadataXmlSrc.63EDEF4F_3240_49D0_A302_3AE1D1DA43F6",017b1008 "C:\users\focht\Temp\install.adb") ret=005926b9 ... 0025:Call msi.MsiRecordSetStringA(00000003,00000000,017b1188 "(Adobe) New value: C:\users\focht\Temp\install.adb ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000005,00000001,017b3500 "MoveXML.63EDEF4F_3240_49D0_A302_3AE1D1DA43F6") ret=0058ed54 ... 0025:Call msi.MsiRecordSetStringA(00000005,00000002,017b3510 "AppMetadata.63EDEF4F_3240_49D0_A302_3AE1D1DA43F6") ret=0058ed54 ... 0025:Call msi.MsiRecordSetStringA(00000005,00000005,017b3510 "AMTMetadataXmlSrc.63EDEF4F_3240_49D0_A302_3AE1D1DA43F6") ret=0058ed54 ... 0025:Call msi.MsiRecordSetStringA(00000005,00000006,017b3500 "INSTALLDIR.63EDEF4F_3240_49D0_A302_3AE1D1DA43F6") ret=0058ed54 ... 0025:trace:msi:MSI_DatabaseOpenViewW L"select * from `_Columns` where `Table` = 'MoveFile'" 0x19be178 ... 0025:Call msi.MsiDatabaseOpenViewA(00000004,017b3660 "Select * FROM `MoveFile`",019be58c) ret=0058ef25 0025:trace:msi:MsiDatabaseOpenViewA 4 "Select * FROM `MoveFile`" 0x19be58c ... 0025:trace:msi:MSI_ParseSQL Parse returned 0 0025:trace:msi:alloc_msihandle 0x6c8260 -> 6 ... 0025:Ret msi.MsiDatabaseOpenViewA() retval=00000000 ret=0058ef25 0025:Call msi.MsiViewModify(00000006,00000007,00000005) ret=0058ef40 0025:trace:msi:MsiViewModify 6 7 5 ... 0025:Ret msi.MsiViewModify() retval=00000000 ret=0058ef40 ... 0025:Call msi.MsiRecordSetStringA(00000005,00000000,017b3640 "(Adobe) Made MoveFile Table entry ") ret=0059110c ... 0025:Call msi.MsiRecordSetStringA(00000004,00000000,017b36b0 "(Adobe) END - AMT_WriteInstallationMetadata ") ret=00590d5c ... 0025:trace:msi:DllThread custom action (25) returned 0 --- snip ---
The temp file 'C:\users\focht\Temp\install.adb' content:
--- snip --- <?xml version="1.0" encoding="UTF-8" ?> <ApplicationInfo> <ProductName>Adobe Bridge 1.0</ProductName><ProductCode>{B74D4E10-1033-0000-0000-000000000001}</ProductCode><UpgradeCode>{B74D4E10-1033-0000-0000-8747ADE00001}</UpgradeCode><PackageCode>{FF104279-7BA2-4C5D-A6AB-49ADA9CE25F1}</PackageCode><SIFPath>C:\Program Files\Adobe\Adobe Bridge\0</SIFPath><CSAPath>C:\Program Files\Adobe\Adobe Bridge\0</CSAPath><ProductLanguage>1033</ProductLanguage><ProductVersion>001.000.000</ProductVersion><ALLUSERS>1</ALLUSERS><InstallDate>6/9/2014</InstallDate><InstallTime>10:45:58</InstallTime><InstallSourceDir>Z:\home\focht\Downloads</InstallSourceDir><MSIDatabaseVersion>400</MSIDatabaseVersion><MSIRuntimeVersion>4.5</MSIRuntimeVersion></ApplicationInfo> --- snip ---
MSI 'MoveFile' table is initially empty and gets filled at runtime during custom actions.
ORCA dump:
--- snip --- FileKey Component_ SourceName DestName SourceFolder DestFolder Options s72 s72 L255 L255 S72 s72 i2 --- snip ---
Entries are inserted with columns 5,6,7 set to sane values.
Now the culprit ... Wine's handling of 'MoveFiles'
--- snip --- ... 0023:trace:msi:ACTION_PerformUIAction Performing action (L"MoveFiles") ... 0023:trace:msi:MSI_ProcessMessage (nil) (nil) (nil) 0 10 L"Action start 12:46:02: MoveFiles." ... 0023:trace:msi:msi_get_property returning L"C:\users\focht\Temp\install.adb" for property L"AMTMetadataXmlSrc.63EDEF4F_3240_49D0_A302_3AE1D1DA43F6" ... 0023:trace:msi:msi_get_property returning L"C:\Program Files\Adobe\Adobe Bridge\" for property L"INSTALLDIR.63EDEF4F_3240_49D0_A302_3AE1D1DA43F6" ... 0023:Call KERNEL32.GetFileAttributesW(006c7ef0 L"C:\users\focht\Temp\install.adb") ret=7ecfbfc1 0023:Ret KERNEL32.GetFileAttributesW() retval=00000020 ret=7ecfbfc1 ... 0023:trace:msi:MSI_ProcessMessage (nil) (nil) (nil) 0 200 L"File: MoveXML.63EDEF4F_3240_49D0_A302_3AE1D1DA43F6, Directory: C:\Program Files\Adobe\Adobe Bridge\, Size: 1" ... 0023:trace:msi:MSI_ProcessMessage (nil) (nil) (nil) 0 10 L"Action ended 12:46:02: MoveFiles. Return value 0." --- snip ---
No actual 'move' happened here.
Debugger session:
--- snip --- Wine-dbg>bt
Backtrace: =>0 0x7ecfbfa5 ITERATE_MoveFiles+0x17c(rec=0xa36d08, param=0x142390) [/home/focht/projects/wine/wine.repo/src/dlls/msi/files.c:815] in msi (0x0033f7c8) 1 0x7ed16917 MSI_IterateRecords+0x8a(view=0xa34e60, count=0x0(nil), func=0x7ecfbe29, param=0x142390) [/home/focht/projects/wine/wine.repo/src/dlls/msi/msiquery.c:188] in msi (0x0033f7f8) 2 0x7ecfc3ea ACTION_MoveFiles+0x64(package=0x142390) [/home/focht/projects/wine/wine.repo/src/dlls/msi/files.c:916] in msi (0x0033f828) 3 0x7eccfece ACTION_HandleStandardAction+0xc3(package=0x142390, action="MoveFiles", rc=0x33f8a8) [/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:7619] in msi (0x0033f878)
Wine-dbg>info locals
0x7ecfbfa5 ITERATE_MoveFiles+0x17c: (0033f7c8) MSIRECORD* rec=0xa36d08 (parameter [EBP+8]) LPVOID param=0x142390 (parameter [EBP+12]) MSIPACKAGE* package=0x142390 (local [EBP-32]) MSIRECORD* uirow=(nil) (local [EBP-76]) MSICOMPONENT* comp=0x1cdb40 (local [EBP-40]) LPCWSTR sourcename=0x0(nil) (local [EBP-52]) LPCWSTR component="AppMetadata.63EDEF4F_3240_49D0_A302_3AE1D1DA43F6" (local [EBP-36]) LPWSTR sourcedir="C:\users\focht\Temp\install.adb" (local [EBP-60]) LPWSTR destname=0x0(nil) (local [EBP-12]) LPWSTR destdir="C:\Program Files\Adobe\Adobe Bridge" (local [EBP-16]) LPWSTR source=0x0(nil) (local [EBP-20]) LPWSTR dest=0x0(nil) (local [EBP-24]) int options=0x1 (local [EBP-56]) DWORD size=0 (local [EBP-28]) BOOL wildcards=0x33f7c8 (local [EBP-64]) --- snip ---
Source: http://source.winehq.org/git/wine.git/blob/7974b12ab1d452a4ae6b7488be25ab93f...
--- snip --- 784 static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param ) 785 { 786 MSIPACKAGE *package = param; 787 MSIRECORD *uirow; 788 MSICOMPONENT *comp; 789 LPCWSTR sourcename, component; 790 LPWSTR sourcedir, destname = NULL, destdir = NULL, source = NULL, dest = NULL; 791 int options; 792 DWORD size; 793 BOOL wildcards; ... 807 sourcename = MSI_RecordGetString(rec, 3); 808 options = MSI_RecordGetInteger(rec, 7); 809 810 sourcedir = msi_dup_property(package->db, MSI_RecordGetString(rec, 5)); 811 if (!sourcedir) 812 goto done; 813 814 destdir = msi_dup_property(package->db, MSI_RecordGetString(rec, 6)); 815 if (!destdir) 816 goto done; 817 818 if (!sourcename) 819 { 820 if (GetFileAttributesW(sourcedir) == INVALID_FILE_ATTRIBUTES) 821 goto done; 822 823 source = strdupW(sourcedir); 824 if (!source) 825 goto done; 826 } ... 840 wildcards = strchrW(source, '*') || strchrW(source, '?'); 841 842 if (MSI_RecordIsNull(rec, 4)) 843 { 844 if (!wildcards) 845 { 846 destname = strdupW(sourcename); 847 if (!destname) 848 goto done; 849 } 850 } ... --- snip ---
The custom action didn't set 'SourceName' and 'DestName' for the entry (both are nullable, see http://msdn.microsoft.com/en-us/library/aa370055%28v=vs.85%29.aspx).
'SourceFolder' and 'DestFolder' are the important ones, everything missing (nullable columns) must be derived in this case.
If you fix that the trial works (already tested).
$ sha1sum Photoshop_CS2.exe 88ee09b7a2030d82c9154dd3419252cd6e2db165 Photoshop_CS2.exe
$ du -sh Photoshop_CS2.exe 330M Photoshop_CS2.exe
$ wine --version wine-1.7.19-70-gd6a59f7
Regards