OLDPRODUCTS not being set - Advanced Installer Community
kmcnaught
Posts: 2
Joined: Mon Oct 14, 2019 3:30 pm

OLDPRODUCTS not being set

I have an installer (EXE) for which we change the third version # for upgrades, e.g. 3.0.2 -> 3.0.3 (we don't use the fourth). It is set up to "uninstall previous version first, and then install new version" . This all seems to be working fine.

Now I would like to conditionally show a dialog on the first install (i.e. NOT OLDPRODUCTS). However, when I log the value of OLDPRODUCTS it is always blank, regardless of whether I'm doing a first install of an upgrade. Is this expected behaviour for "uninstall previous version first, and then install new version" ? In this situation, is there another way I can detect that we're doing an upgrade?

Many thanks,
KM
Liviu
Posts: 1420
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: OLDPRODUCTS not being set

Hello KM and welcome to our forums,

This is quite strange as the OLDPRODUCTS property should be set during an upgrade.

In order for us to further investigate this, can you please forward to us the following resources:

1. the .AIP (setup project) file for version 3.0.2

2. the .AIP (setup project) file for version 3.0.3

3. an installation log of the upgrade process

by email to support at advancedinstaller dot com?


You can create an installation log by launching your setup package with a command line like this:

Code: Select all

setup.exe /L*V installLog.txt
when using an EXE package type.


Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kmcnaught
Posts: 2
Joined: Mon Oct 14, 2019 3:30 pm

Re: OLDPRODUCTS not being set

I've figured it out now - I was querying OLDPRODUCTS in a custom action where I could easily take a look at it, but that custom action was executed before the Searches. I can see that OLDPRODUCTS is set correctly *later* in the log, and I can hide a dialog accordingly.

Thanks!
Liviu
Posts: 1420
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: OLDPRODUCTS not being set

Hello KM,

I'm glad you found the problem.

Yes, the "OLDPRODUCTS" property is set during "FindRelatedProducts" standard action. To see it, just right click on "Searches" action group --> Show Standard Action --> Searches --> FindRelatedProducts.

Any custom action which you want to execute on "Upgrade" needs to be added after the "Searches" action group.

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

Return to “Common Problems”