Hello Ed,
First of all, please accept my apologies for the delayed reply.
In what regards your questions, let's start this with some explanations:
First of all, we must know that there are two types of an update:
1. a major upgrade
2. a patch
What is a major upgrade?
A major upgrade is essentially the
removal of an older product which is
replaced by a newer product.
What is a patch?
A patch package is an MSP file containing usually
only the changes between the previous and the updated version.
Let's take your case here, as an example:
You have an installation. Let's say it installs one file: a.txt. After that, you want to deploy a new version that also contains another file: b.txt.
Let's consider our two options:
1. A major upgrade would first remove the first version installed and then install the newer version. The major benefit of a major upgrade is the fact that it can be installed as a standalone installation. However, here comes the question: Do we really need this in our case? I believe the answer to this is no.
Also, a major disadvantage of the major upgrade is its size.
2. A patch. Here, a patch would contain only the differences between the first version of your package and the updated version --> this means it will only contain the b.txt file, which will be added to a currently installed applicaiton.
A major advantage of the patch is the fact that its size is much smaller compared to the one of a major upgrade. However, a disadvantage is the fact that it can not be installed alone, it requires the previous version to already be installed, pretty much what you would like to achieve (please correct me if I'm wrong).
As you may already know, the MSI file is basically a database file. The patch is created by taking two MSI files and comparing them. The differences between those two are then saved into another MSI. When installed, a patch will detect the previous version and then basically joining the tables of the two databases.
A little example: let's consider we have v1.0 and v2.0 of our application. From these two, we create v.Patch patch file.
We install v1.0 on the machine. We then apply v.Path file to our currently v1.0 and we will obtain v2.0.
Let's go a bit further with the explanation and discuss
UpgradeCode and
ProductCode properties:
The
UpgradeCode is a GUID representing a related set of products. A set of different versions of your application will have the same UpgradeCode. This enables newer versions of your application to search and upgrade previous versions installed on the same computer.
The
ProductCode property is a unique GUID
used to identify your application. This identifier varies from version to version of the same installer.
One major differences between a patch and a major upgrade is the fact that:
- a patch must have the same
ProductCode as the previously installed version. As I have highlighted above, the ProductCode is used to identify your applicaiton. The patch must be able to identify which database to attach to, therefore the ProductCode must be the same
- a major upgrade must have
different ProductCode. It is important to note that two products with the same ProductCode can not be installed on the same computer. Windows Installer will prevent this with an error reading:
Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Programs and Features in the Control Panel.
Now, coming back to your scenario. I believe that in your case, a patch would be better compared to a major upgrade.
For more information about creating a patch, please have a look on our
"Creating Patches" article.
Hope this help.
Best regards,
Catalin