[wix-users] Creating a Minor Upgrade Shipped as a Full Installation Package

joel at techtonictools.com joel at techtonictools.com
Mon Feb 15 10:58:01 PST 2021


I'm circling back to this to post how I handled it in case it helps anyone
in the future. I came to the conclusion that the Minor Upgrade path can lead
to difficulties creating future upgrade paths as the program grows and it is
iterated on for a while. Maybe for that reason the Minor Upgrade lacks a
clear documented path on how to code it up and how the system works. But
that a guess.

The issue with doing a Major Upgrade was the clients registry settings would
get whacked. So that wouldn't be a very good upgrade experience. A Major
Upgrade will remove and re-add the data vals in the Registry that it
created, but not the Registry Key. It leaves the root Key path that the data
vals are in. What I did was to remove the creation of data values
(<RegistryValue> elements) from the Wix <Registry> element in the .wsx file.
It sounds bad at first, but when the user does an uninstall from appwiz.cpl,
the root key is deleted so I'm not leaving garbage after an uninstall.
Everything is left as clean as a whistle. 

Saving the best for last. Using the Wix MajorUpgrade was a blessing. So
easy. Prior to deciding to use it, I was ready to jump off Wix and start
learning the native setup way. Much like when choosing C/C++ over .Net,
neither one is bad but there is a right tool for the job. But all that
humungous work and steep learning curve wasn't needed. So if I'm wrong about
why the Minor Upgrade path doesn't really exist, don't tell me lol.

In the .wsx file, I followed the Wix documentation and added the line
<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is
already installed. Setup will now exit."/>. Then (not knowing wix or Setup
that well), a duplicate symbol compile error was generated. The error was
"error LGHT0091: Duplicate symbol
'WixAction:InstallExecuteSequence/RemoveExistingProducts' found. "

To fix that, look for <RemoveExistingProducts Sequence="6550" /> and remove
it since the MajorUpgrade element has that feature bundled already.

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Joel
via wix-users
Sent: Thursday, February 11, 2021 8:05 PM
To: wix-users at lists.wixtoolset.org
Cc: joel at techtonictools.com
Subject: [wix-users] Creating a Minor Upgrade Shipped as a Full Installation
Package

I need to deploy an updated binary to machines that already have the
package/app installed, I need to leave the registry alone so that the user
settings are preserved and also increment the version number. For machines
that don't already have the package/app, I need the same .msi to perform a
full install. 

 

The Microsoft documentation for the Windows Installer
<https://docs.microsoft.com/en-us/windows/win32/msi/patching-and-upgrades>
says a Minor Upgrade can be shipped as a full installation package or as a
patch and that is the feature I'd like to use. But the Wix documentation for
Minor Upgrade points me to doing a patch instead. The book "Wix: A
Developers Guide to Windows Installer XML" also points to doing a patch.

 

Where can I learn how to use Wix to perform a Minor Upgrade shipped as a
full installation package? Any tips, pointers would be appreciated.


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/




More information about the wix-users mailing list