how to configure multiple patches and only update to latest - Advanced Installer Community

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!

toddpatt
Posts: 111
Joined: Fri Jan 08, 2010 1:36 am

how to configure multiple patches and only update to latest

Hi,

I am using AI 7.6 build 27499

I have several questions concerning patches. I have read all related documentation from Caphyon and several forum topics on the same issue.

I am able to successfully configure the first patch (p1) for my project, create an updater config file for it, and install it via the updater.exe
My first patch project looks like this:

Code: Select all

Family
 - p1 (1.0.0.1)
  -- base (1.0.0.0)
I then tried to configure the second patch (p2) which should be capable of updating either the base or p1, depending on what is already installed on the target machine. This is the step I am struggling with.

Originally, I tried to create p2 from the same project (same .aip file) I used to create p1. I added a "New Upgraded" image and two "New Target" images, giving me this:

Code: Select all

Family
 - p1 (1.0.0.1)
  -- base (1.0.0.0)
 - p2 (1.0.0.2)
  -- base (1.0.0.0)
  -- p1 (1.0.0.1)
This fails to build, giving me the same error as discussed in this forum topic - "PackageCode {GUID} is not unique."

I then tried to move p2 to a new family, giving me this:

Code: Select all

Family
 - p1 (1.0.0.1)
  -- base (1.0.0.0)
Family2
 - p2 (1.0.0.2)
  -- base (1.0.0.0)
  -- p1 (1.0.0.1)
That also failed to build with the same error.

Finally, the only solution I found was to create an entirely new project (new .aip file) for p2. In this project, my image family looks like this:

Code: Select all

Family
 - p2 (1.0.0.2)
  -- base (1.0.0.0)
  -- p1 (1.0.0.1)
This builds successfully and generates an MSP patch which seems to function correctly. However, I am wondering if this is the best/correct way to configure and manage subsequent patches? Do I need to create a separate project for each new patch, and then add each of the previous patches to the image tree? That seems very wasteful in terms of disk space on the machine where I'm building the patches. Each image in the tree contains the source MSI plus all of the extracted contents of that MSI.
We are anticipating many small bug-fixes which we'd like to deploy a few times each month. For minor bug fixes, I think we prefer to treat them as patches and just increment the fourth digit in the ProductVersion. However, I'm now concerned that this approach is going to require a lot of work, since it seems like I will need to create a new project each time and then add *all* of the previous patches to the image tree.

My second question concerns the updater and how to install these patches. After I got my p2 built, I added it to my updater config file and set it to replace p1 (Replaces=All). I then ran the following test:
1.) install only the "base" version, 1.0.0.0
2.) check for updates

The updater window/dialog lists both patches. p2 is selected by default and p1 is unselected by default. If I click the checkbox for p1, then p2 is automatically unselected - it seems they are mutually exclusive. It would be preferable if p1 were not listed at all since it is superseded by p2. Once we have several patches, I don't want them all to display in the updater dialog, as that could be very confusing for the end-user. Is there a way I can configure the updater file so that only the most recent patch is displayed? Or is there a better way to handle the patches?

As always, thanks for your help.
-Todd
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: how to configure multiple patches and only update to latest

Hi Todd,

When creating an upgraded image and adding target images under that, it basically means Windows Installer will search the system for any of the target images and if found, will install upgrade it to the upgraded image.

If you have two upgraded images both upgrading the same target version, which upgrade would Windows Installer apply to the target? It wouldn't know which one, which is why you have to create separate .msp, thus you will need a separate .aip

One other thing I noticed, your version is composed of 4 fields. This is not a valid Windows Installer version. Windows Installer will ignore the fourth field. Thus, versions 7.6.1.4 and 7.6.1.5 are viewed as identical by Windows Installer. I highly recommend using 3 fields for the version.

Regarding patching strategy. I do not recommend always creating patches for all previous versions of your product. That would be cumbersome. I instead recommend you follow the patching strategy I described in this post:
http://www.advancedinstaller.com/forums ... 674#p28674

Regarding your second question, I recommend you use 3 field version numbers and try again.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
toddpatt
Posts: 111
Joined: Fri Jan 08, 2010 1:36 am

Re: how to configure multiple patches and only update to latest

Thanks for all the info, Gabriel.

Concerning the ProductVersion, I am aware that the fourth field is ignored by Windows Installer. However, our engineering team has a versioning model which requires all four of the fields. For patches, we would prefer to only update the fourth field. Since patches do not change the ProductCode anyhow, it seems safe to use the fourth field. Assuming we are aware that the fourth field is purely for display purposes and that Windows Installer ignores it when comparing the ProductVersion, are there other risks assumed by using the fourth field?

Concerning the patching strategy, I can see that patches can quickly become very burdensome. Having used Advanced Installer for the past several months and updated it from 7.3 to 7.6, I am aware that AI relies on updates and never patches. It seems you guys prefer to avoid patches as well? Just trying to get a better sense from someone with more experience.

Concerning the listing of updates (see attached screenshot), I was asking whether it was possible to hide all updates except the latest. For example, if I install AI 7.3 and then check for updates, I see all of the updates between 7.3 and the latest version (see screenshot).
Advanced Installer updates listing / display
Advanced Installer updates listing / display
AI updates after v7.3.JPG (112.98 KiB) Viewed 5319 times
However, after thinking about it more I realized that I could just remove the "old" updates from the updater configuration file. It could be nice to have a "Display=true|false" flag for each update, which would allow us to hide the older updates from users but still maintain them in the configuration file for our own purposes. Anyhow, that is trivial.

thanks,
-Todd
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: how to configure multiple patches and only update to latest

Hello again,

There aren't any risks in using a fourth field. Simply expect a behavior that only treats the first 3 fields and ignores the fourth.
Concerning the patching strategy, I can see that patches can quickly become very burdensome. Having used Advanced Installer for the past several months and updated it from 7.3 to 7.6, I am aware that AI relies on updates and never patches. It seems you guys prefer to avoid patches as well? Just trying to get a better sense from someone with more experience.
We strive to keep AI's installation kit as small as possible. It only has about 30MB so downloading a full installer wouldn't be much of an issue to anyone. Thus, patches would only needlessly complicate things without gaining too much from using them. However take games for example. These, more often than not, have a significant size. Patches are a common method of fixing bugs for released games, so they are good for releasing updates to applications that occupy more space. At the cost of managing patches of course.

Regarding hiding previous versions of your application, I would also advise against it. Your users will sooner or later download the latest version and find a newly introduced bug is preventing them from achieving their goals. Because of this, they will want to upgrade to some lower version, not the latest. Other times your user's license will not cover the latest version released. For example your user has version 4.5. Latest version released is version 4.8 but your user's license only covers up to 4.7 so the user will most likely want to update to 4.7 not 4.8.

Let me know if this helped.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
toddpatt
Posts: 111
Joined: Fri Jan 08, 2010 1:36 am

Re: how to configure multiple patches and only update to latest

Thanks Gabriel - I appreciate all of the detailed information. Your advice and experience is very helpful; I am rethinking how we should handle updates and patches based on your input.

-Todd

Return to “Common Problems”