views:

34

answers:

1

I have a major upgrade that I am trying to do, but it just doesn't work. It simply installs the new program along side the old one. They are in different directories (as I changed the directory structure with the new version) so there are no conflicts, but the old one NEEDS to be erased in order for my product to function properly.

<Property Id="UPGRADE_NEEDED" Secure="yes" />
<Property Id="SAME_OR_NEWER_VERSION" Secure="yes" />
<InstallExecuteSequence>
    <RemoveExistingProducts After="InstallFinalize" />
</InstallExecuteSequence>
<Upgrade Id="{PUT-YOUR-GUID-HERE}">
    <UpgradeVersion Minimum="5.1.3" OnlyDetect="yes" IncludeMinimum="yes" Property="SAME_OR_NEWER_VERSION" />
    <UpgradeVersion Minimum="5.1" Maximum="5.1.3" Language="1033" Property="UPGRADE_NEEDED" MigrateFeatures="yes" IncludeMinimum="yes" />

That is my upgrade elements (with GUID removed of course). If anyone can find where the problem lies I would greatly appreciate it.

+2  A: 

There are some general rules for an upgrade to be working:

  1. Old and new products must have identical UpgradeCode values and different ProductCode values.

  2. Old and new products must have identical values for InstallAllUsers [i.e. a per-machine installation cannot upgrade a per-user installation and vice-versa.]

  3. New product's setup Version (the setup project, nothing to do with file versions) must be higher.

  4. All setup versions (again, not file versions) must be 1.0 or greater.

Further details how to correctly implement an upgrade using WiX can be found in this thread:

How to implement WiX installer upgrade?

0xA3
I think you might be onto something with the InstallAllUsers value. I set that explicitly with the new MSI (the old one was created with other technology than WiX so I am not able to edit that one anymore). I am testing it now and will mark this as solved if it works. Thanks a lot for all your help.
Adkins
still doesn't work. I have read through the post you linked (previous to writing this question) and tried everything that was written in there as well. I am really at a loss as to the issue, because this MSI is installed with several MSI's (through the use of a chainer) and they are all written basically the same and all upgrade except for this one. Very strange.
Adkins
@Adkins: Did you try moving the `RemoveExistingProducts` action *before* the `InstallFinalize` action, i.e. `<RemoveExistingProducts Before="InstallFinalize" />`? What happens if you don't use the chainer, but test only the specific MSI file that is not correctly upgraded? Are the file versions of the components to be installed higher in the new version of the MSI than the already installed version?
0xA3
The problem was related to the Version Number. The old version number was 5.1.202 and the new is 5.1.3.0. I was searching for 5.1.2 to (but not including) 5.1.3 Once I changed that search to be from 5.1.2 to (and including) 5.1.300 this strange behavior disappeared. I tried this cause I noticed all my other MSI's did the test the same way. Very strange but solved at least.
Adkins