Managed WiX Bootstrapper packages

后端 未结 1 1707
猫巷女王i
猫巷女王i 2021-01-13 12:13

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 curr

1条回答
  •  离开以前
    2021-01-13 12:35

    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.

    0 讨论(0)
提交回复
热议问题