bccc
Posts: 9
Joined: Wed Aug 25, 2010 10:41 pm

Prevent custom action execution on upgrade install

I am new to Advanced Installer and am currently not having any success with the upgrade feature. I have automatically upgrade older product versions selected and uninstall old version first and then install new version. I also have a custom action set to execute on install. During the upgrade process I would like to prevent this custom action from executing if an older version has been upgraded. I only want it to execute if this is a clean install. The properties of the custom action are: synchronous execution, check return code; deferred with no impersonation; always execute. The current execution condition is NOT installed, but I have also tried NOT installed AND NOT UPGRADINGPRODUCTCODE. I assume my execution condition is not correct and would appreciate any guidance on how to achieve this result.

Thanks!
CiprianComsa
Posts: 110
Joined: Thu Aug 19, 2010 10:11 am
Contact: Website

Re: Prevent custom action execution on upgrade install

Hi and welcome to Advanced Installer Forum,

You typed the wrong condition. Please make sure you typed the condition like this: "NOT Installed AND NOT UPGRADINGPRODUCTCODE".
Note the capital 'i' in 'Installed'.

Best regards,
Ciprian Comsa
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/
Ciprian Comsa - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bccc
Posts: 9
Joined: Wed Aug 25, 2010 10:41 pm

Re: Prevent custom action execution on upgrade install

That was a typo in my post. It is in the format you suggest in my project. However, my custom action continues to execute when I perform an upgrade. Is this the correct execution condition to accomplish what I am looking for? Is there something else I am missing that I should investigate?

Thanks for your response!
CiprianComsa
Posts: 110
Joined: Thu Aug 19, 2010 10:11 am
Contact: Website

Re: Prevent custom action execution on upgrade install

Hi,

Can you please try using the following condition:

Code: Select all

NOT Installed and NOT OLDPRODUCTS
The property OLDPRODUCTS contains a list with the Product Codes of the older versions of your installation package. This property is set only in a package which upgrades another package.

The UPGRADINGPRODUCTCODE property is set in the package that is being uninstalled(upgraded) not in the new one.

Best regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/
Ciprian Comsa - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bccc
Posts: 9
Joined: Wed Aug 25, 2010 10:41 pm

Re: Prevent custom action execution on upgrade install

That worked! Thanks for your help.
nitind
Posts: 2
Joined: Wed Jul 03, 2019 9:32 am

Re: Prevent custom action execution on upgrade install

Below condition NOT worked for me.

NOT Installed and NOT OLDPRODUCTS

I want to restrict custom action to Run in Upgrade process.
Catalin
Posts: 6600
Joined: Wed Jun 13, 2018 7:49 am

Re: Prevent custom action execution on upgrade install

Hello and welcome to our forums,

This post is pretty old.

We have added predefined support for your task.

In order to achieve that, you can go to "Custom Actions" page --> select your custom action --> under "Execution Stage Condition" press on the "Show upgrade options" and there you can uncheck the "Upgrade" option which is checked by default.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nitind
Posts: 2
Joined: Wed Jul 03, 2019 9:32 am

Re: Prevent custom action execution on upgrade install

Thanks for quick response.!

PFA, I already did that, but this is also NOT worked for me.
Attachments
2019-07-03_14h18_08.png
2019-07-03_14h18_08.png (5.06 KiB) Viewed 4818 times
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Prevent custom action execution on upgrade install

Hello,

This could happen if the old version of your product has a different UpgradeCode. In this case the new product version installation will not automatically upgrade your older version.

If this is the case you could either set the same UpgradeCode for your new product version or create a search to look for the older product version and use the search property to condition your custom action too.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”