Installation not recognized when recreating installer - Advanced Installer Community
MGS
Posts: 128
Joined: Tue Oct 04, 2022 9:52 am

Installation not recognized when recreating installer

Hi,

I create an installer two times using a power shell script to build the .aip project. I make sure to generate a new ProductCode, but I also assign the same UpgradeCode both times. Thus in the end I have (imaginary numbers just to visualize it):
Installer 1: ProductCode ABC123, UpgradeCode 555
Installer 2: ProductCode ABC124, UpgradeCode 555

Now when I execute installer 1 the first time, I can install it as usual. Afterwards when executing installer 1 again it shows the Maintenance Dialog. Now when I execute installer 2 here, it DOES NOT show the Maintenance Dialog. Why?
I still tried to push through with the installation of installer 2, and in the end I ended up with 2 entries of my program in "Programs and Features". Why?

All the best,
Johannes
Liviu
Posts: 1419
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Installation not recognized when recreating installer

Hello Johannes,

The ProductCode property is a unique GUID used to identify your application. It is important to note that two products with the same ProductCode can not be installed on the same computer. Windows Installer will prevent this with an error reading:

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.

The UpgradeCode is a GUID representing a related set of products. A set of different versions of your application will have the same UpgradeCode. This enables newer versions of your application to search and upgrade previous versions installed on the same computer.

When you install the second version and it has the same UpgradeCode but a higher ProductVersion and a different ProductCode, the first version should be automatically removed.

Different versions of your application should have the same UpgradeCode in order to allow newer version of your application to search and upgrade previous versions installed on the same machine and not create a new entry in the “Add/Remove Programs” list from the Control Panel.

Can you also make sure you don't have the “Allow side by side installs of different product versions” option enabled from the Upgrades page?

Can you please send us the .AIP (setup project) file for both versions by email to support at advancedinstaller dot com so we can further test and investigate this?

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MGS
Posts: 128
Joined: Tue Oct 04, 2022 9:52 am

Re: Installation not recognized when recreating installer

Hello Liviu,

Thanks for the in-depth explanation of both codes. That's exactly how I understood it already. I verified that the "Allow side by side installs of different product versions" option is not enabled.
When you install the second version and it has the same UpgradeCode but a higher ProductVersion and a different ProductCode, the first version should be automatically removed.
What should happen when the second version has the same UpgradeCode, the same ProductVersion, and only a different ProductCode?

Best regards,
Johannes
Liviu
Posts: 1419
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Installation not recognized when recreating installer

Hello Johannes,
What should happen when the second version has the same UpgradeCode, the same ProductVersion, and only a different ProductCode?
Installing a product with the same version and upgrade code (but different product code) is treated by Windows Installer as two products.

To treat a product with the same version as a major upgrade, you can:

1. Check the Customize Advanced Installer upgrade rules option from the Upgrades page.
2. Double click on the OLDPRODUCTS entry.
3. Check the Include maximum version in range option.
upgrade rules.png
upgrade rules.png (93.12 KiB) Viewed 5171 times

Hope this helps!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MGS
Posts: 128
Joined: Tue Oct 04, 2022 9:52 am

Re: Installation not recognized when recreating installer

Hello Liviu,

Thanks a lot for the explanation and the great solution. This information definitely helps not only with understanding this part of the update process better, but also how to go forward from here.

Best regards,
Johannes
Liviu
Posts: 1419
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Installation not recognized when recreating installer

You're always welcome, Johannes!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”