15.02.2015 Views

C# 4 and .NET 4

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

424 ❘ ChaPTer 17 deplOyment<br />

The following table lists the types of dialog boxes that you can add to the project.<br />

dialog boX<br />

Check Boxes<br />

Confirm Installation<br />

Customer Information<br />

Finished<br />

Installation Address<br />

Installation Folder<br />

License Agreement<br />

Progress<br />

Radio Buttons<br />

Read Me<br />

Register User<br />

Splash<br />

Text Boxes<br />

Welcome<br />

desCriPTion<br />

Contains up to four check boxes. Each check box has a Label, Value, <strong>and</strong> Visible<br />

property.<br />

Gives the user the ability to confirm the various settings before installation takes place.<br />

Has edit fields for the collection name, organization name, <strong>and</strong> serial number.<br />

Organization name <strong>and</strong> serial number are optional.<br />

Displayed at the end of the setup process.<br />

For web applications, displays a dialog box so that users can choose an alternative<br />

installation URL.<br />

For client applications, displays a dialog box so that users can select an alternative<br />

installation folder.<br />

Displays the license agreement that is located in a file specified by the LicenseFile<br />

property.<br />

Displays a progress indicator during the installation process that shows the current<br />

installation status.<br />

Contains up to four radio buttons. Each radio button has a Label <strong>and</strong> Value property.<br />

Shows the readme information contained in the file specified by the ReadMe property.<br />

Executes an application that will guide the user through the registration process. This<br />

application must be supplied in the setup project.<br />

Displays a bitmap image.<br />

Contains up to four text box fields. Each text box has a Label, Value, <strong>and</strong> Visible<br />

property.<br />

Contains two properties: the WelcomeText property <strong>and</strong> the CopyrightWarning.<br />

Both are string properties.<br />

Each of these dialog boxes also contains a property for setting the banner bitmap, <strong>and</strong> most have a property<br />

for banner text. You can also change the order in which the dialog boxes appear by dragging them up or<br />

down in the editor window.<br />

Now that you can capture some of this information, the question is, how do you make use of it<br />

This is where the Condition property that appears on most of the objects in the project comes in.<br />

The Condition property must evaluate to true for the installation step to proceed. For example, say<br />

the installation comes with three optional installation components. In this case, you would add a<br />

dialog box with three check boxes. The dialog should be somewhere after the Welcome <strong>and</strong> before the<br />

Confirm Installation dialog box. Change the Label property of each check box to describe the action.<br />

The first action could be “Install Component A,” the second could be “Install Component B,” <strong>and</strong> so on.<br />

In the File System editor, select the file that represents Component A. Assuming that the name of<br />

the check box on the dialog box is CHECKBOXA1, the Condition property of the file would be<br />

CHECKBOXA1=Checked — that is, if CHECKBOXA1 is checked, install the file; otherwise, don’t<br />

install it.<br />

Custom actions editor<br />

The Custom Actions editor allows you to define custom steps that will take place during certain phases<br />

of the installation. Custom actions are created beforeh<strong>and</strong> <strong>and</strong> consist of a DLL, EXE, script, or Installer<br />

class. The action would contain special steps to perform that can’t be defined in the st<strong>and</strong>ard deployment<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!