Embedding multiple CAB Files => E_FAIL #5453

Open
punkbuster2003 opened this Issue Dec 12, 2016 · 11 comments

Projects

None yet

2 participants

@punkbuster2003
punkbuster2003 commented Dec 12, 2016 edited

If this issue is a bug:

  • Which version of WiX are you building with?

3.11.0.1209

  • Which version of Visual Studio are you building with (if any)?

Visual Staudio 2010

  • Which version of .NET are you building with?

4

  • If the problem occurs when installing your packages built with WiX, what is the version of Windows the package is running on?

Windows 7/Windows 10

  • Describe the problem and the steps to reproduce it.

I have an Installer with 150 Files. I build WIX Toolset from sourceon my Computer to get close to the error with debugging, The error happens in winterop.dll cabutil.cpp line 576 when calling the FCIAddFile method from cabinet.dll. it occurs when the file will be appended and the pcd->llBytesSinceLastFlush is greater than 2147483648 bytes. But as i understand my wxs and the documentation i am allowed to split in 64K Cabs at 2GB. What am i doing wrong that the installer is building a cab file with all files in it, and bevor it says it will use 13 cab files. I am using:

Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab3.cab'.
Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab13.cab'.
Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab2.cab'.
Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab10.cab'.
Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab12.cab'.
Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab4.cab'.
Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab1.cab'.
Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab5.cab'.
Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab9.cab'.
Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab6.cab'.
Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab7.cab'.
Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab8.cab'.
Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab11.cab'.
Generating database.

light.exe : error LGHT0306: An error (E_FAIL) was returned while finalizing a CAB file. This most commonly happens when creating a CAB file with more than 65535 files in it. Either reduce the number of files in your installation package or split your installation package's files into more than one CAB file using the Media element. [F:\workspace\etuplaner\packages\ETUPlaner.msbuild]

@barnson
Member
barnson commented Dec 12, 2016

What does your WiX media authoring look like? What are the sizes of your files?

@punkbuster2003
punkbuster2003 commented Dec 12, 2016 edited

at first i used a custom media layout with diskid 1 to 11. afterwards i used the mediatemplate. both methods generate the same error.
cabs

@barnson
Member
barnson commented Dec 13, 2016

What does your MediaTemplate authoring look like?

@punkbuster2003
punkbuster2003 commented Dec 13, 2016 edited

<MediaTemplate MaximumCabinetSizeForLargeFileSplitting="1024" EmbedCab="yes" />
i also tried
<MediaTemplate />
and First try was
<Media Id="1" Cabinet="Data1.cab" EmbedCab="yes" VolumeLabel="DISK1" /> <Media Id="2" Cabinet="Data2.cab" EmbedCab="yes" VolumeLabel="DISK2" /> <Media Id="3" Cabinet="Data3.cab" EmbedCab="yes" VolumeLabel="DISK3" /> <Media Id="4" Cabinet="Data4.cab" EmbedCab="yes" VolumeLabel="DISK4" /> <Media Id="5" Cabinet="Data5.cab" EmbedCab="yes" VolumeLabel="DISK5" /> <Media Id="6" Cabinet="Data6.cab" EmbedCab="yes" VolumeLabel="DISK6" /> <Media Id="7" Cabinet="Data7.cab" EmbedCab="yes" VolumeLabel="DISK7" /> <Media Id="8" Cabinet="Data8.cab" EmbedCab="yes" VolumeLabel="DISK8" /> <Media Id="9" Cabinet="Data9.cab" EmbedCab="yes" VolumeLabel="DISK9" /> <Media Id="10" Cabinet="Data10.cab" EmbedCab="yes" VolumeLabel="DISK10" />
The result is always the error above

@barnson
Member
barnson commented Dec 13, 2016

What happens if you try EmbedCab="no"?

@punkbuster2003

I tried everything in this direction. With embedcab and without. With package compressed and without. alwas the same error. maybe i repeat what i meant in my first post. The Problem occurs when all cab files are successfully build. Then another cab file will be build with alle 150 files. This cab file does not need to be build. The error can not be solved with media or mediatemplate. I think it is not possible to build a msi package with files greater than 2GB (uncompressed). That is the result of my debugging with the wix toolset. When i remove some files (under 2GB uncompressed) the package will be build succesfully.

@barnson
Member
barnson commented Dec 14, 2016

You cannot build an .msi (with embedded cabs) that large. No single file greater than 2GB is supported.

I was able to build an .msi for 3GB worth of uncompressed files with 16 external cabs totaling 1.2GB, no problem.

@punkbuster2003

And how did you define this in your wxs?

@punkbuster2003
punkbuster2003 commented Dec 14, 2016 edited

Another thing to know is that i am using wixlibs for my setup.

@barnson
Member
barnson commented Dec 14, 2016

<MediaTemplate />

@punkbuster2003

Finally solved it. But i think this is a bug or it is not supported so i would expect an error message.

All files have been in wixlibs. All cab files where build as expected. But when the msi database will be generated, light takes all the files again and compresses them in the msi database. to solve it i used the wxs fragments from the wixlibs and build them with the main project and now everything is build successfully.

@barnson barnson added this to the v4.x milestone Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment