This article was originally published in the January 2001 issue of the InstallShield Newsletter

Customizing InstallShield 6 Dialogs

Abstract: InstallShield Professional - Standard Edition has an open architecture that allows you to customize existing dialogs or to create your own wizard dialogs from scratch. But there are also ways to tweak and improve your setup's user interface with less effort. This article lists various methods to customize dialogs and shows some tricks and tweaks.

Modifying the Dialog Layout

You can add or edit static text on the dialogs, hide, move or resize controls like buttons or edit boxes, etc. by modifying the dialog template that is stored in a DLL. This procedure is described in Knowledge Base article Q104953. I'm not going to reiterate this article here, but want to emphasize some points and give additional hints:

  • Modifying the dialog template requires an additional tool, it can't be done with InstallShield alone. The Knowledge Base article assumes that you have Microsoft Visual Studio or some similar tool. If you don't, you should consider to use InstallDialogue, a third party tool to enhance and modify InstallShield dialogs, that also include a dialog editor (see below).
  • The default dialog templates are stored in _isres.dll in the Redistributable folder under the InstallShield program directory. You should not modify this file, because it is common to all projects. Instead create a new _isuser.dll, copy the dialog you want to modify to this dll (don't change the dialog ID), and copy the _isuser.dll to the Setup Files pane of your install project. InstallShield first looks in _isuser.dll when a dialog is to be displayed.
  • Use the dialog sampler to find out the resource ID of the dialog you want to modify. When you select a dialog in the list box, its resource ID is displayed.
  • In a multi language setup you must these modifications for each language, i.e. you must create an _isuser.dll for each language in your setup user interface.
  • You can convert an edit control to a password field by checking the Password box on the Format tab of the property dialog for the edit box. This is an easy way to convert a dialog like SdRegisterUserEx or SdShowDlgEdit2 to a password dialog.
  • You cannot add buttons or other controls that would require script code to handle with this method. You would have to create a completely custom dialog for this purpose, i.e. you need to write the dialog handler yourself. This is not true for controls you add with InstallDialogue - in this case you only write the code to handle your additional controls; the preexisting controls are processed by InstallShield.
  • Be careful with advanced controls, like the IP address control in Visual Studio. They often require that you first update operating system files or install and register runtime libraries on the target machine. (InstallDialogue has an IP control without this dependency.)

Modifying the dialog behavior

Changing the behavior of an Sd dialog was relatively easy in InstallShield 5 because they are script driven and their .rul files were included and could be edited. In InstallShield 6 this is no longer the case: the dialog scripts are delivered in pre-compiled library files that can't be modified. InstallShield 5 is included on the InstallShield 6 CD-ROM so you could grab the .rul files from there. However you will have to adjust these scripts to work with InstallShield 6, and sometimes they won't work at all because the internal functionality has changed, e.g. for component views. To properly set the text on the white banner at the top edge of the Windows 2000 style dialogs, add this line to the DLG_INIT part of the dialog script:

SdSetDlgTitle(szDialogName, hwndDialog, szTitle);

The hwndDialog window handle can be retrieved by calling CmdGetHwndDlg (szDialogName). The szTitle specifies the text that should be displayed on the white banner. Note that two lines of text can be displayed here, so this string can contain a line break character "\n". The first line will be drawn with bold font.

The latest version of InstallDialogue (see below) enables you to hook into the dialog events and modify the behavior of InstallShield 6 dialogs without access to the script code.

Setting the Title Bar Text

By default, the wizard dialogs show the text "InstallShield Wizard" in the title bar, and on the button in the task bar. You can easily change this to display your application name instead with the following function call:

SetTitle("Your Application Name Setup", 0, BACKGROUNDCAPTION);

Note that this will only work if you are not using a main setup window. If you have changed the default behavior and enabled the background window, the above line will change the title bar of the main window, not the wizard dialog.

Customizing the Dialog Bitmap

In the upper right corner of the Windows 2000 style dialogs, in the white banner, a computer icon is shown by default. You can replace this icon with your own image or logo, by calling the InstallShield function:

DialogSetInfo(DLG_INFO_ALTIMAGE, SUPPORTDIR ^ "my.bmp", TRUE);

The default icon bitmap has a size of 67 x 53 pixels and uses 256 colors (see figure 1). Your custom bitmap should use the same color depth.

Figure 1

Figure 1: The default icon

In the default bitmap, teal (red = 0, green =128, blue = 128) is used as transparent color. If you want to support transparency in your custom bitmap, you must change the second parameter you pass into DialogSetInfo like this:

DialogSetInfo(DLG_INFO_ALTIMAGE, SUPPORTDIR ^ "my.bmp;1;;;0,128,128", TRUE);

To use a different transparent color, change the last three numbers to its RGB code (in decimal, not hexadecimal numbers)

You are not limited to the default bitmap size, it may cover the whole white bar (498 x 59 pixels). This can be used to create effects like shown in Figure 2. If your graphic is smaller, it will be centered vertically in the white banner and right aligned. Note that the text is written on top of the image, it is not part of the bitmap. You should avoid dark colors in your graphic to keep the black text readable.

Figure 2

Figure 2: A bitmap that covers the whole banner area

The first (Welcome) and last (Finish) dialogs in a setup have a different layout: A white background with a large blue bitmap on the left side. On this bitmap, an icon image is shown. This is the same graphic as in the upper right corner of the other dialogs, and can be replaced with the same function call. Note that the large blue bitmap cannot be changed in this way, only the icon that is displayed on top of it. The maximum size for a replacement icon on this dialog is 129 x 59 pixels, larger images will be right aligned and clipped on the left. So it is be possible to use the same 498 x 59 banner as above, which results in an effect as shown in figure 3.

Figure 3

Figure 3: Welcome dialog with alternate image

To change the large blue background image, you must edit the dialog resource as described above, or call the IdSetWelcomeFinishBitmap function of InstallDialogue.

About InstallDialogue

Throughout this article, a tool called InstallDialogue has been mentioned several times. Here is some additional information about it: InstallDialogue is an add-on for InstallShield 6 (a version for InstallShield 5 is also available). It can create custom dialogs or modify existing dialogs with script commands. It also includes a dialog editor with a look and feel similar to Visual Studio. The latest version of InstallDialogue enables you customize the behaviour of the standard Sd dialogs without having the source .rul file available. Some sample code is available that uses the technique:

  • Maintenance Welcome dialog for updates, where the name of the Repair option is changed to "Update", and the Modify option is disabled.
  • License dialog where the user has to scroll the license text to the end before the Yes button is enabled. You can optionally add a print button which will print the license agreement.
  • SdComponentTree dialog which has buttons for selecting/deselecting all components with one click.
  • SdRegisterUserEx dialog which implements a simple serial number check (the serial number check can easily be replaced with your own).

Some other features of InstallDialogue that I want to point out:

  • Visual dialog editor. Dialog layout is stored in InstallScript file that can be further customized.
  • Special controls like Hyperlink and IP Address without dependencies to other runtime files.
  • Selection lists with grayed (disabled) and tri-state check boxes.
  • Function to replace the large image on Welcome and Finish dialogs. The smaller icon that is normally displayed on top of this bitmap can be turned off.
  • Localization: Since InstallDialogue is script based you don't need to create separate DLLs for each language in your setup. You can even grab existing texts from other dialogs and the string table in InstallShield's _isres.dll, so you can support standard texts ("Back", "Next", "Company Name", "Warning", error messages, ...) in all available languages without translation efforts.

The InstallDialogue runtime files come as InstallShield Object that you can easily plug into your project. A fully functional Free Edition (displays a note upon startup) is also available. For more information see http://www.moonsea.com

About the Author

Stefan Krueger is working as freelance setup consultant. Besides his contract work, he answers questions in various newsgroups and maintains the InstallSite.org web site, a place where setup developers share resources and information among peers.

If you have any comments about this article, or want to suggest a topic that Stefan should discuss in a future article, please write to E-Mail. To read Stefan's articles from previous issues of the InstallShield Newsletter, please visit http://www.installsite.org/isnews.htm.

 

 

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact

 

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Ploicy
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact.

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact.