We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

leirbag
Posts: 13
Joined: Mon Jun 16, 2014 2:56 pm

Launching EXE on Next Click

Hi,

I need to run an exe ( which is not another setup its just a ConsoleApplication) when the user presses Next on a particual Dialog. Can I achieve this and where can I put the exe in order for it to run before the actuall application files are copied.

Thanks in advance
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Launching EXE on Next Click

Hello and welcome to Advanced Installer forums,

In order to launch your .EXE, you can go in the Custom actions and add the predefined Launch attached file custom action without sequence. This type of custom action can execute an application (EXE or DLL) or run a script (VBScript or Java script). Also, the source file will be embedded in the MSI file but will not be deployed at install time with the other application files.

In order to execute your custom action when the Next > control is pressed you can follow the steps from the How do I execute a custom action when a button is pushed? article.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
leirbag
Posts: 13
Joined: Mon Jun 16, 2014 2:56 pm

Re: Launching EXE on Next Click

I managed to do it as you said. Thanks for the explanation great help!

Can I use the command line field to pass [PROPERTIES] as arguments to my console app?
and Is there a specific way for this EXE I'm running to send back at least a property or a flag that it has succeeded or failed in its operation.

Thanks again
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Launching EXE on Next Click

Hello,

Please note that using an .EXE custom action has many drawbacks, since your cannot set a installer property through an .EXE custom action.
We recommend you to use a DLL custom action for example, you can create your custom action as a custom action written in C# or a custom action written in C++.

Then you can go in the “Custom Actions” page and add a predefined Launch attached file custom action. This type of custom action can execute an application (EXE or DLL) or run a script (VBScript or Java script). Also, the source file will be embedded in the MSI file but will not be deployed at install time with the other application files.

If there is anything else I can help with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”