Close Current Dialog By Specific action - Advanced Installer Community
Alex99
Posts: 42
Joined: Thu Feb 14, 2013 9:28 am

Close Current Dialog By Specific action

Hello guys,
Help me please with such problem -
How I can skip current opened installation dialog after, for example, user will press "Yes" on some message box?
Scenario -
1) Dialog opened
2) Some custom action is running
3) Message Box appeared
4) User clickes - "Yes"
5) "Close Current Dialog" with "Return" called.

Thanks in advance,
Alex
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Close Current Dialog By Specific action

Hi Alex,

If you use the "Display message box" predefined custom action to display your message, you can see that this custom action stores the pressed button in an "Output Property" (i.e. [BTN_PRESSED]).

So, in order to achieve what you want, you can go in the Dialogs page, create an new "Close the current dialog" published event with the "Return" argument on the dialog that you want to close and set the following condition for it: BTN_PRESSED = "IDYES"

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alex99
Posts: 42
Joined: Thu Feb 14, 2013 9:28 am

Re: Close Current Dialog By Specific action

This will not help me. I do realise how to call custom action based on condition but the problem is -
I need to call close dialog actually in Init Event of window.
I'll try to explain more detailed -
- Installation window is opened
- In Init Event message box is showing and user clicked "yes" and right after that I need to call Close Current Dialog.
So, as you can see, I can't add closing dialog action on publishing event, because user is not clicking to "Next" button.
My goal is skipping dialog sequence of installation on this "yes" clicking.I need to do this not by "Next" button click, but after dialog showing and message box appeared, before any other user interaction with dialog.
Can I do this?

Thanks,
Alex
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Close Current Dialog By Specific action

Hi Alex,

In order to skip the dialog sequence if the user clicks on the [Yes] button of the message box you can follow the steps below:
- replace your "Init Event" message box with a message box that is added in sequence in the Custom Actions page before the "Wizard Dialogs Stage -> User Selection" action group
- in the Custom Actions page, right-click on the "User Selection" action group and check the "Show Standard Action -> User Selection -> WelcomeDlg" action
- that action will be displayed under the "User Selection" group, select it and set the following execution condition for it: NOT (BTN_PRESSED = "IDYES")
- build and run the project

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

Return to “Common Problems”