1

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?

Justin
  • 84,773
  • 49
  • 224
  • 367

1 Answers1

6

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.

Rob Mensching
  • 33,834
  • 5
  • 90
  • 130
  • Thank you Rob. Both the above suggestions serve my purpose very well. I'd like to know if is it possible to pass a message from my ExecPackage back to the bootstrapper as well? The situation is like this: I have some batch files to be executed, and I'm doing this using an ExecPackage. Based on some results in the batch, I'd like to display an appropriate message back to the user, and present options to continue/abort/restart, etc. – microsoftprogrammer Mar 07 '13 at 11:56
  • In continuation with my comments above...I think, I may have to save the message as a registry entry and retrieve it in the ExecutePackageComplete event. Is there any other way to do this? – microsoftprogrammer Mar 08 '13 at 07:48
  • 5
    Your executable could implement the "embedded Burn protocol" to send rich progress and error messages. It isn't at all documented so you'd need to go through the Burn code to see the protocol, but it's there and would get you exactly what you want. The "bundlerunner" .csproj in the WiX source code might be helpful too. – Rob Mensching Mar 08 '13 at 08:52