Upgrade Issue - Advanced Installer Community
DiegoCP
Posts: 139
Joined: Fri Jan 23, 2015 1:02 pm

Upgrade Issue

Hello,

I have an application with version 1.0.1 and let's say product code {AAAA-AAAA-AAAA}.

I set Upgrades to "Automatically upgrade older product versions" - order - "Uninstall old version first and then install new version"

I created the app1.0.1.exe and installed.


Right after that i opened the aip and changed the version to 1.0.2 and updated the product code to let's say {BBBB-BBBB-BBBB}.

And build the app1.0.2.exe.

When i run the app1.0.2.exe i expected it to remove the older version first but it isn't doing that it is simply Running the UI and letting me install over it, in the control panel i have 2 version installed 1.0.1 and 1.0.2.

Why is the upgrades not working??? This is very serious because right now i have a version out on web with this issue. Which means two different paths two different installations which cannot happen since product is the same ;(.

Some more helpful information:

I have 8 languages in my app all with same product code according to your docs this is the correct way to avoid duplicate installs.
Also in builds i have this option set "Uninstall a package with the same version (if found)" , also importante to avoid "Another Version already installed issue".


Thank You for your Help!

Best Regards,
Diego.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Upgrade Issue

Hello Diego,

Do these two installations have the same UpgradeCode? If this is the case, this also could happen if the upgrade installation has different "Installation type" than the original setup (the installation type is changed from per-machine to per-user or vice versa).

If your installation isn't in any of these situations, please send us the both .AIPs (old or upgrade) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DiegoCP
Posts: 139
Joined: Fri Jan 23, 2015 1:02 pm

Re: Upgrade Issue

Hello Sorin,

Thank You for quick reply.

Yes they both have same Upgrade Code. Should i have change between versions the upgrade code?

Also i am using the install type dlg yes but when i am doing these tests.

I set same installation type (AllUsers) and installation path.

Also how can i make sure to always uninstall previous versions independent of Installation Type?

Thank You for your Help!

Best Regards,
Diego.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Upgrade Issue

Hello,
Yes they both have same Upgrade Code. Should i have change between versions the upgrade code?
No, the Upgrade Code should be the same for all packages (old and upgrade)
Also how can i make sure to always uninstall previous versions independent of Installation Type?
Windows Installer dosn't permit an upgrade for a different Installation type. The packages in this case will be installed side by side. However, there is a method that could be used for removing the old product. Please take a look on my replies and the sample projects attached on this topic with a similar subject: Uninstall previous version when upgrade from cmd line

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DiegoCP
Posts: 139
Joined: Fri Jan 23, 2015 1:02 pm

Re: Upgrade Issue

Hello Sorin,

Thank You for Reply.


I will test this! Thank You very much!


I have one more question this is more tricky since i'm not sure about the procedure.
Right now when i install an older version over a new one there are 2 occurrences of same application in control panel.
And i need to remove them both to clear control panel.

Previous Version: 1.0.2 - currentUser

New Version: 1.0.1 - currentUser


How can i block olders versions from overriding new ones?


Thank You


Best Regards,
Diego.
DiegoCP
Posts: 139
Joined: Fri Jan 23, 2015 1:02 pm

Re: Upgrade Issue

Hello,

Sorry for multiple questions but this is also very importante!

How can i detect if an older version is installed so i can hide the "InstallTypeDlg", this is very importante to minimize the damage..


Thank You very much for your support so far!


Best Regards,
Diego.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Upgrade Issue

Hello Diego,
Right now when i install an older version over a new one there are 2 occurrences of same application in control panel.
And i need to remove them both to clear control panel.

Previous Version: 1.0.2 - currentUser

New Version: 1.0.1 - currentUser

How can i block olders versions from overriding new ones?
Windows Installer executes the upgrade process in the following way: First it checks the if the package to be installed has the same Upgrade Code as a package that is alreasy installed. If this is the case, the update is triggered. The first version is removed and then the new version is installed.

In your case, it seems that your packages don't have the same Upgrade Code, thus they are installed side by side. Please ensure that your products (new and upgrade) have the same Upgrade Codes but different Product Codes.
How can i detect if an older version is installed so i can hide the "InstallTypeDlg", this is very importante to minimize the damage..
You could condition the display of the dialog in the following way:
Go to "Dialogs" page, right click on "InstallTypeDlg" and select "Show only if". Set the following condition:

Code: Select all

NOT OLDPRODUCTS
This condition will ensure that the dialog is not shown during an upgrade.

You should also use our predefined custom action "Preserve Install Type of the old version"

Please see my reply regarding this custom action on your other topic : Install Type Dlg causing multiple Instances

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”