Blog Post:

Wix Burn Bootstrapper – Payload Element Syntax

WiX ToolsetSo I’m going up the learning curve for Wix and its toolset and I figured something out I could not find documented anywhere else so I am documenting it here. I am building an installer for a .NET software project using the Windows Installer XML (Wix) toolset. For those that are unfamiliar with it, Wix is a set of tools to create installers for Windows products. In addition to creating a simple “setup.exe” (or setup.msi), it also allows you to create an intelligent “bootstrapper” for your software. Bootstrapper means different things depending on context but for Wix, a bootstrapper is a tool that lets you install prerequisites for your software. Let’s say your software requires the .NET runtime. You could bundle .NET with your installer but it would be bloated and some people will already have it. You could require your users to install it first but that just creates a source for errors and support calls. The Wix toolset includes a utility called Burn. The developer wrote a great introduction to Burn here.

Because this project has dependencies on several third party drivers, I wanted to build a simple install script using the relatively new (as of this writing) Burn bootstrapper. So for single file OEM graphical installers, the Wix Burn tutorials worked great.

But the one thing I did not see shown was the proper use of the payload tag to tell Burn about a dependency that a chain element needed in order to execute. Yes, if you understand it, it is obvious but when I was figuring it out, it was not so obvious.

Let’s say you want Burn to execute “foo_setup.exe” but it depends on “foo_config.ini”. You want both files embedded in your final installer and it is a critical install that must succeed:

<ExePackage Id="foosetup" vital="yes" Compressed="yes"
<Payload Id="fooconfig" Compressed="yes"
SourceFile="pathtofoo_config.ini" />
</ExePackage >

Hope that helps somebody just getting started with Burn and multi-file chain elements. You can add as many payload elements as you like to embed each file in your installer.

3 Responses

  1. So payload basically group files into a single package. Is there any other usage for this? Can you please tell me fully about this.

  2. Hello I want to install SQL server 2016 as part of my bootstrapper . so i cannot compress it inside bootstrapper as the size exceeds 2 GB , is there any other way to do it ? like keeping the source files in the same directory as my bootstrapper during installation and invoking the sql exe.

    I cannot use the payload element as there are thousand of files 🙁

Leave a Reply

Your email address will not be published. Required fields are marked *

Get in Touch

If you have a product design that you would like to discuss, a technical problem in need of a solution, or if you just wish you could add more capabilities to your existing engineering team, please contact us.