rkgarimella9
Posts: 12
Joined: Fri Nov 23, 2018 3:12 am

Execute Custom Action in Pre-Install Stage

Hi,

Is it possible to execute a Custom Action (to search for a .exe file and execute it) while in the "Pre-Install Prerequisites" stage?

I'd like to execute a Custom Action, by searching for a .exe file and executing it, after or during the Pre-Install Prerequisites and before my Main Installation (Hence, I can't put them in Post-Install phase).

Thanks in advance
Ravi
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Execute Custom Action in Pre-Install Stage

Hello Ravi,
Is it possible to execute a Custom Action (to search for a .exe file and execute it) while in the "Pre-Install Prerequisites" stage?
Yes, that is possible. This can be achieved in more ways. For instance, you can create a "Search" which will search for your EXE file and then you can use a "LaunchFile" custom action without sequence, which you can trigger from a dialog placed from the Pre-install UI. In order to add a custom action without sequence, simply press the "Add custom action without sequence" located to the right side of the custom action's name.

Another way would be, for example, to create your own PowerShell script that will do the above (search for the EXE and launch it). Once again, you can add a "PowerShell inline script" custom action without sequence and then trigger it from a dialog control (from the Pre-install UI).

Also, for more information about the above, please have a look on our "How to execute a custom action when a button is pushed" article which I think you may find useful.

Hope this helps.

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

Return to “Common Problems”