3

Question: Can we access msi files (and other installers) packed with Burn Bootstrapper at install time?

Let's say if we need to read some property, or apply mst just before starting the installation etc.

Is that possible?

Farrukh Waheed
  • 2,163
  • 2
  • 29
  • 59

1 Answers1

0

Did you try to add the transform as a payload to your MsiPackage element, and set the TRANSFORMS property using MsiProperty element?

<MsiPackage ...>
    <Payload Compressed="yes" SourceFile="c:\mytransform.mst"/>
    <MsiProperty Name="TRANSFORMS" Value="mytransform.mst" />
</MsiPackage>

If you really need to get the path to embeded payloads, and if you are using the standard bootstrapper, you are going to need to create a bafunctions.dll and do some C/C++ coding.

To create a bafunctions.dll, first download the wix source code and use the project src\burn\samples\bafunctions as an example. To use the bafunctions.dll you have compiled, add it as a payload to the bootstrapper

<BootstrapperApplicationRef ...>
    <Payload Compressed="yes" SourceFile="c:\bafunctions.dll" />
</BootstrapperApplicationRef>

That's enough to make the standard bootstrapper call the bafunctions.dll callbacks. You have callbacks for OnDetect(), OnDetectComplete(), OnPlan(), OnPlanComplete(). You can use these functions to do some non-trivial detections and get/set burn variables.

This post has an example on how to use bafunctions.dll to get the path to an embeded payload at runtime: How to pass the path to a bundle's payload to an msi?

Community
  • 1
  • 1
Alex
  • 583
  • 5
  • 18