Skip to content

Fix Windows MSI self-upgrade failure (Error 1603) via pkg.install#69220

Open
twangboy wants to merge 3 commits into
saltstack:3006.xfrom
twangboy:fix/69219/3006.x
Open

Fix Windows MSI self-upgrade failure (Error 1603) via pkg.install#69220
twangboy wants to merge 3 commits into
saltstack:3006.xfrom
twangboy:fix/69219/3006.x

Conversation

@twangboy
Copy link
Copy Markdown
Contributor

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

dwoz
dwoz previously approved these changes May 23, 2026
twangboy added 2 commits May 24, 2026 08:36
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants