문제

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