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="path\to\foo_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.

1 Comment

One Response to Wix Burn Bootstrapper – Payload Element Syntax

  1. sahi says:

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

Add your thoughts