Alexandru
Alexandru

Reputation: 12882

WiX MSI upgrade disallows installation of some components

When I try to do an upgrade of my project, I get the following logs for about eight or so components:

MSI (c) (24:EC) [11:50:17:422]: Disallowing installation of component: {290E89A8-6BA7-59F2-B350-BE657C2823BC} since the same component with higher versioned keyfile exists

The uninstall portion of the upgrade seems to remove all of the previously installed files, but when it installs the new files during the upgrade, it seems to disallow the installation of eight or so components/files. The upgrade succeeds, but the these eight files are not present. I use the following criteria for my upgrade (my Product ID is *, by the way):

<Upgrade Id="{16B40AC6-1F80-47CD-9955-BDCC5BB297E4}">
    <UpgradeVersion Minimum="$(var.InstallerVersion)" Property="NEWPRODUCTFOUND" OnlyDetect="yes" IncludeMinimum="no" Language="1033" />
    <UpgradeVersion Minimum="0.0.0" Maximum="$(var.InstallerVersion)" Property="OLDPRODUCTFOUND" OnlyDetect="no" IncludeMinimum="yes" IncludeMaximum="yes" Language="1033" />
</Upgrade>
<InstallExecuteSequence>
...
    <RemoveExistingProducts Before="InstallInitialize" />
...
</InstallExecuteSequence>

I have tried to circumvent the issue using the steps described here but have had no success. Could anyone shed some light as to how I may be able to get my new files installed on an upgrade? What is odd, is that if I do an uninstall of the old version through Programs and Features, and then install the new version, it works and all files are installed (hence, it works when not upgrading), but when upgrading, it does not install some of my files.

Edit: It just so happens that setting the REINSTALLMODE property to amus will force it to reinstall files regardless of version and checksum, and it works now since the default for it is omus, but I am not sure if this is the best approach:

<Property Id="REINSTALLMODE" Value="amus" />

Upvotes: 1

Views: 1515

Answers (1)

PhilDW
PhilDW

Reputation: 20780

The issue seems to be a recurring one, similar to this:

http://support.microsoft.com/kb/905238

Windows decides not to install the files because a higher version exists, but doesn't re-evaluate that decision when it turns out we're doing a major upgrade. I thought this issue had been fixed in MSI 4.5.

Doing the RemoveExistingProducts before CostInitialize should solve the problem, but you'll get some ICE errors and lose migration of features during the upgrade, if you're using that capability.

Upvotes: 4

Related Questions