InstallShield 2016 » InstallScript Language Reference
Project • This information applies to the following project types:
• | Basic MSI |
• | InstallScript |
• | InstallScript MSI |
The AskYesNo function presents a message box that displays a question that the end user can answer by clicking a Yes or No button. The AskYesNo message box contains four items:
• | Question mark icon |
• | Question text |
• | Yes button |
• | No button |
Note • The default title is Question. To change the contents of the title bar, call SetDialogTitle before calling AskYesNo.
The AskYesNo message box is created by a direct call to the corresponding Windows API function, which displays a system modal dialog. Once a modal dialog is displayed, it retains focus until the end user closes it.
Windows displays this dialog; therefore, the installation cannot change the text of the buttons on the dialog. Windows displays the button text—"Yes" and "No" on English-based systems—in the language of the operating system; no manual localization of this text is required. If you need to display a more flexible dialog, call a Windows API function directly or use a custom dialog.
Syntax
AskYesNo ( szQuestion, nDefault );
Parameters
Parameter |
Description |
||||||
szQuestion |
Specifies the question to display in the message box. If the message is too large to fit on one line, embed newline escape characters ( \n ) in the message to insert line breaks. |
||||||
nDefault |
Specifies the button that is selected by default. Pass one of the following predefined constants in this parameter:
|
Return Values
Return Value |
Description |
YES (1) |
Indicates that the user clicked the Yes button. |
NO (0) |
Indicates that the user clicked the No button. |
Additional Information
The dialog that is displayed by the AskYesNo function cannot be displayed with a skin; it appears the same regardless of whether you have specified a skin.
See Also
InstallShield 2016 Help LibraryMay 2017 |
Copyright Information | Flexera Software |