Patch Project error - PackageCode {} Is not Unique - 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!

Alastair
Posts: 42
Joined: Tue Jul 14, 2009 9:54 am
Location: UK

Patch Project error - PackageCode {} Is not Unique

Hi,

While building a patch family I get the error "PackageCode {GUID} is not unique"

The patch setup is:
Upgraded 1 = MyApp.exe v4.11, Target is MyApp.exe v4.10
Upgraded 2 = MyApp.exe v4.12, Target is MyApp.exe v4.11

The {GUID} shown in the error message is the PackageCode for MyApp.exe v4.11.

As soon as an msi is referenced a second time within the patch project I get the same "PackageCode {GUID} is not unique" error.
I must be setting this up wrongly but can't what the problem is.

The intention is to have a single patch family that can be deployed to customers on any version and have Windows Installer apply the appropriate patch sequence. Our versioning numbering scheme is to increment the revision number by 10 with each release, e.g. 4.1.10, 4.1.20, 4.1.30, etc and any hot fixes increment by one, so that 4.1.11, 4.1.12 and 4.1.21 are all hot fixes. I'd planned to have a patch family to patch from one version to the next, so there would be a patch to go from 4.1.10 to 4.1.11, then another patch to go from 4.1.11 to 4.1.12, then a patch for 4.1.12 to 4.1.20, then 4.1.20 to 4.1.21 then finally a patch to go from 4.1.21 to 4.1.30.

The idea with this scheme is that we can make use of Least Privilege User Account patching to upgrade a customer from any version to the latest version by applying the correct sequence of binary delta patches.

Am I thinking about this wrongly ?

Your assistance will be appreciated.

Thanks,
Alastair
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Patch Project error - PackageCode {} Is not Unique

Hi Alastair,

Unfortunately this is not supported by patches. However, for an upgraded image you can specify multiple targets. For example, the 4.1.30 image can have the following targets: 4.1.21, 4.1.20, 4.1.12, 4.1.11, 4.1.10. This way any of these targets will be upgraded if found on the machine.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alastair
Posts: 42
Joined: Tue Jul 14, 2009 9:54 am
Location: UK

Re: Patch Project error - PackageCode {} Is not Unique

Hi Cosmin,

Thanks for your reply and apologies for the delay in getting back to you.

I based my understanding of patching on the Microsoft White Paper "Patch Sequencing in Windows Installer version 3.0", dated 28/10/2004 (copy available on request).

The document as a whole strongly recommends a single patch family for a product and pages 29 - 31 describe a linear sequence of patches for a product. My interpretation of the guidelines resulted in the patching approach described in my first post in this topic.

I may be misunderstanding something, but it looks to me that Advanced Installer's approach to patching is different from the approach described in the Microsoft White Paper. Is this the case ?

It would help my understanding of Advanced Installer's patching if you would explain the use of multiple "New Upgraded..." items within a single patch. E.g. with the following patch structure, what version would Windows installer apply ?

New Upgraded 1 = v4.1.12 and has targets of v4.1.10 and v4.1.11
New Upgraded 2 = v4.1.20 and has targets of v4.1.10 and v4.1.11 and v4.1.12
Actually this won't compile due to the presence of 2 instances of v4.1.10 and v4.1.11, which is really the basis of my question, how to make use of multipe "New Upgraded..." items within a single patch ?

One more aspect to this which I don't yet understand: is a patch family as defined in an Advanced Installer patch project the same as a patch family as described in the Microsoft White Paper mentioned above ?

Kind regards,
Alastair McDonald
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Patch Project error - PackageCode {} Is not Unique

Hi Alastair,
The document as a whole strongly recommends a single patch family for a product
The approach I mentioned in my previous post follows this recommendation.
it looks to me that Advanced Installer's approach to patching is different from the approach described in the Microsoft White Paper. Is this the case ?
No, Advanced Installer uses the recommended approaches.
It would help my understanding of Advanced Installer's patching if you would explain the use of multiple "New Upgraded..." items within a single patch.
You can define multiple upgraded images when you want to update different versions of your product. For example, if you have the product versions 1.9.0, 1.9.1, 2.1.0 and 2.1.3 you could define this patch family:

Code: Select all

1.9.1
  1.9.0
2.1.3
  2.1.0
This patch would update 1.9.0 to 1.9.1 or 2.1.0 to 2.1.3, depending on which target is found on the machine. An update from 1.9.0 to 2.1.3 is not possible because the major version is changed.
is a patch family as defined in an Advanced Installer patch project the same as a patch family as described in the Microsoft White Paper mentioned above ?
Yes, they represent the same concept. Basically, a patch family defines related updates for a product. Each upgraded image can have multiple targets, but an upgraded image cannot be a target in the same family. This way an update is applied with one install instead of updating each target with a higher version target.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alastair
Posts: 42
Joined: Tue Jul 14, 2009 9:54 am
Location: UK

Re: Patch Project error - PackageCode {} Is not Unique

Hi Cosmin,

Thank you for this information, much appreciated.

Kind regards,
Alastair

Return to “Common Problems”