Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Managed WiX Bootstrapper packages

Tags:

wix

I have chained multiple Msi/exec packages in my Bundle.wxs. In my managed Bootstrapper code, I would like to get the parameters (such as DisplayName, Vital, etc) of the current package that is being executed. Right now, I have only found events that provide the packageID. Can I use this to somehow access other properties of the package?

like image 497
microsoftprogrammer Avatar asked May 07 '13 06:05

microsoftprogrammer


People also ask

What is bootstrapper for WiX?

The bootstrapper application DLL is responsible for displaying UI to the end-user and directs the Burn engine when to carry out download, install, repair and uninstall actions.

What is WiX burn?

Burn is a bootstrapper to chain the installations of MSI installers. It is part of WiX toolset. One of the reasons you might need a bootstrapper is to chain your software prerequisites or dependency installations such as a particular version of . NET Framework.


1 Answers

Yes. A file called BootstrapperApplicationData.xml is created during the build process and included with your Bootstrapper Application. The BootstrapperApplicationData.xml has lots of information about the bundle and packages included in your Bundle Chain, including the DisplayName and sizes and vital.

You'll find the BootstrapperApplicationData.xml right next to your .dll. In managed code you can get it using the following code:

 string folder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
 string dataXmlPath = Path.Combine(folder, "BootstrapperApplicationData.xml");

In native code, it is easier to use the helper functions provided in the balutil.lib. Namely BalManifestLoad() then BalInfoParseFromXml() to parse the XML file into a bunch of handy structs. You can see the code in src\ext\BalExtension\balutil\balinfo.cpp.

Finally, the BootstrapperApplicationData.xml can be extended by using CustomTable elements and setting the BootstrapperAppplicationData='yes' attribute.

like image 133
Rob Mensching Avatar answered Oct 11 '22 00:10

Rob Mensching