Shopping Cart
Your Cart is Empty
Quantity:
Subtotal
Taxes
Shipping
Total
There was an error with PayPalClick here to try again
CelebrateThank you for your business!You should be receiving an order confirmation from Paypal shortly.Exit Shopping Cart

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.

First, delete the following two records from the Dialog table:

  • LicenseAgreementDlg
  • UserRegistrationDlg

When you do this, make sure all checkboxes in the dialog "Cascaded Deletion" are checked in order to remove all the controls from these dialogs.


The following record is not needed anymore in the ControlEvent table. Thus, delete it.

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>

Finally remove the following property from the Property table:

  • ShowUserRegistrationDlg

Excercise 6.2: Bitmap Controls


In this exercise you will modify the images displayed by Bitmap Controls of the WelcomeDlg dialog.


Therefore, stream the following two JPG images into the Binary table of your package.

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

DATA

Property

EXITDIALOGOPTIONALCHECKBOX

Value

1

Next, add the following new record to the CheckBox table.

COLUMN

DATA

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

Arguments

SetDirectoryTARGETDIR

Condition

EXITDIALOGOPTIONALCHECKBOX = 1

Ordering

1

COLUMN

VALUE

Dialog_

ExitDialog

Control_

Finish

Event

DoAction

Arguments

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

DATA

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

0