Fact
It's possible remove previous version and install newer with WiX using something like this:

<MajorUpgrade Schedule="afterInstallInitialize"
  DowngradeErrorMessage="A later version is already installed."/>

Complication
With same valid version (Example 1.0.0.0 and 1.0.0.1, the 4th part it's not considered as a diferent version) the program don't uninstall the previous version.

Question Goal
How force program reinstall the same valid version. I mean, uninstall the previous application first and then install current version in msi file?

有帮助吗?

解决方案

If you use the AllowSameVersionUpgrades attribute your installer will perform an upgrade when only the revision has changed.

<MajorUpgrade
  Schedule="afterInstallInitialize"
  AllowSameVersionUpgrades="yes" 
  DowngradeErrorMessage="A later version is already installed."/>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top