[wix-devs] Rollback quirks

Sean Hall r.sean.hall at gmail.com
Tue Jan 12 16:41:58 PST 2021


I'm trying to implement 6297, but I'm getting hung up on how we're doing
rollback for execute package actions. Remember that I'm trying to track
what the actual state of the package is during execution, to get an
accurate count of the number of non-permanent packages that are installed.

>From https://github.com/wixtoolset/issues/issues/3089, MSI packages are
planned such that if there is a rollback execute action then that will be
executed during rollback even if the package had failed. (None of the other
package types were updated with this logic, causing issues like
https://github.com/wixtoolset/issues/issues/5950).

So how do I handle failure of the non-rollback execute action? Should I be
conservative like 3089 which would mean for example that even if the
install failed, I treat it as installed? At first you might think that it
doesn't matter, because rollback should undo it. But what happens if the
rollback also fails? Also, if the bundle has DisableRollback="yes" then it
would never try to rollback the package, and that could mean the difference
between keeping the bundle registered or not. Or maybe for
DisableRollback="yes", we should never uninstall the bundle?

DisableRollback="no" scenario:
0. Bundle was not initially installed, and had no packages installed or
cached.
1. MsiPackageA is executed for install.
2. MsiPackageA returns error, but it actually installed successfully. The
user had canceled too late. 3. (Track this as installed or not?)
4. Rollback executes MsiPackageA for uninstall.
5. MsiPackagesA returns error, but it actually uninstalled successfully.
The user had canceled too late.
6. (If we tracked as installed in #3, then do we now treat it as
uninstalled?)
7. MsiPackageA gets uncached.
8. We're supposed to uninstall the bundle here if MsiPackageA is not
installed.


More information about the wix-devs mailing list