Вопрос

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top