Help \ Custom Components

Custom CheckBox

To perform an additional task during the installation, you can use the Custom CheckBox component (page Interface \ Custom). User will be able to select (or unselect) the chec box and regarding its state, the setup program can execute some command (e.g. install additional app or copy files):

custom checkbox

The state (checked / unchecked) of the component is stored in the variable <CheckBox>. If checked, this variable contains 1, otherwise 0.
To perform an action regarding its state use System \ Commands.

Example #1: if the checkbox is checked, then launch file App.exe from the installation directory:

File: 		<SystemDir>\cmd.exe
Parameters: 	/C IF /I <CheckBox>==1 "<InstallDir>\App.exe"
Timing: 	After Installation
Wait: 		Yes

Example #2: if the checkbox is checked, then copy file App.exe (from temp directory of the installation <SetupTempDir>) to the installation directory:

File: 		<SystemDir>\cmd.exe
Parameters: 	/C IF /I <CheckBox>==1 (COPY /Y "<SetupTempDir>\App.exe" "<InstallDir>\App.exe")
Timing: 	After Installation
Wait: 		Yes
Show: 		Hide

It is also possible to set the default state for the checkbox regarding the value from the Registry or INI file. To make it, add the variable <CheckBox> on the System \ Variables page. Specify the Registry Key and Value (or INI file key/section). The Default field set to 0. The checkbox will be checked, if the value is 0, or doesn't exist. Otherwise - unchecked. To inverse the state for the checbox, add -inversecheckbox to the Additional Parameters.

To make the checkbox disabled, add a parameter -disablecheckbox, or add variable <EnableCheckBox> on the System \ Variables page. The checkbox will be enabled, if the value is 0, or doesn't exist. Otherwise - disabled.

Also, use a parameter -discheckboxifchecked to disable the checkbox if it is checked.


Custom ComboBox

Use this option to add a custom ComboBox - a drop-down list that allows the user to select one item from a list. Enter the name for the combobox in the Text field and items (one per line).

custom combobox

Variable <ComboBox> contains a text of selected item. Variable <ComboBoxIndex> contains an index number of the selected item (if the first item is selected, this variable contains 0, second item - 1, etc.).

Default index - sets default item index for the drop-down list. If not specified, the user must select it before installation. To make the first item selected, enter 0, second item - 1, etc.

Example: if second item is selected, then copy file File.exe (from temp directory of the installation <SetupTempDir>) to the installation directory:

File: 		<SystemDir>\cmd.exe
Parameters: 	/C IF /I <ComboBoxIndex>==1 (COPY /Y "<SetupTempDir>\File.exe" "<InstallDir>\File.exe")
Timing: 	After Installation
Wait: 		No

It is also possible to set the default index for the ComboBox at setup startup. To make it, add the variable <ComboBoxIndex> on the System \ Variables page. Specify the Registry Key and Value (or INI file key/section). The Default field leave empty. If the value is 0, the first item will be selected, if 1 - second, etc.

To make the combobox disabled, add the variable <EnableComboBox> on the System \ Variables page. If registry value exists, the combobox will be disabled. if doesn't - enabled.