InstallShield 2019
Project • This information applies to the following project types:
• | InstallScript |
• | InstallScript MSI |
The last block of information in a response file is the response file dialog data. The response file dialog data is a collection of sections containing the values returned by each dialog identified in the dialog sequence section. Each dialog has its own section. The values listed are the same values that the dialog returns in a normal end-user input-driven installation. You can also create dialog data sections for custom dialogs.
The format for a dialog data section is shown below:
[<PRODUCT_GUID>-<DialogIdentifier>]
Result=value
Keyname1=value
Keyname2=value
The [<PRODUCT_GUID>-<DialogIdentifier>] section header identifies the specific dialog and is followed by the dialog data entry list. <DialogIdentifier> is the same expression used to list the dialog in the dialog sequence section.
Data entry items are in the format keyname=value. The keyname is a name for a value returned by a dialog and recorded in the response file. All dialogs, including custom dialogs, return a value for the keyname Result, reflecting the button that was clicked to end or exit the dialog. Many dialogs will also set or return a value in a variable.
For example, in a non-silent installation, the AskDestPath dialog returns the destination location in the svDir parameter. The line in the script might look like the following:
nResult = AskDestPath( szTitle, szMsg, svDir, 0 );
The corresponding dialog data entry in the Setup.iss file for a silent installation might look like the following:
[{23EAFFCA-361D-11D3-8B0F-00105A9846E9}-AskDestPath-0]
Result=1
szPath=C:\Program Files\InstallShield\2019
In the above example, Result=1 is equivalent to clicking the Next button in the dialog, and szPath=C:\Program Files\InstallShield\2019 is the value returned in the svDir parameter of AskDestPath.
The name of the variable used in the script is meaningless relative to the Setup.iss file. However, in the Setup.iss dialog data sections, each built-in and Sd dialog has its own set of keynames that map to its parameters. The keynames are important and must be exactly as defined for each dialog. Refer to Dialog Data Keynames List, below.
When you use custom dialogs, you must create a dialog data entry for the Result keyname for each dialog, plus entries for any other values set or returned by the custom dialogs. Use the Dialog Data Keynames List, below, as an indicator of how to create keyname=value expressions for your custom dialogs. Call GetProfString or GetProfInt to read the dialog data information for the custom dialog. GetProfString and GetProfInt allow you to specify the .iss file, the section, and the keyname, and they return the value assigned to that keyname.
Standard Values for the Result Keyname
All dialogs, including custom dialogs, return a keyname value called Result, indicating which button was clicked to end the dialog. Unless otherwise indicated, the Result standard values are:
• | 12 for the Back button |
• | 1 for the Next or OK button |
Recording Component and Subcomponent Selections
Some dialog functions allow the end user to select components and subcomponents. There are three kinds of dialog data keyname entries used to record component and subcomponent selections in response files: type, count, and <#> (described below).
Every set of component selections and every set of subcomponent selections has one type keyname entry, one count keyname entry, and as many <#> keyname entries as are required to document each individual component or subcomponent selection.
When you are creating keynames to record component selections, precede the type, count, and <#> keyname entries with the word Component, thus:
Component-typeComponent-countComponent-0
When you are creating keynames to record subcomponent selections, precede the type, count, and <#> keyname entries with the name of the component to which the subcomponents belong, thus:
Program Files-typeProgram Files-countProgram Files-0Program Files-1
To create complete value entries, use the equal sign to attach the values to the keynames. (The types of values assigned to each kind of keyname are described below.) The following example shows complete value entries for two components, Program Files and Binary Files, and two subcomponents of Program Files, Executables and Support Elements:
Component-type=string
Component-count=2
Component-0=Program Files
Component-1=Binary Files
Program Files-type=string
Program Files-count=2
Program Files-0=Executables
Program Files-1=Support Elements
The type keyname indicates the data type of the components or subcomponents list. Since InstallShield dialogs currently use only string lists for components and subcomponents lists, type is always equal to string, as in Component-type=string. Future versions may use number lists, in which case type could equal number.
Count Keyname Entry
Count is equal to the number of selections for a given component or subcomponent entry. For example, if two components were selected for installation in the ComponentDialog dialog, the count dialog data entry would be Component-count=2. If two subcomponents of the Program Files component were selected, there would be a Program Files-count=2 entry.
<#> Keyname Entry
The number portion of the <#> keyname entry is simply a sequential (one-up) number, beginning with 0, that numbers each recorded component or subcomponent selection. Since numbering begins with 0, the greatest number value will always be one less than the value of count.
The value assigned to a <#> keyname entry is the selected component’s or subcomponent’s visible name (the string passed as the second parameter to ComponentAddItem when the components or subcomponents list was built).
For example, assume the ComponentDialog dialog offers end users a component selection of Program Files, Help Files, Sample Files, and Utilities. If the end user selects Program Files and Help Files, then the dialog data section for that instance of the ComponentDialog dialog will have two list item entries and will look something like this:
[{23EAFFCA-361D-11D3-8B0F-00105A9846E9}-ComponentDialog-0]
szDir=C:\MYAPP\FILES
Component-type=string
Component-count=2
Component-0=Program Files
Component-1=Help Files
Result=
The following example shows how subcomponent list selections are recorded. The example is for an instance of the SdComponentMult dialog. The example shows that two components—Program Files and Help Files—were selected. It also shows that four subcomponents were chosen: Main Files, Aux. Files, Main Help, and Tutorial Files. Main Files and Aux. Files are subcomponents of Program Files, and Main Help and Tutorial Files subcomponents of Help Files.
[{23EAFFCA-361D-11D3-8B0F-00105A9846E9}-SdComponentMult-0]
Component-type=string
Component-count=2
Component-0=Program Files
Component-1=Help Files
Program Files-type=string
Program Files-count=2
Program Files-0=Main Files
Program Files-1=Aux. Files
Help Files-type=string
Help Files-count=2
Help Files-0=Main Help
Help Files-1=Tutorial Files
Result=1
The dialog data keynames for the InstallShield dialogs are listed in the table below. The first column contains the dialog names. The second column lists the keynames applicable to each dialog. The third column contains descriptions of the values associated with the keynames.
Dialog |
Keyname |
Description |
|||||||||
AskDestPath-<#> |
Result |
Standard values |
|||||||||
AskDestPath-<#> |
szPath |
The path that is set in the edit field |
|||||||||
AskOptions-<#> |
Result |
Standard values AskOptions is special because the number of return values can change based on the script call. You can use a sequence of keynames of the form Sel-<#>, where <#> is the number of the selection variable. Numbering begins with 0. The number of Sel-<#> entries should match the number of variables (check boxes/radio buttons) in the particular call to AskOptions. Refer to the following examples:
|
|||||||||
AskPath-<#> |
Result |
Standard values |
|||||||||
AskPath-<#> |
szPath |
The path entered in the Destination Directory edit field |
|||||||||
AskText-<#> |
Result |
Standard values |
|||||||||
AskText-<#> |
szText |
The text from the edit field |
|||||||||
AskYesNo-<#> |
Result |
1 = End user clicked the Yes button 0 = End user clicked the No button |
|||||||||
ComponentDialog-<#> |
Result |
Standard values |
|||||||||
ComponentDialog-<#> |
szDir |
The path entered in the Destination Directory field |
|||||||||
ComponentDialog-<#> |
Component-type |
String (the only value currently allowed) |
|||||||||
ComponentDialog-<#> |
Component-count |
The total number of component selections |
|||||||||
ComponentDialog-<#> |
Component-<#> |
The selected item’s number in the list (numbering begins with 0) |
|||||||||
MessageBox-<#> |
Result |
1 = End user clicked the OK button |
|||||||||
RebootDialog-<#> |
Result |
0 (Result is always 0.) |
|||||||||
RebootDialog-<#> |
Choice |
Indicates the final reboot selection made before restarting the machine. Maps to the radio buttons and has these possible values:
|
|||||||||
SdAskDestPath-<#> |
Result |
Standard values |
|||||||||
SdAskDestPath-<#> |
szDir |
The path entered in the Destination Directory field |
|||||||||
SdAskOptions-<#> |
Result |
Standard values |
|||||||||
SdAskOptions-<#> |
Component-type |
String (the only value currently allowed) |
|||||||||
SdAskOptions-<#> |
Component-count |
The total number of component selections |
|||||||||
SdAskOptions-<#> |
Component-<#> |
The selected item’s number in the list (numbering begins with 0) |
|||||||||
SdAskOptionsList-<#> |
Result |
Standard values |
|||||||||
SdAskOptionsList-<#> |
Component-type |
String (the only value currently allowed) |
|||||||||
SdAskOptionsList-<#> |
Component-count |
The total number of component selections |
|||||||||
SdAskOptionsList-<#> |
Component-<#> |
The selected item’s number in the list (numbering begins with 0) |
|||||||||
SdBitmap-<#> |
Result |
Standard values |
|||||||||
SdComponentDialog-<#> |
Result |
Standard values |
|||||||||
SdComponentDialog-<#> |
szDir |
The path entered in the Destination Directory field |
|||||||||
SdComponentDialog-<#> |
Component-type |
String (the only value currently allowed) |
|||||||||
SdComponentDialog-<#> |
Component-count |
The total number of component selections |
|||||||||
SdComponentDialog-<#> |
Component-<#> |
The selected item’s number in the list (numbering begins with 0) |
|||||||||
SdComponentDialog2-<#> |
Result |
Standard values |
|||||||||
SdComponentDialog2-<#> |
Component-type, <subcomponent>-type |
String (the only value currently allowed) |
|||||||||
SdComponentDialog2-<#> |
Component-count, <subcomponent>-count |
The total number of component or subcomponent selections |
|||||||||
SdComponentDialog2-<#> |
Component-<#>, <subcomponent>-<#> |
The selected item’s number in the list (numbering begins with 0) |
|||||||||
SdComponentDialogAdv-<#> |
Result |
Standard values |
|||||||||
SdComponentDialogAdv-<#> |
szDir |
The path entered in the Destination Directory field |
|||||||||
SdComponentDialogAdv-<#> |
Component-type |
String (the only value currently allowed) |
|||||||||
SdComponentDialogAdv-<#> |
Component-count |
The total number of component selections |
|||||||||
SdComponentDialogAdv-<#> |
Component-<#> |
The selected item’s number in the list (numbering begins with 0) |
|||||||||
SdComponentMult-<#> |
Result |
Standard values |
|||||||||
SdComponentMult-<#> |
Component-type, <subcomponent>-type |
String (the only value currently allowed) |
|||||||||
SdComponentMult-<#> |
Component-count, <subcomponent>-count |
The total number of component or subcomponent selections |
|||||||||
SdComponentMult-<#> |
Component-number, <subcomponent>-<#> |
The selected item’s number in the list (numbering begins with 0) |
|||||||||
SdComponentTree-<#> |
Result |
Standard values |
|||||||||
SdConfirmNewDir-<#> |
Result |
1 = End user clicked the Yes button 0 = End user clicked the No button |
|||||||||
SdConfirmRegistration-<#> |
Result |
1 = End user clicked the Yes button 0 = End user clicked the No button |
|||||||||
SdDisplayTopics-<#> |
Result |
Standard values |
|||||||||
SdFinish-<#> |
Result |
1 = Finish |
|||||||||
SdFinish-<#> |
bOpt1 |
1 = “Yes, I want to view the README file.” is selected 0 = “Yes, I want to view the README file.” is not selected |
|||||||||
SdFinish-<#> |
bOpt2 |
1 = “Yes, I want to launch [app name]” is selected 0 = “Yes, I want to launch [app name]” is not selected |
|||||||||
SdFinishEx |
|
Requires special handling. |
|||||||||
SdFinishReboot-<#> |
Result |
1 = Finish |
|||||||||
SdFinishReboot-<#> |
BootOption |
0 = Do not restart Windows or the machine 2 = Restart Windows 3 = Reboot the machine |
|||||||||
SdLicense-<#> |
Result |
12 = End user clicked the Back button 1 = End user clicked the Yes button |
|||||||||
SdOptionsButtons-<#> |
Result |
12 = End user clicked the Back button Or, when the Next button is clicked: 101 = Option button one (top) is selected 102 = Option button two is selected 103 = Option button three is selected 104 = Option button four is selected |
|||||||||
SdRegisterUser-<#> |
Result |
Standard values |
|||||||||
SdRegisterUser-<#> |
szName |
The text entered in the Name field |
|||||||||
SdRegisterUser-<#> |
szCompany |
The text entered in the Company field |
|||||||||
SdRegisterUserEx-<#> |
Result |
Standard values |
|||||||||
SdRegisterUserEx-<#> |
szName |
The text entered in the Name field |
|||||||||
SdRegisterUserEx-<#> |
szCompany |
The text entered in the Company field |
|||||||||
SdRegisterUserEx-<#> |
szSerial |
The text entered in the Serial (number) field |
|||||||||
SdSelectFolder-<#> |
Result |
Standard values |
|||||||||
SdSelectFolder-<#> |
szFolder |
The folder name entered in the Program Folder field |
|||||||||
SdSetupType-<#> |
Result |
12 = End user clicked the Back button Or, when the Next button is clicked: 301 = Typical radio button is currently selected 302 = Compact radio button is currently selected 303 = Custom radio button is currently selected |
|||||||||
SdSetupType-<#> |
szDir |
The path entered in the Destination Directory edit field |
|||||||||
SdShowDlgEdit1-<#> |
Result |
Standard values |
|||||||||
SdShowDlgEdit1-<#> |
szEdit1 |
The text entered in the svEdit1 field |
|||||||||
SdShowDlgEdit2-<#> |
Result |
Standard values |
|||||||||
SdShowDlgEdit2-<#> |
szEdit1 |
The text entered in the svEdit1 field |
|||||||||
SdShowDlgEdit2-<#> |
szEdit2 |
The text entered in the svEdit2 field |
|||||||||
SdShowDlgEdit3-<#> |
Result |
Standard values |
|||||||||
SdShowDlgEdit3-<#> |
szEdit1 |
The text entered in the svEdit1 field |
|||||||||
SdShowDlgEdit3-<#> |
szEdit2 |
The text entered in the svEdit2 field |
|||||||||
SdShowDlgEdit3-<#> |
szEdit3 |
The text entered in the svEdit3 field |
|||||||||
SdShowFileMods-<#> |
Result |
Standard values |
|||||||||
SdShowFileMods-<#> |
nSelection |
The “Choose what you want Setup to do” radio button selection: 101 = Let Setup modify the AUTOEXEC.BAT file. 102 = Save the required changes to AUTOEXEC.NEW file. 103 = Do not make any changes. |
|||||||||
SdShowInfoList-<#> |
Result |
Standard values |
|||||||||
SdStartCopy-<#> |
Result |
Standard values |
|||||||||
SdWelcome-<#> |
Result |
Standard values |
|||||||||
SdWelcomeMaint-<#> |
Result |
301 = Indicates that the Modify button was selected when the Next button was clicked. 302 = Indicates that the Repair button was selected when the Next button was clicked. 303 = Indicates that the Remove button was selected when the Next button was clicked. |
|||||||||
SelectDir-<#> |
Result |
Standard values |
|||||||||
SelectDir-<#> |
szDir |
The path selected by this dialog |
|||||||||
SelectDirEx-<#> |
Result |
Standard values |
|||||||||
SelectDirEx-<#> |
szDir |
The path selected by this dialog |
|||||||||
SelectFolder-<#> |
Result |
Standard values |
|||||||||
SelectFolder-<#> |
szResultFolder |
The folder selected by this dialog |
|||||||||
SetupType-<#> |
Result |
12 = End user clicked the Back button Or, when the Next button is clicked: 301 = Typical radio button is currently selected 302 = Compact radio button is currently selected 303 = Custom radio button is currently selected |
|||||||||
SprintfBox-<#> |
Result |
1 = End user clicked the OK button |
|||||||||
Welcome-<#> |
Result |
Standard values |
Special Handling for SdFinishEx
SdFinishEx calls either SdFinish or SdFinishReboot, depending on the value of the system variable BATCH_INSTALL. For this reason, SdFinishEx cannot be handled by a response file. To create a silent installation for a script that calls SdFinishEx, use script code such as the following:
if (MODE = NORMALMODE) then
SdFinishEx (szTitle, szMsg1, szMsg2, szOpt1, szOpt2, bvOpt1, bvOpt2);
else
if !BATCH_INSTALL then
/* Set bvOpt1 and bvOpt2 to the values you want them
to have during a silent installation that does not require
rebooting; for example: */
bvOpt1 = FALSE;
bvOpt2 = TRUE;
else
/* When the silent installation requires rebooting,
if you want to reboot immediately call
the System function as follows: */
System (SYS_BOOTMACHINE);
endif;
endif;
See Also
Understanding When an Installation or Uninstallation Restarts the Target System
InstallShield 2019 Help LibraryApril 2019 |
Copyright Information | Flexera |