[wix-users] Bundle Rollback with Major Upgrade of packages
nir.bar at panel-sw.com
Wed May 26 10:38:17 PDT 2021
MSI transaction accomplish exactly what you're looking for. See https://docs.microsoft.com/en-us/windows/win32/msi/multiple-package-installations?redirectedfrom=MSDN
It allows to install multiple packages as an atomic transaction that either completes successfully or roll them all back.
I added support in MSI transactions in a custom WiX build.
You can use it via https://www.nuget.org/packages/PanelSW.Custom.WiX/ and see the source code in https://github.com/nirbar/wix3
It allows authoring a MsiTransaction="yes" to rollback boundaries.
Note that transactions are only supported for MSI and MSP packages, and that all the packages in the transaction must share the same architecture (x86/x64)
---- On Wed, 26 May 2021 20:13:41 +0300 Matthias Reuss via wix-users <wix-users at lists.wixtoolset.org> wrote ----
I do not see a consistent way to handle the case that an MSI package within a bundle rolls back. I am not talking about the package that experiences an error and is rolled back by Windows Installer, but about the packages installed before that.
My expected outcome (others may have other expectations...):
On fresh installation: Non-shared MsiPackages are removed, shared packages (at least packages for which Burn has detected another dependency) are either set back to their previous state (I know that Burn cannot accomplish that...) or kept in their updated version.
On upgrade of the bundle: All previous MsiPackages are either set back to their previous state (with objection as above) or kept in their updated version.
What I observe:
In the planning phase, both "fresh install" and MajorUpgrade packages are planned with "Rollback:Uninstall" (regardless of dependencies). MinorUpgrade packages are planned with Rollback:None. This planning is then executed regardless of any dependencies (even though Burn detected the dependencies in the Detect phase).
This means in practice that every MsiPackage that was installed with another bundle (shared) or with an older version of the same bundle and now gets rolled back because of a failure in a later package is removed if the ProductCode changed with respect to the previous installed version, thus leaving the system in a real mess. Of course, repair of the other bundle(s) may help if sources are available, but...
RollbackBoundaries are not a real help either, because they also prevent the rollback of a fresh installation. I do not see a way to get the desired/expected behaviour (as stated above), not even with the CustomBA.
Am I missing something here?
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users