Conditionally displaying an install dialog.This tutorial will show how to include a dialog that will be displayed during installation only when a certain condition is satisfied. Let's assume that you want the user to see the release notes of your application only if he desires. To do this you will add a dialog to your project that contains the release notes. The predefined Readme dialog should be appropriate for this task. The user selection will be retrieved with the use of a CheckBox control. The general method for conditionally displaying a dialog is to configure the Published Events for the Next and Back buttons from the dialogs that precede and respectively follow the conditional dialog.
Creating the project.Create an enterprise project. Add the necessary files to the package. For more details please see the Professional Installation tutorial. Adding the dialog to the projectAfter adding the files, add the predefined Readme dialog.
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.
Specify the path of the RTF file that contains the release notes of the application in the "File Path" field of the Properties pane. This field is available when the "Scrollable Edit" control is selected on the dialog. Add the CheckBox that the user will selectSelect the "FolderDlg" item in the tree.
In the Properties pane set the following attributes for this control:
Name=ViewReleaseNotesCheckBox
Text=View release notes
Property Name=ViewReleaseNotes
Value=yes
Setting the published eventsWe shall configure two "NewDialog" published events for the Next button from the FolderDlg dialog. One of them will invoke "ReadmeDlg" (if the user selects the CheckBox and the ViewReleaseNotes property is set to "yes") and the other will trigger "VerifyReadyDlg" (if the CheckBox is not selected and the ViewReleaseNotes property is not set). The screenshot below illustrates how the events are set:
We shall use the same approach for the Back button from "VerifyReadyDlg" as shown below:
Run the project
| |
|
| Privacy Policy | Windows Installer | Search Engine Ranking | Link Analyzer | ||
| © 2002 - 2008 Caphyon Ltd. Trademarks belong to their respective owners. All rights reserved. | ||