The tutorial will guide you step by step in creating a new installer dialog using the Advanced Installer Dialog Editor.
Let's suppose that you want to create a package for a client type application. In order to properly configure the client you will need to obtain from the user additional information like: server address, port number, firewall settings etc. and store it in the registry.
The information will be retrieved with the use of a custom dialog.
- 1. Create project.
- 2. Add a new dialog to the project
- 3. Customize dialog appearance
- 4. Add controls on the dialog.
- 5. Associate properties with controls
- 6. Add registry entries
1. Create project.
Create an Enterprise project.
Add the necessary files to the package. In order to simulate the client application any EXE file will do. For more details please see the Professional Installation tutorial.
2. Add a new dialog to the project
After adding the files to the package it is time to create the custom dialog.
Switch to the Dialogs page.
The dialog should be displayed during a normal installation so we will add it in the "First Time Install" section of the "Install Sequence" tree, under the FolderDlg dialog (this dialog prompts the user to specify an install location).
Select "FolderDlg" in the tree
and use the toolbar button. A new dialog
will appear in the "First Time Install" tree. It will also be
displayed in the middle pane.
3. Customize dialog appearance
Select the dialog and from the context menu choose the "Properties" option. In the right pane a Properties list will appear.
Make the following modifications to the dialog properties:
Dialog Name = SettingsDlg
You will notice that the name of the dialog will be updated in the tree.
Now it is time to change the default texts from the dialog. Using the Properties list change "New Dialog" to "Settings Dialog" and "New Dialog Description..." to "Application Settings"
Build and run the
package. In the install wizard the dialog will appear
like:

4. Add controls on the dialog.
In order to retrieve the server address and port number we will use two edit fields grouped by a group box. Also we will add a control that will specify the firewall settings. A check box control will be used.
Use the
toolbar button to display the toolbox and
add the controls to the
dialog. Customize them so they will look something like:

5. Associate properties with controls
After retrieving the information from the controls we will use properties to store it. Some of the controls have associated properties. We will edit the name of those properties so they will reflect the purpose of the control.
Select the first edit field from the dialog. The Properties list will be updated with the control's properties. Edit the “Property Name” field to SERVER_ADRESS.
Do the same for the second edit field and set it's associated property to PORT_NUMBER.
These two properties will contain the text entered by the used in the edit fields.
In case of the check box control in addition to the property name you will have to specify the following attributes:
- Default Value - The value of the property before the check box is ticked.
- Value - The value of the property after the check box is ticked.
The fields will be:
Property Name = FIREWALL_SETTINGS Value = Yes Default Value = <blank>
It you specify a default value for a check box property, by
default the check box will appear ticked so we will leave the
“Default Value” field blank.
Build and run the
project
6. Add registry entries
As said before the gathered information will be stored in the Registry. Create the necessary registry entries to store the value of the SERVER_ADRESS, PORT_NUMBER and FIREWALL_SETTINGS properties as described in the Professional Installation tutorial.
Again build and run the
project. Check out the registry. You will find the specified
information stored.
The End
This concludes our tutorial. To learn more, please read the Display a dialog based on a checkbox state tutorial.
Topics
- Display a dialog based on a checkbox state
Step by step tutorial that describes how to display a MSI dialog based on checkbox state. - Creating Billboards
Step by step tutorial on adding billboards to your installation package. - ComboBox and ListBox controls
Step by step tutorial on how to populate, delete from and extract data from ComboBox and ListBox controls. - Add a new dialog when using Spring theme
Step by step tutorial on how to add a new dialog when using Spring Theme - Add a control in Spring theme dialog
Step by step tutorial on how to add a control in dialog when using Spring Theme