acl
Posts: 2
Joined: Mon Feb 05, 2018 11:31 am

Execution of Custom actions at the beginning of silent and normal GUI mode installation

Hello,
I've the problem, that our installer also needs to usable in silent isntallation mode. We have several custom actions which set up properties and so on.
These custom actions should be called at the start of the installer, no matter whether in silent or normal GUI mode.
At the moment I implemented it by doubling these custom actions, one time for the Wizards Dialogs Stage and one time for the Install Exection Stage with an additional condition "UILevel=2" to test, whether the custom action is not executed a second time if the installer runs in normal gui mode.

How could I implement this more elegant (I violate the rule DRY)?
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Execution of Custom actions at the beginning of silent and normal GUI mode installation

Hi and welcome to our forums.

In order to achieve what you want you can follow the steps below:
- create your custom action only in the "Wizard Dialogs Stage" section
- right-click on it and select "Sequence -> Install Execution" so it will be automatically added on the "Install Execution Stage" section, too
- click on the "Advanced execution scenarios..." blue link and check the "Skip action in Install Execution Stage if executed in Dialogs Stage" option

Let me know if you have other questions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
acl
Posts: 2
Joined: Mon Feb 05, 2018 11:31 am

Re: Execution of Custom actions at the beginning of silent and normal GUI mode installation

Hello Eusebiu,

Thank you very much for your detailed instructions, that did the trick.

Best regards,
Andreas
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Execution of Custom actions at the beginning of silent and normal GUI mode installation

You're welcome Andreas. Glad to help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”