cop4587
cop4587

Reputation: 11

Wix action FindRelatedProducts not working

This could be a stupid question.

What we did

We just want to use FindRelatedProducts action to check existing installation's version, by following Wix tutorial:

<Upgrade Id='YOURGUID-7349-453F-94F6-BCB5110BA4FD'>
  <UpgradeVersion OnlyDetect='yes' Property='SELFFOUND'
    Minimum='1.0.1' IncludeMinimum='yes'
    Maximum='1.0.1' IncludeMaximum='yes' />
  <UpgradeVersion OnlyDetect='yes' Property='NEWERFOUND'
    Minimum='1.0.1' IncludeMinimum='no' />
</Upgrade>
...
<CustomAction Id='AlreadyUpdated' Error='Foobar 1.0 has already been updated to 1.0.1 or newer.' />
<CustomAction Id='NoDowngrade' Error='A later version of [ProductName] is already installed.' />

<InstallExecuteSequence>
  <Custom Action='AlreadyUpdated' After='FindRelatedProducts'>SELFFOUND</Custom>
  <Custom Action='NoDowngrade' After='FindRelatedProducts'>NEWERFOUND</Custom>
</InstallExecuteSequence>

What we get

We used Orca to check the installation entry info on .msi files (1.0.0 and 1.0.1), properties of both are correct.

We used msiexec /a foo_1.0.x.msi /l* foo_1.0.x.log to get the log, but found the NEWERFOUND property is NOT set!

What we did wrong?

Upvotes: 1

Views: 2295

Answers (2)

Frank
Frank

Reputation: 831

YES, I have try the example from WiX tutorial, replace YOURGUID*** with real GUID, the example doesn't work, I still can install old version over the new version, the downgrade check mechanism seems do not work.

Upvotes: 0

Yan Sklyarenko
Yan Sklyarenko

Reputation: 32240

Make sure the UpgradeCode is the same for both 1.0.0 package and 1.0.1 package and in Upgrade/@Id attribute.

Upvotes: 1

Related Questions