Hello and welcome to Advanced Installer forums,
Pretty much all you want to do can be achieved directly through the custom action.
Please allow me to elaborate:
- first of all, the custom action can be added as a custom action
"without sequence". This way, we will be able to trigger the execution of our custom action from within a dialog control (e.g. the
"Next" button of one of our dialogs)
1. Display a message that we are checking system configuration (because the check can take 15 seconds or more).
- this can be achieved through the custom action. You can develop the custom action to spawn a message box that will let the user know the custom action is running.
2. Run either an exe or dll that performs our checks. Its output is an array of checks performed and success/failure for each.
- as explained above, we can run this custom action when an UI control is pressed
3. If all checks succeed, just continue the install.
- the default behavior will be just this. If everything is fine within the custom action, the next dialog will be shown and the installation will continue
4. If any checks fail, display a message showing which checks failed and then abort the install.
- there are more ways to achieve this as well. One way would be to spawn the message box and fail the installation from within the custom action.
However, there is another way which I believe might be better. When a check failed, we can set a property from within our custom action and then, based on that property, spawn an error message. This can be done as it follows:
1. for more information about setting a property from within a custom action, please have a look over our
"How to set an installer property using custom actions" article, which I think you may find useful.
2. for the error message, you can use the
"Display error message" custom action. You can condition the spawn of this error message based on the property we have earlier set in the custom action. This custom action should, once again, be added as a custom action
"without sequence".
After configuring the above, you can go to
"Dialogs" page, select one of your dialogs, select the button that will trigger the custom actions and then add the custom actions under the
"Published Events" tab. The events order should be as it follows:
- your custom action
- the error message (which is conditioned)
- the default
"Display a specific dialog" event
Hope this helps.
Best regards,
Catalin
FOLLOW US
Get the latest news in Application Packaging