Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WiX Bootstrapper: Rollback notification

Tags:

wix

wix3.6

burn

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?

like image 204
microsoftprogrammer Avatar asked Jun 14 '26 15:06

microsoftprogrammer


1 Answers

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.

like image 83
Rob Mensching Avatar answered Jun 18 '26 01:06

Rob Mensching



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!