Search code examples
cmakewixcpack

Wix: How can I create a bundle.exe with more than 2GB (external files)


I have multiple MSI files and I am creating bundle .exe using WIX. The bundle started to exceed 2GB. From this answer I understand it cannot be done within a single .exe file because burn does not support containers bigger than 2GB.

Is it possible to produce .exe installer with (e.g. external .cab files)?
The .exe file would have less than 2GB, but it would require external files?


Solution

  • <?xml version="1.0" encoding="UTF-8"?>
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
      <Bundle Name="Bundle Name" Version="1.0.0.0" Manufacturer="Company Inc." UpgradeCode="YOUR_GUID_HERE">
        <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
    
        <Chain>
          <MsiPackage SourceFile="stage\msi1.msi" Vital="yes" Visible="yes"/>
          <MsiPackage SourceFile="stage\msi2.msi" Vital="yes" Visible="yes"/>
          <!-- etc... -->
          <!-- msi which will not be compressed: -->
          <MsiPackage DownloadUrl="{0}" SourceFile="stage\external.msi" Vital="yes" Visible="yes"  Compressed="no"/>
        </Chain>
      </Bundle>
    </Wix>
    

    This results in a chain of msi1, msi2 files (included in .exe).
    External.msi file is not included in the bundle, thus it is required to be placed next to the .exe file when running the bundle.