简体   繁体   中英

Remove previous installation on WiX

I have a product distributed on a website. Every time a user downloads this file, I compile everything again with WiX. In each build, the version doesn't change, but some files do.

Question
How to force the installer to uninstall my software, no matter the version, before it begins the installation itself?

EDITED
I already tried this:

<MajorUpgrade DowngradeErrorMessage="Erro Message." />

Change the product ID to *, this will ensure that a unique GUID is generated during the MSI compilation.

Then add the following :

<Property Id="OLDVersion" Secure="yes" /> 
<Upgrade Id="YOUR_GUID">      
     <UpgradeVersion
            Minimum="1.0.0.0" Maximum="99.0.0.0"
            Property="OLDVersion"
            IncludeMinimum="yes" IncludeMaximum="no" /> 
</Upgrade>

Under InstallExecuteSequence add:

<RemoveExistingProducts Before="InstallInitialize" /> 

This should take care of uninstalling the previously installed versions.

Make sure that the Upgrade GUID which you are using is common across all the versions of your MSI.

Check this LINK

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM