WiX Bootstrapper: Rollback notification

burn, wix, wix3.6

Solution

The documentation for the property is a little bit wrong but the `ExecutePackageBeginEventArgs` class's `ShouldExecute` property will tell you if the package is being "executed" or "rolled back". In your case, when the `ExecutePackageBeginEventArgs.ShouldExecute=false` then you know that package is being rolled back.

Problem

In the bundle.wxs of my managed bootstrapper, I have chained multiple packages: ``` <Chain> <ExePackage Id="Test1"......> <ExePackage Id="Test2"......> <ExePackage Id="MicrosoftVCPP2005Redistributable" SourceFile="..\Tools\VC2005Redistributable\vcredist_x86.exe" Vital="yes" InstallCondition="SelectedDBSize1 = 24" /> </Chain> ``` I'm subscribing to the `ExecutePackageBegin`/`ExecutePackageComplete` events to check which package is currently being executed and accordingly display the progress text indicating which installation is in progress. But, if due to some reason a roll back action starts midway, I want to change the progress text to indicate that rollback is in progress. Is there any event available when there is a switch from installation to rollback? Or do I have to check the sequence of the packages being invoked and decide based on that?

Original source