gregmac
Posts: 13
Joined: Wed Oct 13, 2010 2:05 am

How can I return data/values from a custom action (.exe)?

I'd like to execute a custom action (custom .exe) during Install Execution (Execution time: deferred), and then return some text or a status back to advanced installer so I can change the text displayed on ExitDialog depending on what happens during this .exe.

What's the best way to go about this? I looked for some documentation/examples but can't really find anything directly.

I'm open to wrapping this in a .dll/vbscript/jscript/whatever, but figured I'd ask here before going too far down some rat hole.
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: How can I return data/values from a custom action (.exe)

Hello,

Please note that 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.

Also, you can take a look on the Update action text and progressbar with C#/DTF custom action article which may be useful to you.

Please let me know if that helped.

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

Return to “Building Installers”