Reputation: 1736
I have changed a UIRef tag between versions of my deployment.
from Version 1.0: <UIRef ID="WixUI_FeatureTree" />
to Version 2.0: <UIRef ID="WixUI_Advanced" />
Wix Version 3.6
Now, when I run the Version 2.0 installer, it does not detect the previous version, so instead of uninstalling during the upgrade it installs a new version next to the existing version.
Intermediate versions upgraded fine (1.0->1.1->1.2).
The major changes in 2.0 are:
Remove Existing Products is defined as:
<InstallExecuteSequence>
<RemoveExistingProducts After='InstallInitialize' />
<Custom Action=...
...
My product is defined as:
#UpgradeCode# is consistent between versions
#ProductId# is changed between versions
<Product Id="#ProductId"
UpgradeCode="#UpgradeCode#"
Name="!(loc.ApplicationName)"
Language="1033"
Codepage="1252"
Version="2.0.0"
Manufacturer="!(loc.Manufacturer)">
<Package
Id="*"
InstallerVersion="300"
InstallPrivileges="elevated"
Languages="1033"
Compressed="yes"
InstallScope="perMachine"
Manufacturer="!(loc.Manufacturer)"
SummaryCodepage="1252"
Platform="x86"
Description="!(loc.ApplicationName)"/>
<Upgrade Id="#UpgradeCode#">
<UpgradeVersion OnlyDetect="no" Property="PREVIOUSFOUND"
Minimum="1.0.0" IncludeMinimum="yes"
Maximum="2.0.0" IncludeMaximum="no"/>
</Upgrade>
I am wondering if there is something that I can do to force the installer to check the upgrade and perform remove of previous version that is no longer being handled following my changes.
Upvotes: 0
Views: 472
Reputation: 1736
In the build log I noticed:
MSI (c) (6C:C4) [12:04:44:624]: FindRelatedProducts: current install is per-user. Related install for product '{PRODUCT-GUID }' is per-machine. Skipping... Action ended 12:04:44: FindRelatedProducts. Return value 1.
I had removed:
<Product ... InstallScope="perMachine" ... />
when upgrading versions.
I did not realize that upgrade matching included the InstallScope
Property of Product.
I can still install per-user using <UIRef Id="WixUI_Advanced" />
, so this property does not seem to affect the selection of PerMachine
or PerUser
, so I have put it back in. Upgrade now works again.
Upvotes: 1