wix bootstrapper

2019-02-20 06:48发布

问题:

I have written a managed wix bootstrapper using WPF. The actual installation steps requires chaining of multiple msi's/exe's and batch files.

<Chain>
 <MsiPackage SourceFile="xxx"/>
 <ExePackage Id="Test" SourceFile="..\TestBatch.bat" Vital="yes"/>
 <MsiPackage SourceFile="yyy"/>
</Chain>

During the execution of each package, a message should be displayed (preferably from the bootstrapper UI) indicating which msi/exe package/ batch file is being executed currently. In short, a ProgressText is needed in the bootstrapper How can I make this happen?

Another question: I do not want all the msi's to be packaged into the bootstrapper exe. This is because: Each time an msi is changed we would like to ship only the updated/modified msi and not the entire bootstrapper exe. Is there a way to do this?

回答1:

Two answers, one suggestion:

  1. To get messages back during the MsiPackages being installed, handle the BootstrapperCore.ExecuteMsiMessage event. The event args there will contain a Message that contains the data you are looking for.

  2. To configure how the packages are compressed or not, use the Compress attribute. You can either mark the entire Bundle/@Compress='no' or mark each package Compress='no' (or 'yes' if you want to go that way).

--

Suggestion: Be sure to add DetectCondition to the ExePackages so Burn will know if the ExePackages are already present or not.