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!

istrasoft
Posts: 13
Joined: Sat Nov 02, 2013 3:08 am

Custom action executable parameters question

Hi,

is there a way to pass this kind of information when running a custom action executable (which is part of the files inside the installer), and how :

- values of properties
- results of detect process
- results of search in registry
- flag if MSI is running in silent mode or with a GUI

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

Re: Custom action executable parameters question

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.

In order to retrieve the value of a property, you can use the MsiGetProperty function for C++ or Session.GetProperty function for C#. Please keep in mind that Deferred custom actions can receive information about the installation process, mostly only embedded in the CustomActionData property. However, this type of custom actions do not have access to installer properties.
- flag if MSI is running in silent mode or with a GUI
Please note that the installer sets the UILevel property to the level of the user interface.

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 “Building Installers”