Fix Windows MSI self-upgrade failure (Error 1603) via pkg.install#69220
Open
twangboy wants to merge 3 commits into
Open
Fix Windows MSI self-upgrade failure (Error 1603) via pkg.install#69220twangboy wants to merge 3 commits into
twangboy wants to merge 3 commits into
Conversation
dwoz
previously approved these changes
May 23, 2026
DeleteConfig_DECAC unconditionally deleted ROOTDIR\var during RemoveExistingProducts, destroying the MSI that pkg.install had cached to ROOTDIR\var\cache before launching the upgrade. Users with REMOVE_CONFIG=1 persisted in the registry hit a worse variant where the entire ROOTDIR was deleted. Fix: check UPGRADINGPRODUCTCODE in DeleteConfig_DECAC — set by Windows Installer whenever RemoveExistingProducts fires — and skip all ROOTDIR deletion during upgrades. Also remove the default var/srv deletion on standalone uninstall, aligning the MSI with the NSIS installer which has always preserved ROOTDIR during upgrades. Forward UPGRADINGPRODUCTCODE via the CADH entry in Product.wxs and add upgrade tests that plant a sentinel in ROOTDIR\var\cache (with and without REMOVE_CONFIG=1 in the registry) to catch regressions. Fixes saltstack#69219
b4a60dc to
19e0704
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
DeleteConfig_DECAC unconditionally deleted ROOTDIR\var during RemoveExistingProducts, destroying the MSI that pkg.install had cached to ROOTDIR\var\cache before launching the upgrade. Users with REMOVE_CONFIG=1 persisted in the registry hit a worse variant where the entire ROOTDIR was deleted.
Fix: check UPGRADINGPRODUCTCODE in DeleteConfig_DECAC — set by Windows Installer whenever RemoveExistingProducts fires — and skip all ROOTDIR deletion during upgrades. Also remove the default var/srv deletion on standalone uninstall, aligning the MSI with the NSIS installer which has always preserved ROOTDIR during upgrades.
Forward UPGRADINGPRODUCTCODE via the CADH entry in Product.wxs and add upgrade tests that plant a sentinel in ROOTDIR\var\cache (with and without REMOVE_CONFIG=1 in the registry) to catch regressions.
What issues does this PR fix or reference?
Fixes #69219
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes