Launch File custom action - success or fail - Advanced Installer Community
Hotchenko
Posts: 2
Joined: Fri Apr 11, 2014 3:53 pm

Launch File custom action - success or fail

Hello Support,

I use a "Launch File" custom action to check some parameters that the user fills in the dialog form before installation. Custom action is started by pressing the "Next" button. If the launched application fails, I need to show my error message and not to start the next step until the user enters the correct parameters.

Is it possible to implement it?

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

Re: Launch File custom action - success or fail

Hello and welcome to Advanced Installer forums,

Can you please take a look on our Email ID validation forum thread which debates a similar subject. Also, you will find a sample which implement your scenario.

Please let us know if that helped, otherwise give us more details about your specific scenario.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Hotchenko
Posts: 2
Joined: Fri Apr 11, 2014 3:53 pm

Re: Launch File custom action - success or fail

Hello Dan,

Your example shows how to display a message after running the "Execute Inline Script Code" action, which sets the value for some property. I am interested in the opportunity to display a message after running the "Launch File" action (Success or Fails). In my case parameters checks third-party application (exe file).

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

Re: Launch File custom action - success or fail

Hello,

If you are using an .EXE custom action then you cannot set a installer property through an .EXE custom action. However, you can check inside your custom action the result and display an appropriate message. This way you don't have to use our predefined Display message box custom action.

However, we recommend you to use a DLL custom action as you can set a property based on your custom action success or failure. 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.

In order to display the related message, you can use our predefined Display message box custom action and condition its execution based on the property's value.

Please let us know if that helped, otherwise give us more details about your specific scenario.

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

Return to “Common Problems”