Issue 8810 - WixInternalUIBootstrapperApplication fails silently when downgrade attempted #9360
chrpai
started this conversation in
WiX Development
Replies: 1 comment
|
I was originally thinking path 1 but I like path 2 better now. Keeps the origi |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
#8810
I just hit this issue while working with a customer. The current state isn't the best UX. Yes, nothing happened. But no error is displayed and the user has to read the logs to know why. I've asked Claude to write up a WIP for this. Requesting comments.
Cause. When Burn finds a newer related bundle, it flags the plan as a downgrade (plan.cpp ~1505) and stops planning, so the MSI is never planned (core.cpp ~539). Apply then returns ERROR_PRODUCT_VERSION (0x80070666). The InternalUI BA doesn’t handle that: it exits quietly with 0x666 and shows nothing.
Path 1, your default: let the MSI run.
Override OnPlanRelatedBundleType in WixInternalUIBootstrapperApplication.cpp. When the recommended type is DOWNGRADE, set it to NONE.
It has to be NONE. UPGRADE would make Burn request ABSENT for that related bundle, which uninstalls the newer version.
The MSI then runs and reports the downgrade through its own UI. That depends on the MSI actually checking for downgrades, for example MajorUpgrade DowngradeErrorMessage. An MSI without that check would now install instead of being blocked.
I still need to confirm that rollback unregisters the older bundle when the MSI fails.
Path 2, optional: the BA shows a message.
Keep Burn’s block, and handle OnApplyDowngrade, or the 0x80070666 result in OnApplyComplete, with a MessageBox.
The text would come from the system message for 0x80070666, as barnson suggested, so no localization work is needed.
Skip the box in silent mode, and keep exit code 0x666.
Selecting between them. Add an attribute on bal:WixInternalUIBootstrapperApplication, for example DowngradeBehavior="msi|message|silent". This touches BalCompiler.cs, the schema and the BA data. silent is today’s behavior.
Decision for you: should msi be the new default, or should the default stay silent with both behaviors opt-in? Making msi the default changes behavior for existing bundles.
All reactions