We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

binary.cat
Posts: 1
Joined: Mon Jun 19, 2017 2:04 pm

Understanding patches and product codes

I am trying to design the update/patching scheme for my program for advanced installer (just started using it). This is how I see it now:

1. Minor updates (e.g. 1.0.0 to 1.0.1) should be updated through MSP patches.
2. Major updates (e.g. 1.0.1 to 1.1.0) should be updated through full MSI installer.
3. Any version can be updated to the latest version through full MSI installer downloadable through program's website.
4. My program sends its version to update server to check if there is a MSP patch available to update to the latest version, or if MSI is needed.
5. Update server always has one latest MSI (e.g. "1.1.4.msi") and a number of MSP files (e.g. "1.1.0-to-1.1.4.msp", "1.1.1-to-1.1.4.msp", etc.).

The only thing I can't fully understand right now (as I think) is how the product codes are working. I am seeing a contradiction, according to the manual. To satisfy design requirement #3, each msi update must have different product code. To satisfy design requirement #1, minor updates must have the same product code.

How should I solve this problem? Or should I reconsider my initial design?

It would be great to hear an advice from experts.

Thank you!
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Understanding patches and product codes

Hello and welcome to our Forums,
1. Minor updates (e.g. 1.0.0 to 1.0.1) should be updated through MSP patches.
Windows Installer allows you to upgrade an installation in multiple ways. The most important are:

- the automatic upgrade feature (the old package is uninstalled before the new one is installed)

- a patch

Upgrades:
A major upgrade is essentially the removal of an older product which is replaced by a newer product.

Patches:
A patch contains only the differences between two version of the product. That means that through a patch you can only update a package which is already installed.
The only thing I can't fully understand right now (as I think) is how the product codes are working. I am seeing a contradiction, according to the manual. To satisfy design requirement #3, each msi update must have different product code. To satisfy design requirement #1, minor updates must have the same product code.
When creating a new package version you need to know that if you do not change the product code, you will be able to create patches but when you try to install the whole package on a machine that has already the product installed you will encounter an error - another version of this product is installed, thus you have a choice between creating a patch or an upgrade for that version.

Also, you need to know that there are some restrictions when authoring patches. Please take a look on this article : Creating Patches

However, your scenario could be implemented in the following way:

- Select "EXE Setup" with resources inside it
- Select "Install MSI as minor upgrade (if applicable) from "Builds" page.
- Do not change the product code for minor updates
- Change the product code for major updates

In this case you do not need to create patches. Just place on the latest package version on the update server. This method will install the latest version in both of the possible situations: a previous version is installed or a previous version is not installed.

The only drawback of this method would be from a package size point of view. The updater will always download whole package.

Please let me know if you have any other questions.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”