0

I have had Major Upgrades working in a WiX v3.11 installer, following this tutorial and learning quite a bit (German only).

But now WiX 4 is here which I want to try out for an update from 2.0.0 (build with WiX 3.11) to 2.1.0 (build with WiX 4.0.3). And I see that the mentioned tutorial is somewhat outdated:

  • Product element is Package now, so Product.Version is Package.Version now
  • Product.Id is Package.ProductCode now

I would have thought that – besides the naming – everything works as before. So I bumped my version value from 2.0.0 to 2.1.0 and generated a new Package.ProductCode GUID (instead of Product.Id), just as said in step 2 of the tutorial. But my 2.1 product is installed additionally to 2.0:

v2.1.0 and v2.0.0 in parallel

I was not able to find an Upgrade tutorial especially for WiX 4, so my question is: What do I have to know to make this work?

UPDATE: I was able to verify with a second installer that our set-up is working. This is NOT an issue of WiX, nor WiX 3 vs. 4! But nevertheless this is a problem, so I tried to get some debug information by upgrade both products by running msiexec.exe /i each.msi /L*VX debug.log. Now in the working installer's log I see

MSI (c) (0C:2C) [01:08:30:365]: Doing action: FindRelatedProducts
Action 1:08:30: FindRelatedProducts. Searching for related applications
Action start 1:08:30: FindRelatedProducts.
FindRelatedProducts: Found application: {02494A83-9693-3A7E-B7F0-BC314326DD43}
MSI (c) (0C:2C) [01:08:30:370]: PROPERTY CHANGE: Adding WIX_UPGRADE_DETECTED property. Its value is '{02494A83-9693-3A7E-B7F0-BC314326DD43}'.
MSI (c) (0C:2C) [01:08:30:370]: PROPERTY CHANGE: Adding MIGRATE property. Its value is '{02494A83-9693-3A7E-B7F0-BC314326DD43}'.
Action ended 1:08:30: FindRelatedProducts. Return value 1.

while in the not working installer's log this reads:

MSI (c) (EC:58) [00:59:33:824]: Doing action: FindRelatedProducts
Action 0:59:33: FindRelatedProducts. Searching for related applications
Action start 0:59:33: FindRelatedProducts.
Action ended 0:59:33: FindRelatedProducts. Return value 1.

I read here that FindRelatedProducts considers UpgradeCode, version, language. All of these are unchanged between 2.0 and 2.1 in both projects. So it remains unclear, when and why WiX 4 does not find "related" aka previous WiX 3 installations.

2 Answers 2

0

You don't provide enough code to really know what is going on but it generally sounds like you've done the necessary work.

I covered upgrades in S1:E4 of the Deployment Dojo - Out with the Old. In with the New. In the end you'll get something like:

<Package UpgradeCode='{GUID-MUST-NOT-CHANGE}' Name='Stuff' Manufacturer='Me' Version='2.0.3'>
   <MajorUpgrade DowngradeErrorMessage='Cannot downgrade' /> 
Sign up to request clarification or add additional context in comments.

3 Comments

Thank you. I could verify in a different project that our approach is working and WiX 4 indeed works identically (besides naming). There has to be a problem with our UpgradeCode, not with the procedure itself. I'll leave this question here at least until I found the actual reason.
#fyi: You've been right, I did not provide the important information (but neither did Microsoft, kind of): The product was installed per-user, the update per-machine, see my answer. Thanks again!
Ahh, yes, the dreaded cross-install-scope registration. I forget about checking that. More of your code might have helped see that.
0

The documentation says

The FindRelatedProducts action uses the UpgradeCode property and the version and language information authored into the Upgrade table to detect installed products affected by the pending upgrade.

But that's not sufficient. It may find a "related" product, but skips that anyways – e.g. if that product installed per-user (=registered under Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Installer\Products\), while the upgrade is installed per-machine (=registered under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\). This is the "Scope" in WiX.

You can see if this happens by enabling debugging (<Property Id="MsiLogging" Value="voicewarmupx"/>, logs are stored in C:\Users\<username>\AppData\Local\temp) and searching for

FindRelatedProducts: current install is per-machine. Related install for product '{FA3BF64B-3497-3605-AAC4-9210007BF8D6}' is per-user. Skipping...

So the answer here is: Make sure to install both the product and its update in the same scope! You can do so by using the Scope attribute of the Package element, see here.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.