admin管理员组文章数量:1289402
I am migrating an installer from InstallShield to WiX (v4) and facing an issue with rollback during a major upgrade.
Issue:
The WiX installer correctly detects and uninstalls the previously installed InstallShield version during a major upgrade. However, if the upgrade fails mid-installation, the rollback does not restore the InstallShield-installed version. As a result, the application is completely removed instead of rolling back to the previous version.
Expected Behavior:
If the WiX upgrade fails, it should rollback to the previous version (i.e., the InstallShield-installed product should be restored).
Current WiX Configuration:
Here’s how I’ve set up the MajorUpgrade in WiX:
<Package
Codepage="1252"
Name="$(var.ProductName)"
Language="1033"
Version="$(var.ProductVersion)"
Manufacturer="$(var.ProductManufacturer)"
UpgradeCode="$(var.UpgradeCode)"
ProductCode="*"
InstallerVersion="200">
<Property Id="STARTSERVICE" Value="1" Admin="yes" Secure="yes"/>
<Property Id="VERSIONMAJOR" Value="$(var.VersionMajor)" Secure="yes"/>
<Property Id="VERSIONMINOR" Value="$(var.VersionMinor)" Secure="yes"/>
<MajorUpgrade
Schedule="afterInstallValidate"
DowngradeErrorMessage="A newer version of [PRODUCTNAME] is already installed."
AllowSameVersionUpgrades="yes"
AllowDowngrades="no" />
<FeatureRef Id="MainFeature"/>
<ui:WixUI
Id="WixUI_InstallDir"
InstallDirectory="INSTALLFOLDER"
/>
Troubleshooting So Far:
- The InstallShield version is successfully uninstalled during the upgrade.
- If the installation completes successfully, everything works as expected.
- However, if the installation fails, the previous InstallShield version is not restored.
- WiX rollback only restores its own changes, but it does not reinstall the old InstallShield-based product.
Question:
How can I configure WiX to restore the previous InstallShield-installed version if the upgrade fails?
Would a Custom Action to reinstall InstallShield on rollback be the best approach, or is there a native MSI mechanism to handle this?
Any guidance or alternative solutions would be greatly appreciated!
本文标签:
版权声明:本文标题:windows installer - WiX Major Upgrade from InstallShield - Rollback Does Not Restore Previous Version - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741415365a2377478.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论