janisito
Posts: 78
Joined: Thu Apr 09, 2015 6:28 am

Custom actions execution time

Hi,

I have a bunch of custom actions that are executed at "Install Execution Stage". A few questions.

1. Will they be executed in the order they are listed in AI (given they have the same execution time set) or will it be in random order? See image below.
1.png
1.png (11.9 KiB) Viewed 5091 times
2. If I select execution time to be "Immediately". Will the custom action be executed immediately after the user presses the "Install" button in the verify dialog? Will this also happen before the system is being modified and files are copied to the installation folder?
2.png
2.png (6.82 KiB) Viewed 5091 times
Thanks,

Regards
Jan
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom actions execution time

Hell Jan,
1. Will they be executed in the order they are listed in AI (given they have the same execution time set) or will it be in random order? See image below.
Yes, the custom actions are executed in the order they are displayed.
2. If I select execution time to be "Immediately". Will the custom action be executed immediately after the user presses the "Install" button in the verify dialog? Will this also happen before the system is being modified and files are copied to the installation folder?
The immediate actions can be used anywhere in the Install UI Sequence and in the Execute Sequence, but for the second one there is a phase where immediate actions can no longer be used. This happens when the installation script is triggered. The immediate actions should not modify the target machine since those changes cannot be rolled back.

When you press the "Install" button, the transition from "Wizard Dialogs Stage" to "Install Execution Stage" is made. If you want your immediate custom action to take place when the user presses the "Install" button, you can simply schedule it in the "Install Execution Stage", before "Searches" action group.

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
janisito
Posts: 78
Joined: Thu Apr 09, 2015 6:28 am

Re: Custom actions execution time

Hi Catalin,

Thanks for your reply.

If I move my custom actions to the "install Execution Stage" just before "Searches" will install parameters be available in the session object in my custom action or do I need to pass the install parameters through action data?

Regards
Jan
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom actions execution time

Hello Jan,

Yes, you should be able to access the properties. "Custom Action Data" is only used when you want to access properties from a custom action which has its execution time as "When the system is being modified (deferred)". The deferred custom actions must be scheduled between "InstallInitialize" and "InstallFinalize" standard actions.

Hope this helps.

Kind regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
janisito
Posts: 78
Joined: Thu Apr 09, 2015 6:28 am

Re: Custom actions execution time

Hi Catalin,

Thanks again.

Just to clarify, during rollback and "After the system has been successfully modified (commit)" I need to use action data also to access install parameters from my custom action just like in the deferred case?

Regards
Jan
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom actions execution time

Hello Jan,

Yes, you should use the "Action Data" field to access properties during rollback and commit custom actions just like you do for deferred custom actions.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
janisito
Posts: 78
Joined: Thu Apr 09, 2015 6:28 am

Re: Custom actions execution time

Got it. Thx!
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom actions execution time

You're always welcome, Jan.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”