Upgrade not detect installed version, OLDPRODUCTS has bad value - Advanced Installer Community
donny
Posts: 4
Joined: Thu May 03, 2018 11:15 am

Upgrade not detect installed version, OLDPRODUCTS has bad value

Hi,
When i try do an update with new msi version, the installer not detect that old version exist, particularly [OLDPRODUCTS] property return always "1:" value when i try print it on dialog.

I set upgrade code in my project and both versions (installed and upgrade) has the same. Both version instead have different product code.
To force version check, i tried set standad action property FindRelatedProducts but not resolved my problem.
In upgrades page i set "Automatically upgrade older product versions" and "Uninstall old version first and then install new version".
In the table editor OLDPRODUCT min version is 1.0.0 and max version is 5.0.4.0.

My Advanced Installer version is 14.0.2 enterprise.

Thanks for help.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Upgrade not detect installed version, OLDPRODUCTS has bad value

Hi and welcome to our forums.

This problem may appear if you change only the fourth field of the Product Version when creating an upgrade package. If this is not your case, can you please send us the two .AIPs (the old version and the new version) and a verbose log of the upgrade to support at advancedinstaller dot com so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
donny
Posts: 4
Joined: Thu May 03, 2018 11:15 am

Re: Upgrade not detect installed version, OLDPRODUCTS has bad value

Hi,
thanks for reply.

The problem appears when i change the product version, i never change the fourth field.
I sent you all files requested.

Thanks.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Upgrade not detect installed version, OLDPRODUCTS has bad value

Hi,

Thank you for sending me the files I requested.

I investigated them and they seem to be configured correctly. Also, in the log file related to the newer version I noticed that the "OLDPRODUCTS" property is correctly set to the Product Code of the older version.

Can you please tell me where you try to use this property when it was not set?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
donny
Posts: 4
Joined: Thu May 03, 2018 11:15 am

Re: Upgrade not detect installed version, OLDPRODUCTS has bad value

Hi,
after your answer i checked better the problem and i have more details to give you.

If i install per-machine application, when i try upgrade all is ok.
If i install per-user application, the updater fail check OLDPRODUCTS.

To check this, if you go to Dialogs page, InstallTypeDlg and select InstallTypeRadioButtonGroup, there is a condition (NOT OLDPRODUCTS) that enable selection, if i installed application per-machine , when i try upgrade the dialog is correctly disabled, if i installed application per-user , when i try upgrade the dialog is enabled.

I sent you the new logfiles with per-user installation.

Thanks.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Upgrade not detect installed version, OLDPRODUCTS has bad value

Hi,

When a "Per-machine if the user is an administrator, per-user otherwise" package is created, it always starts as a per-machine package until the user choose the desired option from the "InstallTypeDlg" dialog.

Hence, even if the "Only for me" option is chosen when the first version is installed, the second version will start "per-machine" until the "Preserve Install Type" custom action is executed or the user change the "Only for me" option from the "InstallTypeDlg" dialog.

So, in order for the searches to be always executed to the correct registry hive, you need to place the "Preserve Install Type" custom action above the "Searches" action group from the "Custom Actions" page. In this case the "OLDPRODUCTS" property will be set as expected.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
donny
Posts: 4
Joined: Thu May 03, 2018 11:15 am

Re: Upgrade not detect installed version, OLDPRODUCTS has bad value

Hi,
thank you for the solution, place the "Preserve Install Type" custom action above the "Searches" action group from the "Custom Actions" page resolved my problem.

Best regards.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Upgrade not detect installed version, OLDPRODUCTS has bad value

You're welcome. Glad I could help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”