jmoleary
Posts: 39
Joined: Mon May 13, 2019 7:30 pm

How can I prevent AI from automatically generating a new product code

Mon Jun 29, 2020 11:01 pm

Is there a setting I can set so that Advance Installer will stop trying to automatically generate new product codes for me? I can't find one.

To explain: My .NET application has a version resource embedded within it. I have my Advanced Installer project set up to retrieve its version number from the binary (under Product Details >> Version) This works fine except for one problem: My build number increments every day and it is a part of the version. I *want* it to be a part of the version. So on 3 successive days, my version will be

2.0.179.0
2.0.180.0
2.0.181.0

But when AI sees that it has changed, it tries to automatically generate a new product code for me. That I do NOT want. I only want AI go generate a new product code when I manually *tell* it to do so.

It sometimes presents me with a dialog, asking me if I want this change but not always. Regardless I don't even want a dialog. I want it to just not generate the code and not ask. In case I'm not the one who builds it and the next guy doesn't know what to do.

I can't find a product setting to prevent this. Is there a way to make this be so?

Catalin
Posts: 6537
Joined: Wed Jun 13, 2018 7:49 am

Re: How can I prevent AI from automatically generating a new product code

Tue Jun 30, 2020 9:12 am

Hello,

As you may already know, a product is solely identified by its ProductCode.

Two products having the same ProductCode can not be installed on the same machine. The OS will throw the following message:
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.
Basically, the logic behind this is that, since you have increased the version of your setup package, supposedly a previous version already exists and is installed on a computer. If the ProductCode is not changed and you try to install the newer version on the same computer, the above error will be thrown.

Unfortunately, I am afraid that the only way to avoid that is, when the dialog pops-up, to specify that it should not generate a new ProductCode.

Thank you for your understanding.

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

jmoleary
Posts: 39
Joined: Mon May 13, 2019 7:30 pm

Re: How can I prevent AI from automatically generating a new product code

Tue Jun 30, 2020 5:52 pm

Unfortunately that version feature seems to be the only way to get my full version to show up next to my app under Windows Settings >> Apps And Features. I want it to show my app version 2.1.XXX.0 there.

In fact, I've noticed that even Advanced Installer itself shows its full version there, under Settings >> Apps and Feature. Right now it show I'm running AI 17.1.2 Previously I was running 17.1.0. Does this mean that AI 17.1.2 actually has a different product code from AI 17.1.0?

Because it neatly took care of uninstalling the previous version. I'd like to get the same seamless functionality but I thought I needed to keep the same product code.

Catalin
Posts: 6537
Joined: Wed Jun 13, 2018 7:49 am

Re: How can I prevent AI from automatically generating a new product code

Thu Jul 02, 2020 9:01 am

Hello,
Because it neatly took care of uninstalling the previous version. I'd like to get the same seamless functionality but I thought I needed to keep the same product code.
Yes, the ProductCode is always different, otherwise the following message would be thrown when trying to install two products having the same ProductCode:
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.
If you want your newer version to replace the older version, the ProductCode should be changed between the two versions.

The ProductCode should stay the same only when you are trying to create a patch.

Hope things are more clear now.

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

Return to “Common Problems”