Preparing a 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'sId
attribute to a new GUIDIncrement the
Product
element'sVersion
attributeAdd and configure a
MajorUpgrade
element
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 called OldInstaller
.
You may recall that you can use an asterisk (*
) for Id
in the Product
element, and WiX will choose a new GUID for you each time you compile the project. You can do that here, if you choose to. However, we will use a hardcoded GUID to draw attention to that we are definitely changing it during a major upgrade. As you'll see, we will not be changing it when making a minor upgrade or small update:
<?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com...