Major upgrade

A major upgrade is a full installation package that removes any older versions of the same product. To create one, you'll need to do the following:

  • Change the Product element's Id to a new GUID
  • Increment the Product element's Version
  • Add an Upgrade element that defines which older versions to remove
  • Add the RemoveExistingProducts standard action to the InstallExecuteSequence

We'll go over each step. Before we get to that, let's make an MSI that will install the "old" software—the software to update. You can use the following markup in a new WiX project, which you can call "OldInstaller". Notice that the Product element's Version is "1.0.0.0". Also, take notice of the Product's Id and UpgradeCode, as these will come into play later.

Get WiX: A Developer's Guide to Windows Installer XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.