Installing Wix 'Advanced' Does Not Remove Previous Version
I would like to apologize in advance if I do not leave any important details.
I am trying to perform an upgrade where the previous version of the software (and all components) needs to be removed before installing a new one.
I will try not to bore you with the details and tell you that if you do a "typical" installation, everything will be as planned. If you choose to do an advanced installation (specify installation for all users, set location, etc.), then it seems that the step "uninstall previous version" is missing.
So far I have done the following:
-Signed UpgradeVersion tags to match the advice of another stack question
-Verified property 'OLDVERSIONBEINGUPGRADED' set correctly
-Make sure the upgrade codes / IDs are the same, the version numbers are sequential (upgrade from 1.0.8 to 1.0.10) - after all, the standard installation works correctly!
-Got the advice given here: WiX is always overwrite the previous version and follow this: http://wix.sourceforge.net/manual-wix3/major_upgrade.htm
- Went through a hack to manually call msiexec to uninstall the previous version using the product ID (this failed because we are already installing something - is there a better way to schedule this?)
The My Product / Upgrade section looks like this:
<Product Id="GUID1" UpgradeCode="GUID2" Version="220.127.116.11"> <Package Compressed="yes" InstallerVersion="200"/> <MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="Another version of [ProductName] is already installed."/> <Upgrade Id="GUID2"> <UpgradeVersion Minimum="1.0.10" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" /> <UpgradeVersion Maximum="1.0.10" IncludeMaximum="no" Property="PREVIOUSVERSIONINSTALLED" /> </Upgrade>
I'm new to Wix, so I may have overlooked important details when describing my problem. If I forgot to include something important, please let me know.
Thanks in advance for any input you may provide.
source to share
It looks like you are facing the same limitation as me, see this question . You cannot change the installation area ("per user" or "per machine") during the upgrade.
There is no easy way to get around this inside Windows Installer. You can only do a standalone bootstrapper exe that removes the previous version and then starts installing the new version.
source to share