Chapter 6 - User Interface (Download Solution)
Excercise 6.1: Remove Dialogs
In this exercise you will remove the LicenseAgreementDlg and UserRegistrationDlg dialogs from your blastermaster.msi package.
Dialog_ | Control_ | Event | Argument | Condition | ORDERING |
SetupTypeDlg
|
Back
|
NewDialog
|
UserRegistrationDlg
|
ShowUserRegistrationDlg = 1
|
<null>
|
Next, modify the records that still refer to the removed dialogs in the ControlEvent table as follows:
Dialog_ | Control_ | Event | Argument | Condition | ORdering |
SetupTypeDlg
|
Back
|
NewDialog
|
WelcomeDlg
|
1
|
<null>
|
WelcomeDlg
|
Next
|
NewDialog
|
SetupTypeDlg
|
1
|
<null>
|
Excercise 6.2: Bitmap Controls
In this exercise you will modify the images displayed by Bitmap Controls of the WelcomeDlg dialog.
Name | Data |
bannrbmp
|
bannerbmp.jpg
|
dlgbmp
|
dlgbmp.jpg
|
Excercise 6.3: Add a checkbox to the ExitDialog
In this exercise you will add a checkbox to the ExitDialog that asks whether the user wants to start BlasterMaster once the installation has completed.
First, add the following record to the Control table.
Column | Value |
Dialog_
|
ExitDialog
|
Control
|
RunBMCheckbox
|
Type
|
CheckBox
|
X
|
135
|
Y
|
180
|
Width
|
220
|
Height
|
17
|
Attributes
|
3
|
Property
|
EXITDIALOGOPTIONALCHECKBOX
|
Text
|
Run Blaster Master now?
|
Control_Next
|
<null>
|
Help
|
<null>
|
Next, add the following new record to the Property table.
Column | ValUE |
Property
|
EXITDIALOGOPTIONALCHECKBOX
|
Value
|
1
|
Next, add the following new record to the CheckBox table.
Column | Value |
Property
|
EXITDIALOGOPTIONALCHECKBOX
|
Value
|
1
|
As a first step, remove the "RunBlasterMasterCA" action from the InstallExecuteSequence table.
Once this is done, add the following records to the ControlEvent table.
Column | Value |
Dialog_
|
ExitDialog
|
Control_
|
Finish
|
Event
|
DoAction
|
Argument
|
SetDirectoryTARGETDIR
|
Condition
|
EXITDIALOGOPTIONALCHECKBOX = 1
|
Ordering
|
1
|
Column | value |
Dialog_
|
ExitDialog
|
Control_
|
Finish
|
Event
|
DoAction
|
Argument
|
RunBlasterMasterCA
|
Condition
|
EXITDIALOGOPTIONALCHECKBOX = 1
|
Ordering
|
2
|
Now, make the "Finish" button’s "EndDialog" event the last event in the order by setting its Ordering value to "999".
Excercise 6.4: Control Conditions
In this exercise you will add a Control Condition that allows the user to hide a checkbox in case of an Uninstall.
Thus, add the following record to the ControlCondition table.
column | Value |
Dialog_
|
ExitDialog
|
Control_
|
RunBMCheckbox
|
Action
|
Hide
|
Condition
|
Installed AND NOT RESUME AND NOT Preselected
|
Excercise 6.5: Text Styles
In this exercise you will move the text of the checkbox control to a property and change its font style.
First, change the value of the "Text" column of the Control table to "[ControlText_RunBMCheckbox]" as shown below.
Column | value |
Dialog_
|
ExitDialog
|
Control
|
RunBMCheckbox
|
Type
|
CheckBox
|
X
|
135
|
Y
|
180
|
Width
|
220
|
Height
|
17
|
Attributes
|
3
|
Property
|
EXITDIALOGOPTIONALCHECKBOX
|
Text
|
[ControlText_RunBMCheckbox]
|
Control_Next
|
<null>
|
Help
|
<null>
|
Next, add the following new property to the Property table.
column | value |
Property
|
ControlText_RunBMCheckbox
|
Value
|
{\ComicSansBold10}Run Blaster Master now?
|
Next, add the following record to the TextStyle table.
Column | value |
TextStyle
|
ComicSansBold10
|
FaceName
|
Comic Sans MS
|
Size
|
10
|
Color
|
<null>
|
StyleBits
|
1
|
Excercise 6.6: Transforms
In this exercise you will author the UIText table to change the time remaining text displayed during the installation.
In your blastermaster.msi click on "Transform" - "New Transform".
Save the new transform as blastermaster_de.mst into the same folder where your blastermaster.msi is located. Then go to the "Control" table and modify the "WelcomeDlg"’s "Title" control as follows:
Column | value |
Dialog_
|
WelcomeDlg
|
Control
|
Title
|
Type
|
Text
|
X
|
135
|
Y
|
20
|
Width
|
220
|
Height
|
60
|
Attributes
|
196611
|
Property
|
<null>
|
Text
|
{\VerdanaBold13}Willkommen zu [ProductName] [Wizard]
|
Control_Next
|
<null>
|
Help
|
<null>
|
Then save the file, leave all "Transform Properties" checkboxes unchecked and exit InstEd afterwards. A file named "blastermaster_de.mst" is now in the same folder as your blastermaster.msi. In order to apply the transform call your blastermaster.msi from a CMD using the following command:
msiexec /i blastermaster.msi TRANSFORMS=blastermaster_de.mst