GNOME Bugzilla – Bug 753040
wixl creates MSI files which can't be installed on Windows servers
Last modified: 2015-07-30 21:48:12 UTC
Created attachment 308420 [details] faulty MSI file and files required to build MSI file wixl sometimes creates MSI files which can't be installed on Windows servers. If I try to install these MSI files on Windows XP or on Windows 7, Windows installer shows the error message below: The file 'fil758E...' cannot be installed because the file cannot be found in cabinet file 'test.cab'. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package. Attached is a tar file which contains: 1) a faulty MSI file created with wixl which can't be installed on Windows 2) all files required to build the faulty MSI file: tar xzvf msi-test.tgz cd msi-test wixl -v -o "msi-test.msi" -D basedir="msi-test" msi-test-main.wxs My environment: - Gentoo Linux - msitools 0.94 - gcab 0.6
Hi, thanks for the bug report. When something goes wrong, it's always a good idea to try to build the MSI with WiX toolset (http://wixtoolset.org/), and check the difference of resulting MSI with msidiff. So that's what I did. First, there are 2 issues with your wxs: 1. The Feature Id can't be a UUID, or at least it should not contain -, I changed to "foo" for the test. 2. The install location is bad. Typically, it should be: ProgramFiles\CompanyOrOrg\Product Version\ See WiX tutorial: https://www.firegiant.com/wix/tutorial/getting-started/the-files-inside/ <Directory Id='ProgramFilesFolder' Name='PFiles'> <Directory Id='Acme' Name='Acme'> <Directory Id='INSTALLDIR' Name='Foobar 1.0'> With that worked around, I could build the MSI with WiX and compare. It takes some experience to read the differences, are some are really not important. Here the differences that matters are in the File.idt table, and the cab file itself. But interestingly, the one I build after the 2 fixes about work fine. Could you try fixing yours and checking? thanks
Hi, thanks for taking a look at this. I stumbled upon the problem because I created some very large MSI files (10.000 files) using wixl and wixl-heat. Some of them work and some don't. Then I tried to narrow down the problem and I created a small test case, which is what I uploaded. Maybe the problem is that I try to install my files directly to C:\<somepath> - but this is what I need to do - and some MSI files work quite well when I install to C:\<somepath>. I digged further into this problem and I created a new test case "msi-test-2". It creates two MSI files - one works and the one doesn't. The only difference is the location of the source files. Maybe there is something wrong with variable substitution or the path of the source file is important? I'll try to check the source code of msitools later today. You can reproduce the problem with the commands below: tar xzvf msi-test-2.tgz cd msi-test-2 wixl -v -o "msi-test-2.msi" -D basedir="msi-test" msi-test-main-2.wxs # Doesn't work wixl -v -o "msi-test-3.msi" -D basedir="msi-test" msi-test-main-3.wxs # Works diff msi-test-main-2.wxs msi-test-main-3.wxs # This shouldn't cause any difference in the MSI file, right?
Created attachment 308460 [details] msi-test-2.tgz (see comment 2)
there is really very little differences between those 2 msi files. elmarco@bombetoka:~/Public/msi-test-2$ msidiff msi-test-2.msi msi-test-3.msi diff -r -Nup old/_SummaryInformation.idt new/_SummaryInformation.idt --- old/_SummaryInformation.idt 2015-07-30 16:08:44.395923537 +0200 +++ new/_SummaryInformation.idt 2015-07-30 16:08:44.582926322 +0200 @@ -8,9 +8,9 @@ _SummaryInformation PropertyId 5 test 6 This installer database contains the logic and data required to install msitest. 7 Intel;1033 -9 {09FE9B55-98F2-463C-AD4A-2BF54184C9C1} -12 2015/7/30 13:54:28 -13 2015/7/30 13:54:28 +9 {E1B25203-AB36-4B73-88D8-1A91C8992CB4} +12 2015/7/30 13:54:34 +13 2015/7/30 13:54:34 14 300 15 2 18 msitools 0.94 msiinfo extract msi-test-2.msi test.cab >test2.cab msiinfo extract msi-test-3.msi test.cab >test3.cab GCAB_DEBUG=1 gcab -l ~/Public/msi-test-2/test3.cab (gcab:17158): gcab-DEBUG: CFHEADER (gcab:17158): gcab-DEBUG: res1: 00000000 (gcab:17158): gcab-DEBUG: size: 000008a1 (gcab:17158): gcab-DEBUG: res2: 00000000 (gcab:17158): gcab-DEBUG: offsetfiles: 0000002c (gcab:17158): gcab-DEBUG: res3: 00000000 (gcab:17158): gcab-DEBUG: versionMIN: 03 (gcab:17158): gcab-DEBUG: versionMAJ: 01 (gcab:17158): gcab-DEBUG: nfolders: 0001 (gcab:17158): gcab-DEBUG: nfiles: 0002 (gcab:17158): gcab-DEBUG: flags: 0000 (gcab:17158): gcab-DEBUG: setID: 0000 (gcab:17158): gcab-DEBUG: cabID: 0000 (gcab:17158): gcab-DEBUG: CFOLDER (gcab:17158): gcab-DEBUG: offsetdata: 00000094 (gcab:17158): gcab-DEBUG: ndatab: 0001 (gcab:17158): gcab-DEBUG: typecomp: 0001 (gcab:17158): gcab-DEBUG: CFILE (gcab:17158): gcab-DEBUG: usize: 00000619 (gcab:17158): gcab-DEBUG: uoffset: 00000000 (gcab:17158): gcab-DEBUG: index: 0000 (gcab:17158): gcab-DEBUG: date: 46ff (gcab:17158): gcab-DEBUG: time: 76b2 (gcab:17158): gcab-DEBUG: fattr: 0020 (gcab:17158): gcab-DEBUG: name: filC5F2CD435A2630369CCDBEAAB015DE3F (gcab:17158): gcab-DEBUG: CFILE (gcab:17158): gcab-DEBUG: usize: 00000ac6 (gcab:17158): gcab-DEBUG: uoffset: 00000619 (gcab:17158): gcab-DEBUG: index: 0000 (gcab:17158): gcab-DEBUG: date: 46ff (gcab:17158): gcab-DEBUG: time: 774a (gcab:17158): gcab-DEBUG: fattr: 0020 (gcab:17158): gcab-DEBUG: name: fil758E89807531B4FD11A17A20CDC27B7D filC5F2CD435A2630369CCDBEAAB015DE3F 1561 2015-07-30 14:53:36 0x20 fil758E89807531B4FD11A17A20CDC27B7D 2758 2015-07-30 14:58:20 0x20 GCAB_DEBUG=1 gcab -l ~/Public/msi-test-2/test2.cab (gcab:17189): gcab-DEBUG: CFHEADER (gcab:17189): gcab-DEBUG: res1: 00000000 (gcab:17189): gcab-DEBUG: size: 000008a1 (gcab:17189): gcab-DEBUG: res2: 00000000 (gcab:17189): gcab-DEBUG: offsetfiles: 0000002c (gcab:17189): gcab-DEBUG: res3: 00000000 (gcab:17189): gcab-DEBUG: versionMIN: 03 (gcab:17189): gcab-DEBUG: versionMAJ: 01 (gcab:17189): gcab-DEBUG: nfolders: 0001 (gcab:17189): gcab-DEBUG: nfiles: 0002 (gcab:17189): gcab-DEBUG: flags: 0000 (gcab:17189): gcab-DEBUG: setID: 0000 (gcab:17189): gcab-DEBUG: cabID: 0000 (gcab:17189): gcab-DEBUG: CFOLDER (gcab:17189): gcab-DEBUG: offsetdata: 00000094 (gcab:17189): gcab-DEBUG: ndatab: 0001 (gcab:17189): gcab-DEBUG: typecomp: 0001 (gcab:17189): gcab-DEBUG: CFILE (gcab:17189): gcab-DEBUG: usize: 00000619 (gcab:17189): gcab-DEBUG: uoffset: 00000000 (gcab:17189): gcab-DEBUG: index: 0000 (gcab:17189): gcab-DEBUG: date: 325d (gcab:17189): gcab-DEBUG: time: 1a62 (gcab:17189): gcab-DEBUG: fattr: 0020 (gcab:17189): gcab-DEBUG: name: filC5F2CD435A2630369CCDBEAAB015DE3F (gcab:17189): gcab-DEBUG: CFILE (gcab:17189): gcab-DEBUG: usize: 00000ac6 (gcab:17189): gcab-DEBUG: uoffset: 00000619 (gcab:17189): gcab-DEBUG: index: 0000 (gcab:17189): gcab-DEBUG: date: 38ee (gcab:17189): gcab-DEBUG: time: 5583 (gcab:17189): gcab-DEBUG: fattr: 0020 (gcab:17189): gcab-DEBUG: name: fil758E89807531B4FD11A17A20CDC27B7D filC5F2CD435A2630369CCDBEAAB015DE3F 1561 2005-02-28 03:19:04 0x20 fil758E89807531B4FD11A17A20CDC27B7D 2758 2008-07-13 10:44:06 0x20 looks nearly identical..
it turns out editing the date in hex in the msi, it solves the installation issue.. wtf.. :)
You're right! As soon as I change the file's date using touch msi-test/zip-3.0-src/win32/readme.a64 I can build and install msi-test-2.msi. I would never have guessed that. Thanks for finding this out!
unfortunately I am clueless how to fix this, 325d is a valid date to me. No idea why Windows Installer doesn't like this. Perhaps wixl should just override all file dates to current date to solve this bug...
The date field "325d" in the MSI file is wrong. This would be 29.02.2005, which doesn't exist. Windows Installer is right to reject this MSI file. Details: Output of stat: stat msi-test/zip-3.0-src/win32/readme.a64 --> last modification time: 2005-02-28 03:19:04 The fields in the MSI file (from your posting above): (gcab:17189): gcab-DEBUG: date: 325d (gcab:17189): gcab-DEBUG: time: 1a62 The perl program below my $a=0x325d; my $b=0x1a62; printf( "%02s %02s %04s - %02s %02s %02s\n", $a & 0x1F, ($a >> 5) & 0x0F, ($a >> 9) + 1980, $b >> 11, ($b >> 5) & 0x3F, ($b << 1) & 0x3E ); decodes this to: 29 02 2005 - 03 19 04
thanks for your help
commit 258e58715f404964a8417b2235431f565ae295e2 Author: Marc-André Lureau <marcandre.lureau@gmail.com> Date: Thu Jul 30 23:45:28 2015 +0200 gcab-file: fix wrong file modification day The day of the struct tm is not (0-30) but (1-31), no need to add +1! This fixes creation of cabinet file and MSI that Windows Installer rejects because of invalid date (29-02-2005 for ex).