ckhos
Posts: 2
Joined: Sat Jul 02, 2022 1:03 am

Product Code Not Refreshing With AI 20.7.0+

We've used Azure Devops tools to build our MSI files for years. Recently we've been getting an error saying, "Another version of this product is already installed." when we are trying to install a newer version. Previously the installer would uninstall the old version and run the new installer.

After some investigation, it looks like update 20.7.0+ is causing this error for us. We have not change a aip file at all, but when our pipeline started using AI 20.7.0+ the Product Code is no longer automatically re-generating. We've always updated the Product Version in the pipeline and that has been refreshing a new product code, but the newer version of AI seem to no longer behave this way.

I also saw this in the update notes:
New option to control "ProductCode" regeneration when "ProductVersion" is changed
But I can't seem to find any documentation on this new option, and am surprised the default implementation disrupted our existing project. Can you offer some advice on what we should do other than using an older version of AI?
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Product Code Not Refreshing With AI 20.7.0+

Hello and welcome to our forums,

Normally, when you change the ProductVersion, you are prompted to change the ProductCode as well.

If you do this through a pipeline, this should happen automatically unless you tell it not to.

For instance, through the "SetVersion" command line option, you have specific "noprodcode" that specifically mentions to not generate a new one.

If possible, could you please give me some more details about how you are doing this (i.e. what command line you're using) so I can run some tests on my end?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ckhos
Posts: 2
Joined: Sat Jul 02, 2022 1:03 am

Re: Product Code Not Refreshing With AI 20.7.0+

Here is the YAML from the Devops Pipeline.
steps:
- task: caphyon.AdvancedInstaller-BuildTask.Caphyon.AdvancedInstaller.BuildTask.AdvancedInstaller@2
displayName: 'Build Advanced Installer package $/Example.aip'
inputs:
advinstLicense: '$(AdvancedInstallerLIcense)'
aipPath: '$/Example.aip'
We have the project set up to pull the version automatically from our exe file. While confirming this info, I noticed the options button next to the Version field in the Product Detail page. Is that the new option that was added in 20.7.0? The value that was set for our project is "Never generate a new ProductCode and component's GUIDs when ProductVersion changes". I will be changing that to "Always generate a new ProductCode..." and I think that should get us back to how it was before.
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Product Code Not Refreshing With AI 20.7.0+

Hello,
We have the project set up to pull the version automatically from our exe file. While confirming this info, I noticed the options button next to the Version field in the Product Detail page. Is that the new option that was added in 20.7.0? The value that was set for our project is "Never generate a new ProductCode and component's GUIDs when ProductVersion changes". I will be changing that to "Always generate a new ProductCode..." and I think that should get us back to how it was before.
Really good catch here! :)

We have indeed added that option to prevent the automatic generation of ProductCode for customers who wanted to create patches - because a patch requires the same ProductCode.

After changing that behavior, we should indeed go back to how things were.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BRasch
Posts: 2
Joined: Tue Jul 04, 2023 1:11 pm

Re: Product Code Not Refreshing With AI 20.7.0+

So we have the same problem with an upgrade from 20.2 to 20.8.

Just opening the *.aip file and saving it again without even touching this option changes the <option> value in the .aip file from "16" to "24".

This is apparently the new value for the option to "never change" the product code.

This is IMHO a bug as you can't just change the behavior for everyone like that and the default should simply be the option that was default until 20.7.

As I understand it, everyone has to now proactively change this option to "always change" just to get back to the status quo?

Which value should <options> have if I do not want to change my AIs behavior at all after the upgrade?
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Product Code Not Refreshing With AI 20.7.0+

Hello and welcome to our forums,

First of all, I totally understand your point here and I am sorry to hear it has cause such issues for you.

This option was added specifically for users who built patches to avoid a corner case scenario that led to the customer not being able to build a patch.

I will try to discuss this with our dev team to see whether we can find a common ground to satisfy everyone.
As I understand it, everyone has to now proactively change this option to "always change" just to get back to the status quo?
For now, yes, the option should be set using the "Options" hyperlink from the "Product Details" page.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BRasch
Posts: 2
Joined: Tue Jul 04, 2023 1:11 pm

Re: Product Code Not Refreshing With AI 20.7.0+

Thanks for your answer!

Just to reiterate: This breaking change is quite dangerous for any live production system and the default behavior has to be that nothing changes unless you specifically and knowingly opt-in to it.

Please also answer this question about the *.aip file, so that we can do a save upgrade in the future as we are now forced to roll our systems back to the last used version (20.2.1) to make sure we do not fry our customers installations:
Which value should <options> have if I do not want to change my AIs behavior at all after the upgrade?
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Product Code Not Refreshing With AI 20.7.0+

Hello,

The default Advanced Installer behavior has been to ask the user whether he wants or not to change the ProductCode.
Screenshot_32.png
Screenshot_32.png (8.9 KiB) Viewed 8571 times


Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”