Page 1 of 1

Dialog Button Set to Cancel Setup does not stop setup

Posted: Tue Jun 20, 2006 10:45 am
by DaveG
Am I assuming incorrectly that when you set a button on a dialog box action, in this case one that I have titled Exit, to "Cancel Setup" that it will prompt you "Do you really want to cancel" and then if "Yes" is selected it will exit the installer?

Because I have mine set that way and it just keeps on moving through the rest of the script as if nothing happened.

Posted: Tue Jun 20, 2006 1:33 pm
by MichaelNesmith
You have to check in your script for the return value of the Display Dialog command - the pre-built scripts illustrate this for you.

Posted: Tue Jun 20, 2006 2:03 pm
by DaveG
Ahh so InstallAware dialogs behave slightly differently from Wise Installer dialog builds in that there is no seperate dialog script (somewhat like a mini dialog include script) for each dialog.

So I want to build "If..Then" type logic directly after displaying a box for things like Cancel Setup or even launching an application in the script, correct?

Edit:

NM I see the return of the modal (Next, Back, Cancel) can be set in a variable.

But that brings me to another question, are these the only actions that can be "captured" into a variable?

Posted: Tue Jun 20, 2006 3:59 pm
by MichaelNesmith
Yes.
As for your second question. If you want to capture the button that was clicked on a dialog, you are not limited to those three. You can capture any button click.
If you want to set interactive behavior inside a dialog (ex: license agreement checkbox enables Next), or if you want to record values of input fields (ex: a custom text box), double-click the relevant control for that, and use the window that appears which provides you ample choices.