December 18, 2014
Hot Topics:

Deploying Windows Applications with Visual Studio.NET, Part 2

  • May 21, 2004
  • By Thiru Thangarathinam
  • Send Email »
  • More Articles »

User Interface Editor

As its name indicates, the User Interface Editor permits you to specify the sequence of user interface dialogs displayed during the application install on the target computer. (You will see an example of this later when you configure these dialog boxes.)

The User Interface Editor consists of two high-level installation modes:

  • Install—The Install section lists all the dialog boxes that will be displayed when the end user runs the installer.
  • Administrative Install—This section lists all the dialog boxes that will be displayed when a system administrator uploads the installer to a network location.

The pre-defined dialog boxes in the Install and Administrative Install sections can be further sub-divided into the following three categories:

  • Start dialog boxes—Display before the installation begins
  • Progress dialog box—Allows you to provide the users with feedback on the progress of the installation
  • End dialog boxes—Informs user that the installation has successfully completed; can also be used to allow the user to look at the Readme file or launch the application

You can easily rearrange the dialog boxes by dragging and dropping them onto other locations. The above-mentioned default set of dialog boxes always shows up in the installation sequence of the application, even if you have not configured them.

Now that you have had a look at the dialog boxes, it's time to learn how to configure them for setting up your FormattingApplication. Here are the steps:

  1. Select the Welcome dialog and then select the View | Properties window. Set the BannerBitmap property to developer.gif by clicking Browse... in the combo box and navigating to the Application Folder\Support (where you already placed all the support files). Also set the CopyrightWarning and WelcomeText properties to values that suit your requirements.
  2. Because you want the logo bitmap to display on all the default dialogs, set the BannerBitMap property to developer.gif in the Installation Folder, Confirm Installation, Progress, and Finished dialog boxes as well.
Add Additional Custom Dialogs

In the previous section, you configured the properties of the default dialogs, which are very flexible and can form the core foundation for simple installations. However, sometimes you may want to customize the installation sequence to support your application's requirements. You can accomplish this by adding a new set of dialog boxes with the Add Dialog menu. Select Start from the User Interface Editor and then choose Action | Add Dialog menu. Figure 3 shows the Add Dialog window you will see. It will only contain the dialogs that you can add, so you may see a slightly different selection.

Figure 3: The Action | Add Dialog Menu in the User Interface Editor

You can choose the dialog box you want to add to your installation sequence from this menu. The following list briefly discusses these dialog boxes and the dialogs already present by default:

  • Welcome—Allows you to display an introductory window that can display text information from CopyrightWarning and WelcomeText properties
  • Customer Information—Allows you to display a window that requires customer information such as name, organization name, and so on; also can force the user to enter a serial number and perform simple validations
  • License Agreement—Allows you to display licensing information that requires the users to agree to the licensing conditions; obtains licensing information from an external file, which is linked to this dialog through the LicenseFile property that can be assigned a Rich Text Format (.rtf) file
  • Read Me—Displays information from the .rtf file specified by the ReadmeFile property
  • Register User—Allows users to complete the installation by asking them to register the installation; displays a Register Now button that either launches an external executable or takes the users to a Web site. (You specify the information about the external application and the arguments to be passed to it through Executable and Arguments properties, respectively.)
  • Splash—Displays the company logo (that you can set through the SplashBitmap property) at the beginning of the install

As you can see, the Windows Installer is very restricted. It doesn't allow you to design custom windows and add them to the deployment project. However, Windows Installer does define a standard approach for creating installers that are consistent and simple to use. In this section, you add some additional dialog boxes to your installation sequence by using the Add Dialog menu. Here are the required steps:

  1. Select Start from the User Interface Editor and choose the Action | Add Dialog menu.
  2. In the Add Dialog box, select the Checkboxes (A), License Agreement, Read Me, and Splash dialog boxes, and then add them to the Start sequence.
  3. Drag and drop the dialog boxes into the proper sequence, as displayed in Figure 4.
  4. Figure 4: The Proper Sequence for the Dialog Boxes

  5. To have the developer.com logo display on all of these additional default dialogs, set the BannerBitMap property to developer.gif.
  6. Select the License Agreement dialog box and view its properties window. Change the LicenseFile property to license.rtf.
  7. Select the Read Me dialog box and select View | Properties Window to bring up its properties window. Change the ReadMeFile property to readme.rtf.
  8. Use the Checkboxes (A) dialog box to ask the user whether the demo shortcut you placed in the User's Desktop folder should be installed or not. Modify the properties of this dialog box to match the Figure 5 screenshot.
  9. Figure 5: Modified Properties of Checkboxes (A) Dialog Box

  10. Remember to set the CheckBox1Property to SHORTCUTDEMO. This value is the same as the Condition property that you set for the User's Desktop folder in the File System Editor. If the user selects this checkbox during installation, the value of the SHORTCUTDEMO condition is set to true. As a result, the shortcut installs on the user's desktop. If the user does not select this checkbox, the SHORTCUTDEMO condition is set to false and the shortcut does not install. In the Figure 4 dialog, you also set the Visible property for the rest of the checkboxes to false to prevent them from being displayed.




Page 3 of 4



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Rocket Fuel