Professional Documents
Culture Documents
Online Reference
Online Reference
Reference Manual
Copyright
©1994-2002 Wise Solutions, Inc. All Rights Reserved. This documentation and the accompanying
software are copyrighted materials. Making unauthorized copies is prohibited by law. No part of the
software or documentation may be reproduced, transmitted, transcribed, stored in a retrieval
system or translated into any human or computer language without prior written permission of
Wise Solutions, Inc. Wise Solutions, Inc. asserts its “Moral Right” to be identified as the author of
this work, in all jurisdictions which recognize the “Moral Right.”
Notice
UNLESS OTHERWISE PROVIDED BY WRITTEN AGREEMENT WITH WISE SOLUTIONS, INC., THIS
PUBLICATION, AND THE SOFTWARE SOLD WITH THIS PUBLICATION, ARE PROVIDED “AS IS”
WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE ENTIRE RISK ARISING OUT OF THE USE OR PERFORMANCE OF THIS PUBLICATION AND
SOFTWARE REMAINS WITH YOU. IN NO EVENT WILL WISE SOLUTIONS, INC., OR ANY OF ITS
SUPPLIERS, BE LIABLE FOR ANY LOST PROFITS, LOST SAVINGS, DIRECT, INCIDENTAL OR
INDIRECT DAMAGES OR OTHER ECONOMIC OR CONSEQUENTIAL DAMAGES, EVEN IF WISE
SOLUTIONS, INC., OR ITS SUPPLIERS, HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES. WISE SOLUTIONS, INC. RESERVES THE RIGHT TO MODIFY THIS DOCUMENT AT ANY
TIME WITHOUT OBLIGATION TO NOTIFY ANYONE. IN NO EVENT SHALL WISE SOLUTIONS, INC.’S
OR ITS SUPPLIERS’ LIABILITY UNDER THIS AGREEMENT EXCEED THE SUM OF ANY AMOUNTS PAID
HEREUNDER BY THE CUSTOMER TO WISE OR THE SUPPLIER.
Trademarks
Wise Solutions, Inc. owns a number of registered and unregistered Trademarks and Service Marks
(the “Marks”). These Marks are extremely valuable to Wise Solutions, Inc. and shall not be used by
you, or any other person, without Wise Solutions, Inc.’s express written permission. The Marks
include, but are not necessarily limited to the following: APPLICATION ISOLATION WIZARD™;
APPLICATIONWATCH™; CONFLICTMANAGER®; INSTALLATION DEVELOPMENT LIFE CYCLE™; INSTALLBUILDER®;
INSTALLMAKER®; INSTALLMANAGER®; INSTALLTAILOR™; MSI DEBUGGER™; MSI SCRIPT™;
PACKAGEMANAGER™; SETUPCAPTURE®; SMARTMONITOR™; SMARTPATCH®; SOFTWARE DISTRIBUTION MADE
EASY™; SOFTWARE INSTALLATIONS MADE EASY®; VISUAL MSIDIFF™; WEBDEPLOY™; WISE INSTALLATION
SYSTEM®; WISE PACKAGE STUDIO™; WISE SOLUTIONS®; WISESCRIPT™; WISESCRIPT EXPRESS™;
WISEUPDATE®; WISEUSER®; and the Wise Solutions logo.
In addition to Wise Solutions, Inc.’s Marks, some Wise Products may include Trademarks or Service
Marks owned by other corporations. These other Marks include, but are not necessarily limited to
MICROSOFT® WINDOWS® and MICROSOFT® VISUAL STUDIO® .NET, which are registered Trademarks of
Microsoft Corporation.
You shall not use any of the Trademarks or Service Marks of Wise Solutions, Inc., Microsoft
Corporation, or any other entity, without the express written permission of such Trademark or
Service Mark owner.
2
CONTENTS
Contents
1 Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Documentation Roadmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Getting Help and Product Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Using Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Getting Support at Our Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Asking Our Support Team . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Getting Updates Over the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Downloading Application Runtimes Over the Web . . . . . . . . . . . . . . . . . . . . 16
3
CONTENTS
4
CONTENTS
5
CONTENTS
6
CONTENTS
7
CONTENTS
8 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
About Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
SetupCapture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Guidelines for Capturing an Application . . . . . . . . . . . . . . . . . . . . . . . . 351
Running SetupCapture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Setting General Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
Setting Directories to Watch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Setting File and Folder Exclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Setting Registry Exclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Executing Installations to Be Captured . . . . . . . . . . . . . . . . . . . . . . . . 362
Files Ignored by SetupCapture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
ApplicationWatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Import Visual Basic Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
8
CONTENTS
9
CONTENTS
13 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
10
Chapter 1
Welcome
11
1: WELCOME
Documentation Roadmap
The Wise Installation System Reference Manual, the online help, and the
Getting Started Guide assume that you are proficient in the use of the
Windows operating system. If you need help using the operating system,
consult its user documentation.
The Wise Installation System often provides multiple ways to accomplish a
task. In some cases, you can use the main menu, the right-click menu, or
a toolbar, or you can press a key combination for a certain task, but
instructions in this documentation generally include only the most
convenient method. If you are most comfortable with a particular method,
check the right-click menu, the main menu, and the toolbar to learn the
different options available to you.
The following sources of information help you learn the Wise Installation
System.
Reference Manual. The reference manual is available from the Help
menu; select Online Reference. It contains detailed technical
information and step-by-step instructions for performing common tasks.
It is also available from Wise Solutions as a printed manual for a fee.
Contact Wise Solutions Sales at 1-800-554-8565 or 734-456-2100
(international).
Online Help. All the material in the reference manual is also available
in the online help system. To access the contents, index, and search
functions, select Help Topics from the Help menu. To access context-
sensitive help, press the F1 key from any place in the product, and you
will see help that describes the part of the product that you are in. Also
see Using Online Help on page 13.
Getting Started Guide. The printed Getting Started Guide contains
system requirements, installation instructions, and a walkthrough. You
can also access a .PDF copy of the Getting Started Guide from the Help
menu.
Release Notes. You can access a product release notes document, in
.HTM format, by selecting Release Notes from the Help menu. The
release notes document covers new features, enhancements, bug fixes,
and known issues for the current version. It also contains links to
release notes for other versions of the product.
12
GETTING HELP AND PRODUCT SUPPORT
13
1: WELCOME
Subscribe to TechInfo
TechInfo is a free monthly technical newsletter that contains technical tips,
product updates, and other important technical information. To subscribe
to TechInfo or to read back issues, visit www.wise.com/techinfo.asp or
click the TechInfo link on our Web site’s support page.
14
GETTING UPDATES OVER THE WEB
Note:
Your Wise product can remind you to check for updates. In the Preferences
dialog, select an option in the Check for Updates drop-down list. This sets the
frequency at which you want to be reminded to check for updates.
15
1: WELCOME
To download runtimes:
1. Make sure you are connected to the Internet.
2. Select Download Runtimes from the Help menu.
The Download Runtimes Wizard dialog appears.
3. Click the Advanced button to set proxy server and reminder options.
The Advanced Settings dialog appears.
16
DOWNLOADING APPLICATION RUNTIMES OVER THE WEB
17
1: WELCOME
18
Chapter 2
Wise Installation System
Basics
Before you create an installation, you should be familiar with how to create
and maintain an installation. This section discusses the process of creating
and maintaining installations, including:
Wise Installation System Views.
19
2: WISE INSTALLATION SYSTEM BASICS
20
NAVIGATING BETWEEN VIEWS
21
2: WISE INSTALLATION SYSTEM BASICS
22
GETTING STARTED
Getting Started
After you review the various parts of the Wise Installation System and
gather the information you need to start, you’re ready to build your
installation. This section provides a broad outline of steps you might take
to build and distribute your first installation. It also shows you how to
create, open, save, close, test, and compile installations.
23
2: WISE INSTALLATION SYSTEM BASICS
24
GETTING STARTED
Note:
The Blank Script icon creates a blank script, which you can code from
scratch. If you select Blank Script to create a new empty script, you cannot see
all pages in Installation Expert; see Navigating Between Views on page 21.
4. Click OK.
The installation opens, and you can begin editing it by filling out the pages
in Installation Expert or by adding script actions in Script Editor.
25
2: WISE INSTALLATION SYSTEM BASICS
Navigation. Click these Testing and distribution. Compile, Test, and Run let you compile and test
buttons to change views. your installation. The Distribute button copies the installation package to
removable disks, an FTP server, or a network directory.
26
GETTING STARTED
Toolbar.
Title, Event, and
Language drop-
down lists.
List of available
script actions. Installation Script.
To insert an Contains all the
action, double- commands to be
click it, or place executed when you
your cursor in run your installer.
the script and
type its name.
You add script lines by adding a WiseScript action, then choosing options
for the action in a dialog. Because the script is displayed in English-like
terminology, you can easily read and interpret it to help with testing and
troubleshooting. Script Editor is described in more detail in Script Editor on
page 139, and each script action is described in WiseScript Actions on
page 173.
27
2: WISE INSTALLATION SYSTEM BASICS
Also see:
The Script Editor Window
Customizing the List of Actions
Choosing a Script to Edit
Note:
You can also use Script Editor’s debugging functions to test your script. See
Debugging Scripts on page 162.
Click the Compile button to build a single executable file that contains
the installation script as well as all the files needed for your installation.
This is the installer .EXE that you distribute to end users. If any files are
absent or not readable, the compilation process displays error
messages. Your installation is saved automatically each time you
compile unless you set the Prompt to Save option in Preferences; see
Setting Preferences on page 43.
Click the Test button to perform a compile and run your installation in
test mode. In test mode, the installation performs all necessary tasks
without actually installing or modifying files. However, if there are any
script lines that are dependent on files being installed by previous script
lines, then test mode might fail. For instance, if an Install File(s) line
copies a ReadMe to the Temp directory and a second script line attempts
to launch that ReadMe, the second script line fails because the ReadMe
is not really in the Temp directory.
Click the Run button to execute your installation. The entire installation
is executed just as it would be on the destination computer. This means
that files are installed on your computer and your system is modified.
28
MANAGING INSTALLATIONS
Managing Installations
After you create new installations, you can use Wise Installation System’s
management tools to help you maintain them. Use the Source Directories
menu command to manipulate directories from which files are pulled. To
change the directories where source files are located, see Changing Source
Directories on page 29. To change the format of pathnames, see
Converting to Relative Source File Paths on page 32 and Converting to
UNC-Based Source File Paths on page 30.
If you are using the Professional Edition, you can take advantage of
application repair and self-repair functionality. Self-repair enables your
application to initiate repair of itself when it’s launched if key files or
registry entries are missing. Repair is available as an option in the uninstall
wizard for installations created with the Professional Edition. See Using
Self-Repair on page 34.
29
2: WISE INSTALLATION SYSTEM BASICS
30
MANAGING INSTALLATIONS
For instance, if you have your Y:\ drive mapped to a file server, and you
add files to your installation from your Y:\ drive, the paths in Script Editor
appear starting with Y:\. If a co-worker opens and compiles your script on
another computer that doesn’t have its Y:\ drive mapped to the same file
server, the compilation fails because the script cannot find the source files
on the Y:\ drive. However, if you first convert all network paths to UNC-
based paths, co-workers on the same network can open and compile your
script without encountering errors.
2. Select Change source paths to UNC paths from the Type drop-down
list and click OK.
An alert message appears informing you that existing source paths will
be converted to UNC-based pathnames.
3. Click Yes in the alert message.
31
2: WISE INSTALLATION SYSTEM BASICS
32
MANAGING INSTALLATIONS
2. Select Change source paths to relative paths from the Type drop-
down list and click OK.
An alert message appears informing you that existing source paths will
be converted to relative pathnames.
3. Click Yes in the alert message.
Converting paths to relative paths does a one-time conversion of all the
relative paths in your script. Paths to files that are not on the same drive as
the installation file are not converted, because if they are on another drive,
they cannot be written as relative paths. If you leave the conversion option
set to Change source paths to relative paths, all files you add
subsequently are converted to relative paths. If you change the conversion
option back to Do not modify source paths, the converted pathnames
stay converted, but new files you add do not have relative paths.
33
2: WISE INSTALLATION SYSTEM BASICS
Using Self-Repair
34
MANAGING INSTALLATIONS
Automatic Self-Repair
You can add automatic self-repair to any installation you create with the
Professional Edition. To do so, you must explicitly configure your
installation for self-repair. The advantage of this method is that it does not
rely on the end user to initiate self-repair. Each time the end user launches
your application via its shortcut, files and registry entries that you specify
are checked. If they are missing, the end user is automatically prompted to
repair the application. If files need to be reinstalled, the end user is
prompted for the installation media from which the application was
originally installed or prompted to connect to a network location if the
installation was installed from the network. The installation re-edits the
registry, re-edits or recreates .INI files, reinstalls all files, and re-self-
registers files. Self-repair works only if the destination computer is running
a Win32 operating system.
Technical Note:
You first mark the files and registry values that you want checked. Then you
create a shortcut that launches your application, and you turn on self-repair for the
shortcut. When the application is installed, the list of required items is put into a
special registry key. When the end user launches the shortcut that runs your
application, the shortcut actually runs unwise.exe (the uninstall program) with
special command line options. Unwise.exe checks that the required items are
present. If they are, unwise.exe then opens the application. The end user sees
none of this, and if the number of required items is few, then the extra time to
launch is negligible. If the required items are not present, then unwise.exe displays
a message that the application is damaged, and asks whether to repair it, run it
anyway, or stop checking it on launch.
35
2: WISE INSTALLATION SYSTEM BASICS
36
CUSTOMIZING YOUR DEVELOPMENT ENVIRONMENT
37
2: WISE INSTALLATION SYSTEM BASICS
Color button, and change the color to red. This makes the background
screen red while your installer .EXE runs.
4. When you are finished editing the basic installation so that if fits your
needs, select Save As from the File menu.
5. Navigate to the Template directory within the Wise Installation System
application directory, type a file name, and click Save.
6. To test your new template, select New from the File menu.
The New Installation File dialog appears, and it contains the name of
the file you just saved.
Note:
If the New Installation File dialog does not contain the new template,
check to make sure you saved the installation file (.WSE) to the Wise
Installation System\Template directory.
Properties displays only those pages that do not directly affect your
installation script. The pages show items that do not add or change
38
CUSTOMIZING YOUR DEVELOPMENT ENVIRONMENT
script lines in your script. This set of page groups appears automatically
when you select Installation Properties from Script Editor’s Edit menu.
If the sets of page groups on the Pages menu aren’t suitable for the type of
installations you are doing, you can create your own sets. A customized set
of page groups for the type of software package you create frequently lets
you focus on the steps necessary to create an installation script for that
type of application. This helps you standardize installations with a
consistent look and feel. See Customizing Installation Expert Page Groups.
Note:
You can only edit those sets of page groups you’ve added. Also, you cannot
change page names, only the names of sets of page groups.
39
2: WISE INSTALLATION SYSTEM BASICS
40
CUSTOMIZING YOUR DEVELOPMENT ENVIRONMENT
• Select the page or pages you want to add to the group. Use CTRL-
click or SHIFT-click to add multiple pages.
7. Click OK.
The Customize Pages dialog returns, showing the selected pages in the
Page Names box on the right.
8. Add more page groups and pages as appropriate.
9. Click OK. Your new set of page groups appears under the Pages menu.
The name of your set has an underlined letter for keyboard selection, if
you indicated a letter by an ampersand when you named your set of
page groups.
41
2: WISE INSTALLATION SYSTEM BASICS
42
CUSTOMIZING YOUR DEVELOPMENT ENVIRONMENT
Setting Preferences
In Preferences, customize options for script development and compiling.
Also specify .DLLs to ignore for ApplicationWatch and the Import Visual
Basic Project tool. To access Preferences, select Preferences from the Edit
menu.
Prompt to Save. Mark this checkbox to have Script Editor prompt you
to save your installation script each time you build a new installer .EXE.
If you do not mark this checkbox, the script is always saved
automatically before compiling.
Prompt for Changed Compiler Variables. Mark this checkbox if you
want to receive a warning if the compiler variables _WISE_ or
_ODBC32_ have changed from the last time the installation script was
opened. For instance, if you develop an installation script where the
Wise Installation System application directory is C:\Wise, the compiler
variable _WISE_ is automatically set to C:\Wise. If you then open the
same script on a different computer, where the application directory is
43
2: WISE INSTALLATION SYSTEM BASICS
44
CUSTOMIZING YOUR DEVELOPMENT ENVIRONMENT
Note:
Update reminders occur only when the Wise Installation System is
running. If you do not use the Wise Installation System regularly, you might not
be notified of updates on a timely basis.
45
2: WISE INSTALLATION SYSTEM BASICS
46
DISTRIBUTING YOUR INSTALLATION
47
2: WISE INSTALLATION SYSTEM BASICS
48
DISTRIBUTING YOUR INSTALLATION
3. Click Next.
The Network Directory dialog appears.
4. In the Network Directory field, specify the directory on the network
where you want to move the file.
5. Click Finish.
The installation is compiled if necessary, and is copied to the network
directory you specified.
49
2: WISE INSTALLATION SYSTEM BASICS
50
DISTRIBUTING YOUR INSTALLATION
51
2: WISE INSTALLATION SYSTEM BASICS
52
Chapter 3
Installation Expert Pages
This section describes each page in Installation Expert. Pages are arranged
alphabetically for quick reference. For instructions on how to use
Installation Expert, see Using Installation Expert on page 26.
Add/Remove Programs
Note:
The Add/Remove programs page applies only when the application is
installed on the Windows 2000 or XP platform.
53
3: INSTALLATION EXPERT PAGES
Technical Note:
An executable or icon file can have multiple icons contained within the
file. To see the icons in a file, go to Windows Explorer, right-click any shortcut
file, and select Properties. Click the Shortcut tab, then click the Change Icon
button. The Change Icon dialog appears. It contains a graphical list of icons for
the shortcut file you right-clicked. The icon number of the first icon is 0, the
icon number for the second is 1, and so on. To see the icons in a different file,
click Browse and choose a different file.
Help URL. Enter the path to either a standard help file or an HTML help
file installed on the destination computer.
Comments. Enter any additional comments that might be helpful to
end users.
Autoexec.bat
Use this page to specify commands that are to be added to the
Autoexec.bat file of the destination computer during installation. Whenever
changes are made to the Autoexec.bat file, the end user is prompted to
restart the system after installation so the changes can take effect.
Add Directory to Path. The fields in this section of the page determine
how the PATH variable should be set to add a directory (from your
installation) to it. You have the following options:
54
• Directory to add to PATH. Enter the pathname of the directory to
be added. To build your directory path, use one of the built-in Wise
Installation System runtime variables, such as %MAINDIR% for the
Application directory or %SYS% for the Windows System directory.
See Compiler Variables vs. Runtime Variables on page 168.
• Location of new directory. Specify whether the installation should
place the new directory at the beginning or at the end of the PATH
variable.
• Path selection. Specify whether the installation should edit just the
first PATH statement in the Autoexec.bat file or all path statements.
Commands to add to AUTOEXEC.BAT. This section lists any
commands you have added to the Autoexec.bat file.
• To enter a new command line to the Autoexec.bat file, click the Add
button and enter the new line in the dialog.
• To remove an existing line, select it from the list and click the Delete
button.
• Click the Details button to display the Add Command to
Autoexec.bat dialog. Use this dialog to specify exactly how to edit
the file.
See Add Command to AUTOEXEC.BAT on page 55.
55
3: INSTALLATION EXPERT PAGES
Text to Insert. Enter the command line you want to add to the
Autoexec.bat file. If your command line refers to a program file, use one
of the built-in Wise Installation System runtime variables, such as
%SYS% for the Windows System directory, to specify your directory
path. See Compiler Variables vs. Runtime Variables on page 168. The
PATH variable cannot be set when your command is executed, so always
use a full pathname.
Line Number. Enter the line at which the new line should be inserted.
To append the command to the end of the file, enter 0. The Search for
Existing Text panel in this dialog overrides any line number you enter
here; the line number applies only when the text is not found or when
you do not specify any text.
Search for Text. Enter the text you wish to search for here. The
installation scans the Autoexec.bat file looking for a line that begins
with, ends with, or contains this text (depending on the setting of the
Match Criteria field). If more than one line in the file matches, only the
first is selected.
Comment Text. Enter the text to insert at the beginning of the line
when it has been found. Inserting “REM ” (without the quote marks and
with the trailing space) causes the line to be commented out and
ignored during startup. This is useful when you are replacing an existing
command with a new command and wish to leave the existing command
in place, but inactive. In this case, you should always set the Insert
Action field to cause your new command to be inserted before the
56
existing line so that a subsequent installation finds and edits the active
command, not the commented-out line.
Insert Action. Select the action to be taken when a line containing the
specified text is found. You can either insert your new command before
the existing line, replace the existing line with your new command, or
insert your new line after the existing one.
Match Criteria. Choose whether the line must begin with, contain, or
end with the text entered in the Search for Text field.
Ignore White Space. If this checkbox is marked, the search operation
ignores spaces and tab characters.
Case Sensitive. If this checkbox is marked, the search operation
distinguishes between uppercase and lowercase text.
Make Backup File. If this checkbox is marked, the installation makes a
copy of the Autoexec.bat file before editing it. The backup is retained
after installation so that the end user can undo any changes made to
the Autoexec.bat file that cause problems.
BDE Runtime
Use this page to determine whether the Borland Database Engine (BDE) is
installed, and if so, what associated drivers are added. The Wise
Installation System supports BDE version 5.2.0.2 (English only), 5.1.0.4
(English only), and 5.0.1.22 (international versions). You can set the BDE
configuration to a language other than English. To do so, add BDE on this
page, then go to the Compiler Variables page and change the value of the
compiler variable named _BDEWIN32LANG_ to the appropriate language
number. The language numbers are predefined by Borland and are listed
under the Language Number field in the section Configure BDE on
page 206.
Warning:
You can damage destination computers by installing the wrong version of
runtime support files. Installing runtime files incorrectly can cause the end user's
applications to stop running properly and can even disable the operating system.
Before deploying any installations that install runtimes, get the latest runtime
updates by running the Download Runtimes wizard from the Wise Installation
System Help menu.
57
3: INSTALLATION EXPERT PAGES
Note:
Partial installations are not recommended.
Alias Driver. Choose the driver that should be used with this database
by default.
Alias Name. Enter the name of the alias to be added as it appears to
the end user.
58
Alias Pathname. Enter the path of the new alias.
Billboards
This page lets you select a series of billboard graphics that are displayed
during installation. You can use these graphics to inform end users of
software features, to remind them to register your application, or to
advertise related products. Here are a few guidelines for using billboard
graphics:
Billboard graphics must be .BMP (bitmap) files.
All color palettes are supported, up to true color. However, if you add
large color images, the installation speed decreases.
The destination computer must be set to display true colors in order for
true color billboards to display correctly.
If you simultaneously display multiple color images that use different
color palettes, the colors might not appear correctly.
The window area of this dialog lists the bitmaps that are selected to appear
during the installation. The graphics appear in the order listed in the
window, from top to bottom.
To add a new billboard image to the list, click the Add button and select
the image file from the Open dialog.
To remove a billboard image from the list, select that image from the list
and click the Delete button.
To change the order of a billboard image in the list, select the image you
want to move and click the Move Up or Move Down button (as
appropriate).
To edit the settings of a billboard image, select the image and click the
Details button. This opens the Billboard Settings dialog, where you can
change the position and display options for the image.
See Billboard Settings on page 60.
59
3: INSTALLATION EXPERT PAGES
Billboard Settings
This dialog appears when you click the Details button on the Billboards
page; see Billboards on page 59. Use this dialog to set the options for a
billboard image.
Pathname. Enter the path to the image files you wish to display.
Images are compiled into the installation’s .EXE file.
X Position / Y Position. These fields indicate the location on the
screen at which the specified image is positioned. Specify the
coordinates based on a 640 x 480 screen; the graphic is placed
proportionally on higher resolution screens.
Erase Num. This field determines how many of the graphics currently
being displayed should be erased before a new image is displayed. To
display only one image at a time, enter 1. The oldest image is removed
first.
Build Effect. The options in this field determine the transition effect
used to display the image. You can cause the graphic to fade in or to
move onto the screen from any edge of the screen.
Transparent. Mark this checkbox to have the pure blue (R=0, G=0,
B=255) parts of your image become transparent.
Center Horizontal. Mark this checkbox to center the image
horizontally on the screen.
Place at Right. Mark this checkbox to display the image at the right
edge of the screen. Due to rounding errors inherent in the Windows
Metafile format, this option might be slightly inaccurate when used with
custom graphics that have been scaled to the screen.
60
Scale to Screen. Mark this checkbox to scale the image to take up the
same proportion of the screen regardless of screen resolution. It
displays at actual size on a 640 x 480 screen.
Hide Progress Bar. Mark this checkbox to hide the progress indicator
while the graphic is being displayed. A series of graphics can be used as
a progress indicator in their own right.
Center Vertical. Mark this checkbox to center the image vertically.
Place at Bottom. Mark this checkbox to place the image at the bottom
of the screen. Due to rounding errors inherent in the Windows Metafile
format, this option might be slightly inaccurate when used with custom
graphics that have been scaled to the screen.
Tile Background. Mark this checkbox to repeat the graphic edge-to-
edge to fill the entire screen.
Erase All. Mark this checkbox to remove all previous graphics from the
screen before displaying a new one.
Timed Display. Mark this checkbox to display a series of graphics at
evenly-spaced intervals during installation. This is marked by default
and should remain marked for the billboard feature to work correctly.
Note:
If the billboards display too quickly during installation, mark the Slow
Installation Speed checkbox on the Build Settings page.
61
3: INSTALLATION EXPERT PAGES
Build Settings
Use this page to specify options for compiling the installation.
Maximum Compression. If this checkbox is marked, the installation
file is made as small as possible. You should mark this checkbox before
compiling an installation for distribution. However, be aware that it takes
longer to compile an installation when maximum compression is
enabled, so it is a good idea to disable it during development and while
testing your installation.
Slow Installation Speed. Mark this checkbox to slow down the
installation on the destination computer. Usually, you only do this when
you have a short installation and want to ensure that your billboard
graphics are displayed.
Use Internal 3D Effects. This checkbox causes the installation to
display stylish 3D-style dialogs and controls, even if the destination
computer does not have the CTL3D.DLL file. This option is applicable
only when installing to a 16-bit Operating System. If you enter
TrueWin32 in the Destination Platform field, then this option is
automatically disabled and cannot be edited.
No Reboot Message During Silent Installs. Normally, when the
installation is run in silent mode, it displays a message that the system
must be restarted after installation. If this checkbox is marked,
however, the compiled installation does not display the warning
message but reboots the system without warning. You can run an
installation in silent mode by running it from the command line and
adding a /s option.
Create Windows Me System Restore Snapshots. If this checkbox is
marked, the installation adds system snapshot entries to the Windows
Millennium (Me) System Restore utility. This lets end users restore their
system to the state it was in before your application’s installation. The
installation takes longer to perform when this checkbox is marked. Note
that this works only if you enable it in the Windows Millennium operating
system.
Replace In-Use Files. If this checkbox is marked, the installation
forces the replacement of in-use files by performing a reboot of the
system. Otherwise, the end user is notified that installation cannot be
completed and the installation aborts.
Convert CD-ROM to Floppy. When creating a CD-ROM-based
installation, you can use the Copy Local Files script action to copy files
from the CD-ROM to the end user’s hard disk, rather than embedding
these files in the installer .EXE. Mark this checkbox if you want to have
these files included in the installer .EXE so the installation can be placed
on floppy disk(s). (You can exempt individual Copy Local Files script
62
actions from conversion by marking their Don’t Convert to Floppy
checkbox.) For more information, see Copy Local File(s) on page 208.
Beep on New Disk Prompt. Mark this checkbox to cause your
compiled installation to beep when requesting a new disk.
ZIP Compatible. Mark this checkbox to make your compiled
installation compatible with the ZIP archive format. If you make your
installation ZIP compatible, end users can extract files from it using any
unzip utility, such as WinZip. They must open the installation by
choosing Open from the File menu in the ZIP utility. Double-clicking the
installation launches it normally.
Network Installation. Mark this checkbox if you are creating a
network installation and want to reduce network traffic. If this checkbox
is marked, then a CRC (Cyclic Redundancy Check) is performed on
existing files. If the file exists and is identical to the new installation file,
the file is not copied down, reducing traffic. However, because CRC
checks are time-intensive, this can slow down the installation on the
target machine, so you might want to limit this option to installations
that are performed without end user intervention.
Destination Platforms. Specify the type of operating system for which
you create your installation.
• Windows 3.1x, 95, and NT (Win16/Win32). Your installation
can run under both Win16 and Win32 but is slower.
• Windows 95 and NT (True Win32). Your installation can run only
under Win32 but is faster.
For all Pathname fields, click Browse to simplify path and file selection.
Installation .EXE Name. Specify a name and location where you want
the executable file to be stored after it has been compiled. If you leave
this field blank, the name of the installation executable defaults to the
name of the installation file (*.WSE).
Language .INI Name. If you want to use a language that is not built
into the Wise Installation System, you can specify the path to an .INI
file that contains translation resources.
Setup Icon Pathname. Specify the path to the icon to be used for the
installation .EXE file.
Dialogs Directory. If you have created a directory containing
customized versions of dialogs and dialog templates, specify the path to
that directory here.
Temp. Files Directory. Specify the path to a directory where the Wise
Installation System can store temporary files while building your
installation. If this directory is not specified, the Windows temporary
directory is used.
63
3: INSTALLATION EXPERT PAGES
CAB Files
This page lets you place the installation files into a cabinet (.CAB) file for
automatic download and installation from a Web page. For more
information about .CAB files, go to the www.microsoft.com Web site and
search for cabinet files and internet component download.
To create a .CAB file, mark the Place Installation .EXE in .CAB File
option. This activates the window area directly below so you can type or
paste additional .INF file instructions for running the application.
The Wise Installation System automatically generates a SETUP.INF file that
contains the instructions that call the Microsoft CAB wizard and provides
instructions about which files to copy to the .CAB files. The SETUP.INF file
is part of the .CAB file, not in the directory structure.
Compiler Variables
Use this page to set compiler variables that change the compiled setup
program. For instance, you could use a compiler variable to determine
which files are included in the compiled .EXE file. Or you could use compiler
variables to create either a Win16 or a Win32 version of your application.
There are many other uses for compiler variables. For a step-by-step
procedure that shows how to use compiler variables to build a debug
version of your installation, see Building a Debug Version on page 164. To
see a sample script that uses compiler variables, open the file
COMPVAR.WSE from the Samples directory in the Wise Installation System
application directory. To read about the sample script, see Creating an
Installer That Can Be Customized During Compile on page 395.
When you reference a compiler variable name in your script, you must
surround the name with percent signs, for instance, %_DEBUG_%. See
Variables and Expressions on page 167 for more information about using
compiler variables. For automated build processes, you can specify
compiler variable values from the command line, either by entering the
value directly on the command line, or by storing the values in a text file;
see Wise Installation System (Wise32.EXE) on page 428.
To add a new compiler variable, click the Add button.
To remove a variable, select it from the list and click the Delete button.
To set the default value of the variable and enter other information
about it, click the Properties button. This opens the Compiler Variable
Settings dialog.
Compiling from Command Line. Mark this checkbox to be prompted
for the value of compiler variables when you compile an installation from
the command line.
64
Compiling from Within Wise. Mark this checkbox to be prompted for
the value of compiler variables when you compile an installation from
the Wise Installation System’s user interface. If you mark this checkbox,
then a Select Compile Settings dialog appears at compile time that lists
this compiler variable’s values. One dialog appears for each compiler
variable you define. Up to 10 values in the value list display as radio
buttons, and over 10 display in a listbox. Value length is limited by the
amount of text that displays on the dialog. The Do not prompt for
value checkbox in the Compiler Variable Settings dialog overrides this
setting.
See Compiler Variable Settings on page 65.
65
3: INSTALLATION EXPERT PAGES
Value List. For compiler variables that are displayed as a list, enter a
list of allowable values, each on a separate line. Also see Building a
Debug Version on page 164.
Data Entry Type. Choose the method to be used to enter data for the
compiler variable. Options include either a simple edit field in which the
end user can enter text, an edit field with a Browse button for specifying
directories, or a list of values that allows either single or multiple
selections.
Do not prompt for value. If this checkbox is marked, you are not
prompted for the value of this variable when compiling an installation
even if the Prompt for Compiler Variables checkbox is marked on the
main Compiler Variables page. Mark this checkbox for variables you do
not expect to change frequently.
Components
Use this page to add components to the installation. Components let you
add optional pieces, such as a spell checker, a tutorial, sample files, and
other such add-ons. When the installation is run, end users have the option
to choose which components they want to include.
To read about a script that demonstrates a component-based installation,
see Letting the User Choose Subcomponents During Installation on
page 406.
The current set of components displays on this page in the same order that
they are listed in the installation. Any component that is marked as being
installed by default is automatically enabled in the component list during
installation. (The end user can still deactivate any component’s checkbox.)
Use the buttons to the right of the list to add, edit, delete, or rearrange the
display order of the components.
Details edits the selected component, letting you rename it and specify
whether it should be installed by default.
Add creates a new component, prompting you to enter a name and
specify whether it should be installed by default.
Delete removes the selected component from the list.
Move Up and Move Down let you sort the list manually by moving the
selected component up or down in the list, exchanging it with the
component immediately above or below it.
If you decide to use components in your installation, you must go to the
Files page and assign the appropriate program files to each component.
66
Once created, the component is added to the Components drop-down list
in Installation Expert. Selecting a particular component from this list
indicates that the settings you make apply only to that component and are
implemented only if that component is installed.
Note:
When an end user selects one or more optional components to be installed, a
letter corresponding to each component is placed in a variable called
COMPONENTS. Selecting the first component places an “A” in the variable, the
second adds a “B”, and so forth. You can add up to 26 components this way. You
can edit the installation script and use conditional statements to determine which
files are installed when each component is selected. See Letting the User Choose
Subcomponents During Installation on page 406 to learn more about building a
component-based installation.
Config.sys
Use this page to specify lines to be added to the Config.sys file on the
destination computer during the installation. Whenever changes are made
to the Config.sys file during an installation, the end user is prompted to
restart the computer to initiate the changes.
To add a line to the Config.sys file, click the Add button and enter the
line in the Command Line field.
To remove an existing line, select it from the list and click the Delete
button.
To enter details about how and where a line should be added to the
Config.sys file, select the line and click the Details button. Configure the
settings in the Add Command to Config.sys dialog.
See Add Command to CONFIG.SYS on page 67.
67
3: INSTALLATION EXPERT PAGES
Text to Insert. Enter the command line you want to add to the
Config.sys file. Use a full pathname built with variable substitution (such
as %SYS% to specify the system directory) so your program runs
regardless of how the end user’s computer is set up.
Line Number. Enter the line at which the new line should be inserted.
Enter zero to append the command to the end of the file. The Search for
Existing Text section in this dialog overrides any line number specified
here; the line number applies only when the text is not found or when
you do not specify any text.
Search for Text. Enter the text you want to search for. The installation
scans the Config.sys file looking for a line that begins with, ends with, or
contains the text (depending on the setting of the Match Criteria field).
If more than one line in the file matches, only the first is selected.
Comment Text. Enter the text to insert at the beginning of the line
when it has been found. Inserting “REM ” (without the quote marks but
with a trailing space) causes the line to be commented out and ignored
during startup. This is useful when you are replacing an existing
command with a new command and wish to leave the existing command
in place but inactive. In this case, you should always set the Insert
Action field to cause your new command to be inserted before the
existing line so that a subsequent installation finds and edits the active
command, not the commented-out line.
Insert Action. Select the action to be taken when a line containing the
specified text is found. You can either insert your new command before
68
the existing line, replace the existing line with your new command, or
insert your new line after the existing one.
Match Criteria. Choose whether the line must begin with, contain, or
end with the text entered in the Search for Text field.
Ignore White Space. If this checkbox is marked, the search operation
ignores spaces and tab characters.
Case Sensitive. If this checkbox is marked, the search operation
distinguishes between upper-case and lower-case text.
Make Backup File. If this checkbox is marked, the installation makes a
copy of the Config.sys file before editing it. The backup is retained after
installation so that the end user can easily restore the original
configuration.
Devices
The Devices page lets you define device drivers to be installed under
Windows 3.1x and Windows 95/98. The specified devices are added to the
[386Enh] section of the System.ini file. The driver usually has one of the
following file extensions: .386, .drv, .vxd, or .sys. The driver file must
already be a part of the installation, that is, added to the Files page.
69
3: INSTALLATION EXPERT PAGES
Dialogs
Use the Dialogs page to choose which dialogs appear during installation.
The dialogs you choose determine the level of control the end user has
over the installation. Mark the checkboxes of the dialogs you want to
appear in the installation.
The Dialogs page lists the main dialogs that make up the wizard end users
navigate through during installation. The wizard dialogs include:
Welcome. Welcomes the end user to your installation, suggests exiting
other running applications, and warns of the software copyright.
ReadMe. Displays the ReadMe file for your application. When you select
this dialog, the Pathname field is enabled at the bottom of the Dialogs
page. To specify text to appear in this dialog, click Browse and select a
.TXT file. The text is copied from the file to this installation.
Branding/Registration. Prompts for the end user’s name, company
name, and, optionally, a serial number.
Destination Directory. Lets the end user choose a destination
directory for the installation. The directory the end user chooses is
stored in the variable %MAINDIR%.
Backup Replaced Files. Lets the end user choose whether to back up
files that are replaced during the installation and if so, where to store
the backups.
Select Components. Lets the end user choose which optional
components to install.
Select Icon Group Name. Lets the end user choose the group name
for icons installed in the Program Manager or Start menu.
Start Installation. Gives the end user a final chance to cancel the
installation before installation begins.
Finished. The post-installation dialog that informs the end user that the
software was successfully installed.
70
Editing Dialogs
To edit a dialog, double-click the dialog name on the Dialogs page. This
displays the dialog in the Custom Dialog Editor. The changes you make
affect only the dialogs in this installation. For detailed information about
using the Custom Dialog Editor, see Creating Custom Dialogs on page 293.
Digital Signature
Use this page to add an Authenticode digital signature to your installation
so its integrity and authenticity can be verified. You must have a valid
VeriSign commercial certificate to use this feature. For this to work, the
sign code executable, the private key file, and the credentials file must be
in the Windows directory. Also, you must enter the Descriptive Name,
Credentials File, and Private Key File fields on the Digital Signature
page. The digital signature protocol of Internet Explorer 4.0 is used.
For more information about digital signatures, visit the VeriSign Web site at
www.verisign.com and search for authenticode.
To add a digital signature to your installation, mark one of the following
options:
Add a digital signature externally. Mark this option to leave space in
the installation for a digital signature without actually adding it to the
installation. This is useful if the installation must be digitally signed
under a higher security environment by a different individual. Extra
space is reserved to allow for the digital signature information. If an
installation does not have extra space (approximately 5K), and a digital
signature is added to it, errors occur when CRC checks are performed
because of the resulting size increase. This option eliminates those
errors.
Add a digital signature. Mark this option to add a digital signature to
the installation. You must have access to your company’s credential file,
private key file, and other information that needs to be embedded in the
installation.
71
3: INSTALLATION EXPERT PAGES
When you mark one of the digital signature options, the following fields
become available.
Web URL. Enter your company’s Internet Web address, for example:
http://www.companyname.com.
Descriptive Name. Enter the name of your application. This name is
embedded in your Authenticode certificate and lets end users verify the
name of the software they are installing.
TimeStamp URL. Select or enter the URL you use for your
timestamping service. Timestamping lets end users distinguish between
a certificate that’s expired but was valid when it was used to sign the
installation, and a certificate that was used to sign an installation while
it was expired. The timestamping service must be available to build the
installation but does not need to be available to the end user running
the installation.
Credentials File, Private Key File. Select your VeriSign credentials
file and private key file. You obtain these files from VeriSign. They must
be located in the Windows directory.
File Associations
Use this page to associate a file extension with an application that can
open a file with that extension. For example, if your application generates
documents with a unique file extension, you can associate that file
extension with your application. Then, when an end user double-clicks that
document file, the operating system launches the associated program and
opens the file.
72
2. In the left list box, select the directory containing the program file you
want to associate with this file type. The names of all .EXE files in that
directory are displayed in the right list box.
3. In the right list box, select the program file you want to associate with
this file type.
If you choose an .EXE file that is part of an optional installation
component, the association is created only if the end user chooses to
install that component.
4. At the bottom of this dialog, enter the three-letter document extension
of the file type you want to associate.
5. Click OK. The new file association appears on the Document Types
page.
Association Details
Click the Details button on the File Associations page to display the
Association Details dialog, where you can edit an existing file association.
See File Associations on page 72.
73
3: INSTALLATION EXPERT PAGES
Print Options. This field holds the command line options that can be
passed to the application to cause it to print the file instead of just
opening it. If this field is not blank, a Print menu option is added to the
right-click menu for files of that document type.
Source Pathname. This is the path to the .EXE program associated
with the specified document extension. You cannot edit this field.
Files
Use this page to specify the files and directories that are installed on the
destination computer. When you add files here, Installation Expert does not
actually copy or store the files; it simply records the location of the files on
your local system or network. The files are not copied until you actually
compile and build the installation. Therefore, if you change a file’s name or
location, you must update its path on this page, otherwise you get error
messages when you compile.
When you add a program file to the Files page, Installation Expert searches
the registry for related information, such as file associations and icons, that
can be added to the installation. This information is added to the
installation automatically and entered on the corresponding Installation
Expert pages.
Note:
If you inadvertently add multiple instances of the same file (with the same
path), only one copy is compiled into the installation .EXE. Use the Duplicate Files
Report, available from the Edit menu in Script Editor, to find duplicate files.
74
directories are already created for you, though you can add a new
one if needed.
• To create a new destination directory, click the New Folder button
and enter a name in the dialog. The new directory is created as a
subdirectory of the selected directory.
• If you assign files to a directory under an optional feature, then
those files are installed on the destination computer only if the
component is installed.
3. In the upper left list box, which represents the directories on your
computer, click the directory containing the file or files you want to add.
All the files in the selected folder are listed in the upper right list box.
4. From the upper right list box, select the files you want to add and
assign them to the destination directory as follows:
• To assign a single file to the destination directory, select the file and
click the Add File button, or simply double-click the file.
• To select multiple files, use the CTRL or SHIFT keys while clicking on
each file.
• To add the contents of an entire directory or only files of a particular
type, click the Add Contents button. Complete the fields in the Add
Wildcards dialog and click OK. For information on completing the Add
Wildcards dialog, see Adding Contents of Directories to the
Installation on page 76.
5. Repeat the preceding steps until you have assigned all of the program
files to the proper destination directory.
You can use the Files page to accomplish these additional tasks:
You can drag files from Windows Explorer and drop them in a folder
under the Destination Computer icon. When you drop the file, the Drag
and Drop Settings dialog opens so you can set file properties (this is the
same as the Install File Settings dialog.) To confirm that you want the
file at this location, click OK.
To review your file assignments, click a destination folder in the lower
left list box. All the files assigned to that location are listed in the lower
right list box.
To set advanced installation options for a particular file, select that file
from the lower right list box and click the Details button. This opens the
Install File Settings dialog. See Specifying Installation File Settings on
page 77 for more information.
To remove one or more files from the destination computer, select the
appropriate directory in the lower left list box, select the file(s) in the
lower right list box, and click the Delete File button (or press the DELETE
key).
75
3: INSTALLATION EXPERT PAGES
76
semicolons. If you leave the wildcard fields blank, all files in the
directory are added.
• Include Subdirectories. Mark this checkbox to also add all the
subdirectories within the directory you’re adding. The wildcards
apply to the subdirectories also. If this checkbox is not marked, only
the files contained in the directory are added.
• Add as a wildcard instead of adding the files. Mark this
checkbox to have the lower right list box display your wildcard
settings (as specified in the Include Wildcard field or *.* if no
wildcards are specified) instead of the actual file names. This lets
you add other files to the source directory later. When the
installation is compiled, all files matching the wildcard filter are
copied to the destination computer. When you use this feature,
however, the program does not automatically create icons and file
associations for you.
5. Click OK in the Add Wildcards dialog.
The contents of the directory in the upper left list box are added to the
directory you selected in the lower left list box. If you entered a
directory name in the Dest. Directory field, then the contents are
added in to that directory. If you specified wildcards, only those files
that match the wildcard criteria are added.
77
3: INSTALLATION EXPERT PAGES
78
installation configuration that does not include any password protected
files, the password prompt does not appear.
Include Sub-Directories. Mark this checkbox to have the installation
include files in subdirectories of the directory in the Source Pathname
field.
Shared DLL Counter. Mark this checkbox to have the file entered in
the registry if it’s a .DLL, .OCX, or .VBX. That way, Windows can keep
track of how many installed applications are using the file and can
prevent it from being removed until it is no longer needed.
No Progress Bar. If you do not want the progress bar to display during
installation, mark this checkbox for every file that is being installed. If
you mark it for some files, but not others, the progress bar appears to
continue to display because the screen does not refresh between files.
This option is useful when you install a few small files that only require a
second or two and you don’t want to clutter the screen with the progress
bar.
Self-Register OCX/DLL/EXE/TLB. All .OCXs and .TLBs as well as
some .DLLs and .EXEs support self-registration. Mark this checkbox to
have the .OCX, .DLL, .EXE, or .TLB register itself in the Windows
registry at the end of installation.
Do Not Download With WebDeploy. This checkbox is available when
you click the Create Internet-based installation option on the
WebDeploy page. In an Internet-based installation, files are stored as
separate files in the same directory as the installation .EXE on the web
server and are downloaded only as they are needed.
To place the file into the installation .EXE rather than storing it as a
separate file, click the Do Not Download With WebDeploy checkbox.
Repair application if this file is missing. Self-repair prevents your
application from failing if this file has accidentally been deleted. Mark
this checkbox to initiate self-repair if this file is missing during
application launch. The end user must have access to the installation
media to perform a repair, and you must also configure a shortcut to
your application with self-repair turned on. To use this feature, you must
configure your installation for self-repair. See Automatic Self-Repair on
page 35 for a description of how to set up self-repair.
79
3: INSTALLATION EXPERT PAGES
• Never. The file is never installed if it already exists. Use this for
files, such as configuration files, which should be installed if they are
not present, but which might be customized by the end user and
should therefore not be replaced on re-installation.
• Check File. The File Version and File Date/Time drop-down lists
become available. The existing file is replaced only if the
requirements set in both fields are true.
Doesn’t Matter. Select this option for a field if you only need
one of the two requirements, File Version or File Date/Time,
to be fulfilled for the existing file to be replaced.
Same or Older. (File Version) Replace the existing file if it has
a version resource, and if it is the same as or older than the new
file. If the existing file does not have a version resource, the new
file is not installed.
(File Date/Time) Replace the existing file if its modification
date and time are the same as or older than the new file.
Older. (File Version) Replace the existing file if it has a version
resource, and if it is older than the new file. If the existing file
does not have a version resource, the new file is not installed.
(File Date/Time) Replace the existing file if its modification
date and time are older than the new file.
Retain Duplicates in Path. Normally, version-checking removes one
copy of a .DLL found in the path directory list, to ensure that the path
only contains a single version of the .DLL. You can suppress this feature
by marking this checkbox.
The SmartPatch feature creates a patch file that contains only the
differences between the older version of the file an end user might have,
and the current version. The resulting installation is normally much smaller
than a full installation file. However, the end user must already have your
software installed to perform the installation.
Existing File Pathname. Enter a pathname where Installation Expert
can expect to find one of the files listed in the Previous File Versions list.
Previous File Versions. This lists files (on your hard disk) that are
older versions of the file(s) being installed. Browse to an older version of
the file on your hard drive and add it to the list.
Note:
Rather than specifying SmartPatch information for each file, you can use the
separate SmartPatch page in Installation Expert to specify whole directories that
contain older versions of your files. See SmartPatch on page 108.
80
Fonts
Use this page to add fonts to your installation. You only need to add fonts
when they are required by the application being installed. Any fonts added
with the Files page are listed here automatically.
General Information
Use the General Information page to specify information about the
installation file. The information on this page sets the version resource of
the compiled setup file (.EXE). Your customer sees this information by
right-clicking on the setup file and selecting Properties from the right-click
menu.
If you plan to use an automated build system and want to set these values
at compile time, you can create compiler variables to set these values, and
enter the compiler variable name, surrounded by percent signs, in these
fields. For example, if you create a compiler variable named
_INST_VERSION_ to set the version, enter %_INST_VERSION_% in the
Installation Version field. See Compiler Variables on page 64.
Enter information about your application in the following fields:
Installation Version. The version number of the installation.
81
3: INSTALLATION EXPERT PAGES
INI Files
The INI Files page lets you create a new .INI file to store your program’s
settings, or you can update the contents of an existing .INI files during the
installation.
3. In the File drop-down list, choose a default path where the .INI file is
stored.
Overwrite the default NONAME.INI with the name you want to give the
new .INI file.
4. In the INI File Contents field, enter the information that appears in
the .INI file.
• You must enter at least one section heading and one command line
for the file to be created.
• You can copy and paste the .INI contents from an existing file into
this field.
5. Click OK to save the new .INI file.
82
To remove an .INI file:
Select an .INI file from the list on the right of the INI Files page and click
the Delete button.
File. Displays the pathname to the .INI file. Installation Expert uses a
placeholder variable, such as %MAINDIR%, to refer to the directory,
rather than a hardcoded path, because the path might be different on
the destination computer. You cannot edit this field; you must create a
new .INI file item.
INI File Contents. Enter the modifications to be made to the .INI file.
The lines in this field are interpreted as follows:
• Lines with text enclosed in square brackets, such as [Section],
instruct the installation to put the lines that follow in the indicated
section of the .INI file.
83
3: INSTALLATION EXPERT PAGES
• If you include a section name with no entries after it, that section
and all its entries are deleted.
• Lines that start with a parameter name followed by an equals sign
(=) and a value are added to the .INI file. For example,
ProgPath=%MAINDIR%. If the .INI file already contains an entry for
the specified parameter, the existing entry is replaced.
• If you include a parameter name with no value, for example,
Progpath=, that entry is deleted if it exists.
• You can enter variables in the INI File Contents field to insert the
values of script variables into the .INI file. See Variables and
Expressions on page 167.
Installation Log
The installation log is a text file containing a list of events that occur while
the installation runs, for example, it contains the list of files that are
replaced. Entries are also added to the log when files are being deleted or
backed up; however, the uninstaller does not take such entries into
account during rollbacks.
84
Use the Installation Log page to specify the location of the installation log
and its file name, if one is created. As an alternative, set the compiler
variable _LOGFILE_PATH_ to the path where you want the log file.
On the Installation Log page, select one of the following options to
determine whether an installation log is created and, if one is created,
where it is stored.
Do not create installation log. Mark this option if you do not want an
installation log to be created. Keep in mind that if you do this, the end
user will get an error upon attempting to uninstall.
Create installation log in same directory as first installed file. By
default, this saves the installation log onto the root, because the first
Install File(s) action is in the uninstal.wse include script, which appears
before any of your Install File(s) lines. This option is included for
backwards compatibility with WiseScripts from previous versions of the
Wise Installation System. If you want to create the log where your first
installed file is, use the Create installation log in custom directory
option.
Create installation log in custom directory. Mark this option to save
the installation log in a directory you specify. When you mark this
option, the directory browser and the Install Log File Name field
become available:
• Use the directory browser to specify the directory where you want to
save the installation log. You can use the New Folder button to
create a new directory for the log within the Application or Windows
directory.
• Install Log Filename. Enter a file name for the installation log. A
common name is Install.log.
Languages
Use this page to define the languages supported by the installation, along
with the default language and the font used by the Japanese version of the
installation. Unless you’ve added languages, you can select U.S. English
(the default), French, German, Italian, and Spanish.
In the Settings area of the Languages page, complete the following fields
and options.
Default Language. Select the default language for the installation.
85
3: INSTALLATION EXPERT PAGES
Note:
If you are working with a double-byte language, such as most Asian
languages, do not include any other languages in the installation. In other
words, don’t click any other checkboxes on the Languages page besides the
double-byte language. Including double-byte with single-byte languages in the
same installation can cause distortion of the fonts for the single-byte
languages. If you need both single and double-byte installations, make a copy
of the installation and include the double-byte languages in the copy.
Copy Default. Mark this checkbox to copy messages from the default
language to all others to provide a starting point for translating the
message.
For example, suppose your installation supports two languages and you
add a Display Message action to your script while English is selected in
Script Editor’s Language drop-down list. If Copy Default is marked
and you select French from the Language drop-down list, the text you
entered in the English Display Message is copied to the French version
of the Display Message action.
Always Prompt. Mark this checkbox to have the installation always
prompt the end user to select a language, unless there is only one
language in the installation.
To delete a language:
Select a language from the list on the Languages page and click the Delete
button. This removes the selected language from the installation, however,
it does not delete the language translation that you entered in the Installer
Messages dialog.
86
Media
Use the Media page to configure your installation for the type of media on
which it will be stored and distributed. The process is simple; just mark the
appropriate option for the way you want to distribute the installation.
Single File Installation. Mark this option to pack all the files into a
single installation file. This is convenient if you plan to distribute your
installation over a LAN, or as a single downloadable file over the
Internet. (In the latter case, consider using WebDeploy technology to
reduce the bandwidth required for the download.)
Media-Based Installation. Mark this option to break the installation
into files that fit on a specific type of removable media. When you mark
this option, the following fields become available:
• Media Type. Select the type of media you want to use: 5 1/4" high-
density floppy; 3 1/2" double-density floppy; 3 1/2" high-density
floppy; Zip disk (100MB); 3 1/2" Super LS-120 diskette; CD-ROM
(650MB); DVD-ROM (4.7GB); or a custom disk size.
• Custom Size. If you selected a custom disk size in the Media Type
field, enter the formatted capacity of the media you are using in the
Custom Size field.
Microsoft SMS
Note:
You can use the Exit Installation script action to write text and a success/
failure flag to your Status MIF file. See Exit Installation on page 235.
87
3: INSTALLATION EXPERT PAGES
Uninstall MIF Filename. The file name for the MIF uninstaller file. For
example: unmyapp.mif.
Manufacturer. The name of the company that developed this
application.
Product. The name of this application.
ODBC
Use the ODBC page to add ODBC data sources required by your application
on the destination computer. To add ODBC driver support, select MDAC on
the Runtimes page.
88
Data Source Name. Enter the name of the ODBC data source. This
name is displayed in the ODBC data sources list on the destination
computer. Click the Import button to get this information from an
existing ODBC data source.
Driver Name. Enter the name of the ODBC driver used by this data
source. The driver, along with its support files, must already exist on the
destination system.
Install Data Source for. Choose whether the ODBC data source is
installed for use with Win16 or Win32 APIs.
Data Source Attributes. Enter the data source attributes here.
Installation Expert provides a set of default data source attributes that
you can modify if necessary.
Display Configuration Dialogs. If this checkbox is marked, the
installation displays configuration dialogs that allow end users to
configure the source for use on their computer system. Otherwise, the
data source is installed silently, without end user intervention, using
default settings.
System DSN. Mark this checkbox to make the data source available to
all end user accounts on the destination computer.
Online Registration
89
3: INSTALLATION EXPERT PAGES
Use this page to configure the online registration feature. This allows the
end user to register the program after the installation has been completed
successfully. Product registration is supported through a CGI program or
Active Server Page that accepts the data via the HTTP POST operation.
No Online Registration. Mark this option if you do not support online
registration.
Online Registration. Mark this option if you support online
registration. The following fields become available:
• Post to URL. Enter the URL of the CGI program or Active Server
Page that accepts the data via the HTTP POST operation.
Registration is passed to the Web server in the named fields NAME,
COMPANY, ADDRESS1, ADDRESS2, ADDRESS3, EMAIL,
WEBADDRESS, PURCHASEDATE, SERIALNO, PHONE, PRODINFO,
CITY, STATE, and ZIP.
• Use the directory browser to specify the location of the file that will
contain the registration data on the destination computer. You can
use the New Folder button to create a new directory within the
Application or Windows directory.
• Registration INI File Name. Enter a name for the file that will
contain the registration data. Future installations use this file to pre-
enter the user’s registration details, such as name and company. The
end user can still change the fields before registering.
Password
Use this page to specify a required password or serial number for your
installation. End users must enter the correct password or serial number in
order for the installation to begin.
You can turn password protection on and off on a per-file basis by selecting
a file on the Files page and clicking the Details button. You must set the
password first in order for this option to be enabled. See the Require
Password checkbox description in Specifying Installation File Settings on
page 77.
Select one of the following options for protecting your installation.
Single password used for all installations. Mark this option to
require a single password for any copy of the installation. In the field to
the right of this option, enter the password.
Individual serial numbers used as password. Mark this option to
have the installation work with a range of serial numbers. Note that
multiple serialized copies of the installation are not produced; instead, a
single installation that accepts any of the generated serial numbers is
produced.
90
When you select this option, the following fields become available:
• Serial Number Type. Choose whether to create incremental serial
numbers (in sequence) or randomly generated serial numbers.
• Starting Serial Number and Ending Serial Number. Define the
range of serial numbers by entering a starting and ending number.
• Approx. Serial Numbers. Enter the approximate quantity of serial
numbers.
• Output File. Specify a text file name, then click the Export button.
This writes the serial numbers to the specified file. You can use this
file to print labels to serialize your application.
For maximum protection, use a random serial number scheme and a serial
number range that exceeds the number of copies you will produce by a
factor of 100 or more. For example, if you generate 1,000 random serial
numbers between 1,000,000 and 9,999,999, unauthorized users have only
a 1-in-9,000 chance of correctly guessing a serial number.
Product Details
Use the Product Details page to specify the title (usually the name of the
application) that appears on the background screen and on wizard dialogs
during the installation, and the default directory for the installation.
Enter the following information on the Product Details page.
Installation Title. Enter the name of the application. You do not need
to include the word “installation.”
Default Directory. Enter the name of the directory in which your
application is installed by default. The end user can override this default.
Place Default Directory Under Program Files. Mark this checkbox to
place the default directory in the Program Files directory instead of in
the hard disk’s root directory. The end user can change the location.
Progress Bar
Use this page to set options for the progress bar that displays while the
installation is running. The default progress bar uses a .DLL written by
Wise Solutions, which is located in Program Files\Wise Installation
System\Progress. You can access the source code for this .DLL at Wise
Installation System\Progress\Source. If you want, you can specify an
external .DLL to be used for displaying the progress bar.
Progress Dialog Placement. Select a screen position for the progress
bar.
91
3: INSTALLATION EXPERT PAGES
Note:
If the bitmap file you select for your custom splash screen doesn’t appear
correctly, you probably haven’t selected a valid .BMP file. Non-valid bitmap files
do not appear, and no error message is displayed to inform you of the problem.
Registry
Use the Registry page to specify the registry entries to be installed or
edited on the destination computer. You can either add registry entries
manually or import a registry (.REG) file. If you import a Visual Basic .VBR
file, it imports the registry settings, but does not automatically set up for
installation of either a remote automation or DCOM™ server.
92
The upper two list boxes show keys and values in your computer’s registry.
The lower two list boxes represent the keys and values to be installed on
the destination computer. The left two list boxes show key structure, and
the right two list boxes show values.
Use the Add Keys button to copy a registry key, including all its subkeys
and values, from your computer to the installation.
Use the Add Values button to copy values from your computer to the
installation.
Use the New button to either create a new key or to import a registry
file into the installation. The presence of a key in this list does not
necessarily mean that the key is added to the registry on the destination
computer; it merely indicates that the installation operates on the key in
some way. The operation might be to add a new key or named value, to
modify an existing named value, or to delete a value.
Use the Delete Key or Delete Value button to remove items from the
current installation.
Deleting the key or value from the current installation simply means
that your installation does not modify that key or value; it does not
actually delete the key or value on the destination computer.
Use the Details button to edit registry key settings. See Registry Key
Settings Dialog on page 93.
Click between the left and right list boxes to resize them horizontally.
93
3: INSTALLATION EXPERT PAGES
Data Value. The data for the value. If the Data Type (below) is Double
word (DWORD), the data should be in decimal notation. To insert
multiple lines of data here, hold down the CTRL key and press the ENTER
key to begin a new line.
94
Data Type. The type of data contained in the named value. Available
types are listed below. The associated Windows API data types are in
parentheses.
• String. (REG_SZ prefix) A piece of alphanumeric text. Indicates that
a value entry is an expandable string. If you want to embed a
variable name, (such as %WIN%), you must enclose it with double
percents (%%WIN%%). If you only enclose it in single percents,
then the variable name is expanded to its actual value. This allows
Windows NT4/2000/XP system variables to be embedded.
• Unexpanded string. (REG_EXPAND_SZ prefix) Identifies a value
entry as an unexpanded data string. If you want to embed a variable
name, (such as %WIN%), you must enclose it with double percents
(%%WIN%%). If you only enclose it in single percents, then the
variable name is expanded to its actual value. This allows Windows
NT4/2000/XP system variables to be embedded.
• Multiple strings. Multiple pieces of text, separated by carriage
returns. Valid under Windows NT, 2000, or XP. (REG_MULTI_SZ)
• Double word. A 32-bit value in decimal notation. (REG_DWORD)
• Binary/Hex. A series of bytes in hexadecimal notation. Each byte
should be separated by at least one space. For instance, AD 30 C0
A9 40 20 A8 FC 4C 00 08. (REG_BINARY)
• None. This is provided for compatibility with SMS Installer
installations; it behaves the same as the binary data type.
Repair application if this registry value is missing. Self-repair
prevents your application from failing if this registry value has been
accidentally deleted. Mark this checkbox to initiate self-repair if this
registry value is missing during application launch. The end user must
have access to the installation media to perform a repair, and you must
also configure a shortcut to your application with self-repair turned on.
To use this feature, you must configure your installation for self-repair.
See Automatic Self-Repair on page 35 for a description of how to set up
self-repair.
Append Data. Normally, if you set a registry key to a new value, and
the key already exists, the value is replaced with the new value you set.
If you want to append the new data to an existing multiple strings value
instead of replacing it, mark this checkbox. This option is disabled
unless you have Multiple Strings selected in the Data Type drop-
down list.
95
3: INSTALLATION EXPERT PAGES
96
To edit a registry value:
1. Double-click the value in the lower right list box.
The Registry Key Settings dialog appears.
2. Configure the Registry Key Settings dialog and click OK. See Registry
Key Settings Dialog on page 93 for details.
Runtimes
Warning:
You can damage destination computers by installing the wrong version of
runtime support files. Installing runtime files incorrectly can cause the end user's
applications to stop running properly and can even disable the operating system.
Before deploying any installations that install runtimes, get the latest runtime
updates by running the Download Runtimes wizard from the Wise Installation
System Help menu.
Use the Runtimes page to define MDAC, database, Visual Basic and Visual
FoxPro, Windows, and Crystal Reports runtimes to be used by the software
included in this installation file. Runtimes are sometimes pre-selected for
you after running the Import Visual Basic Project tool or ApplicationWatch.
Note:
To add ODBC data sources, use the ODBC page. See ODBC on page 88.
97
3: INSTALLATION EXPERT PAGES
Warning:
You can damage destination computers by installing the wrong version of
runtime support files. Installing runtime files incorrectly can cause the end user's
applications to stop running properly and can even disable the operating system.
Before deploying any installations that install runtimes, get the latest runtime
updates by running the Download Runtimes wizard from the Wise Installation
System Help menu.
The MDAC section of the Runtimes page lists the different versions of
Microsoft Data Access Components (MDAC) that are available to distribute
with your application. For more database runtime options, see Database
Runtime.
The Description area toward the bottom of the Runtimes page provides
information on the currently-selected component.
Note:
The details dialog, and therefore the Details button, is not available for
Microsoft Access Data Components.
Database Runtime
Warning:
You can damage destination computers by installing the wrong version of
runtime support files. Installing runtime files incorrectly can cause the end user's
applications to stop running properly and can even disable the operating system.
Before deploying any installations that install runtimes, get the latest runtime
updates by running the Download Runtimes wizard from the Wise Installation
System Help menu.
98
The Description area toward the bottom of the Runtimes page provides
information on the currently-selected runtime.
Note:
The details dialog, and therefore the Details button, is not available for all
Database runtimes.
Warning:
You can damage destination computers by installing the wrong version of
runtime support files. Installing runtime files incorrectly can cause the end user's
applications to stop running properly and can even disable the operating system.
Before deploying any installations that install runtimes, get the latest runtime
updates by running the Download Runtimes wizard from the Wise Installation
System Help menu.
Use the Visual Studio Support section of the Runtimes page to include
Visual Basic, Visual FoxPro, and Visual C++ runtimes in your installation. If
the application you’re deploying was developed using one of these
development languages, you might need to have the appropriate runtime
pre-installed to ensure a complete and error-free installation.
Mark the checkboxes for the runtimes you want to include in your
installation, then use the dialogs that appear to specify the location of the
Visual Basic or Visual FoxPro directory on your computer as well as runtime
version, desired options, and server types.
The dialogs that appear when you mark one of the Visual Basic checkboxes
let you do the following:
Choose the appropriate runtime support for your application
99
3: INSTALLATION EXPERT PAGES
Choose the Visual FoxPro options you want to have installed with your
application
The Description area toward the bottom of the Runtimes page provides
information on the currently-selected runtime.
Note:
The details dialog, and therefore the Details button, is not available for all
Visual Studio Support runtimes.
Windows Runtime
Warning:
You can damage destination computers by installing the wrong version of
runtime support files. Installing runtime files incorrectly can cause the end user's
applications to stop running properly and can even disable the operating system.
Before deploying any installations that install runtimes, get the latest runtime
updates by running the Download Runtimes wizard from the Wise Installation
System Help menu.
Use the Windows Runtime section of the Runtimes page to include common
Windows runtime components for installing Windows 95/98/Me and
Windows NT/2000/XP applications in your installation.
Add these optional runtimes when the runtime is critical to the application
you are deploying, and when you expect that your end users do not have
the runtime installed.
100
The Description area toward the bottom of the Runtimes page provides
information on the currently-selected runtime.
Warning:
You can damage destination computers by installing the wrong version of
runtime support files. Installing runtime files incorrectly can cause the end user's
applications to stop running properly and can even disable the operating system.
Before deploying any installations that install runtimes, get the latest runtime
updates by running the Download Runtimes wizard from the Wise Installation
System Help menu.
Use the Crystal Reports Runtime section of the Runtimes page to include
Crystal Reports™ runtimes in your application. For more information about
Crystal Decisions’ Crystal Reports, visit their Web site at
www.crystaldecisions.com.
Crystal Reports is a software application by Crystal Decisions (formerly
Seagate Software) that generates reports from a database. It is an
authoring environment in which you create a report template (.RPT file)
that defines the layout of the database report, including column headers,
sorting, font usage, and database support. The runtime component uses
the .RPT file and the database file to generate a report that you can view,
print, and generate in a variety of export formats.
Note:
To include Crystal Reports runtimes in your application, you must have
Crystal Reports installed on your local system.
101
3: INSTALLATION EXPERT PAGES
Note:
The details dialog, and therefore the Details button, is not available for all
Crystal Reports runtimes.
The Description area toward the bottom of the Runtimes page provides
information on the currently-selected runtime.
Screen
Use this page to set the background color or gradient and font for the
installation. The Screen Preview area shows how your installation screen
looks based on the current selections.
To display an image anywhere on the background screen, use the Custom
Billboard Editor. See Creating Custom Billboards on page 337.
In the drop-down list in the Background Gradient area, select whether
to display a full-screen gradient, a three-quarters screen gradient, or no
gradient behind the installation dialogs.
Title Bar. Mark this checkbox to cause the installation’s title to be
displayed at the top of the screen in a title bar.
Hide Program Manager. Mark this checkbox to hide the Program
Manager during installation (Windows 3.x only).
No Background Gradient. Mark this checkbox to display no gradient
behind the installation dialogs.
Top Color and Bottom Color. Click the Top Color and Bottom Color
buttons to use standard Windows color selectors to choose the top and
bottom colors for the background gradient. The installation
automatically generates a smooth transition between the two colors.
Screen Preview. Displays a real-time mock-up of how the installation
screen will look.
Bold/Light Fonts. Select the option to always display bold or light
fonts, or to use light fonts under Windows 95/98/NT and bold fonts
under Windows 3.1x.
Message Box Font. Select the font to be used. If you do not specify a
font, a standard sans serif font is used. For a Japanese installation,
specify MS Gothic.
Point Size. Select the point size for text displayed in the installation
dialogs. If you do not specify a point size, the standard Windows text
size is used.
Character Set. Enter the number of the character set to be used. Use
zero, which is the default, unless your installation is in Japanese. For a
102
Japanese installation, enter 128 and make sure you have specified MS
Gothic in the Message Box Font field.
Services
The Services page lets you define applications to be installed as a service
under Windows NT/2000/XP. The .EXE file you define as a service must
already be a part of the installation. Consult your Microsoft developer
documentation for information on creating services. This page only helps
you install services, not develop them.
On the Services page, you can add a service to your installation by using
the Add button. Before you can add the service on the Services page, you
must use the Files page to add the file that runs the service. When you add
the service, you also set parameters that determine how it runs. Follow the
procedure below to install a file as a service on the destination computer.
4. Select a file from the right list box and click OK. The service appears in
the list on the Services page.
If you choose an .EXE file that is part of an optional installation
component, the service is installed only if the end user selects the
appropriate component for installation.
103
3: INSTALLATION EXPERT PAGES
To edit services:
To remove an existing service, select it from the list and click the Delete
button.
To change the .EXE file for a service, select it from the list and click the
Details button to open the Create Service Settings dialog. See Create
Service Settings on page 104 for more information.
Service Name. Enter the name of the service. This name is used
internally by the service to register itself properly in the registry, so the
value you enter here must match the internal name of the service that’s
stored within the .EXE file.
Display Name. The name that appears in the Services control panel.
Executable Path. The complete path to the executable file that is the
service. Specify a pathname or use variable substitution to build a
pathname. You do not have to enclose the path with quotation marks,
even if a long file name contains spaces.
Login Username. Enter the Windows user name under which the
service should run.
104
Login Password. Enter the Windows password for the user name
defined above.
Error Control. Select an option from this drop-down list to determine
what happens if an error is reported while starting up the service.
• Ignore Error. Logs the error in an error log and continues.
• Normal Error. Displays a message to the end user, logs the error in
an error log, and continues.
• Severe Error. Logs the error. If the last known good configuration is
being started, the startup continues. Otherwise, it reboots the
system with the last known good configuration.
• Critical Error. Logs the error if possible. If the last known good
configuration is being started, the startup fails. Otherwise, it reboots
the system and sets it to the last known good configuration.
Group. Enter the name of the load ordering group of which this service
is a member. Leave this field empty if the service does not belong to a
group.
Dependencies. Enter a list of semicolon-separated names of services
or load ordering groups that must start before this service. Leave this
field empty if the service has no dependencies. If a service is dependent
on a group, it means that at least one member of the group must be
started for this service to run.
Enter a plus sign (+) before group names to distinguish them from
service names. Services and service groups share the same name
space. For example, if you enter this string, "ftpsvr;https;drc;+widget",
you create dependencies on the ftpsvr and https services and the widget
group.
In the Service Type area of the dialog, select an option to determine
whether to start the service in its own process, as a shared process, as
a kernel driver, or as a file system driver.
In the Start Service area of the dialog, select an option to determine
when the service should be started: at boot time, when the system
loads, automatically after startup, or manually. You can also set Startup
to be disabled. These options correspond to options in the Services
control panel.
Service Interacts With Desktop. Mark this checkbox to let the
service display its user interface, if any.
Shortcuts
Use this page to add shortcuts to Windows’ Program Manager or to the
Start menu and desktop of the destination computer.
105
3: INSTALLATION EXPERT PAGES
If you added program files on the Files page, Installation Expert might
have added the default application shortcuts for you. The Shortcuts page
shows the Name, Location, and Source Path of the shortcuts that have
been added so far.
106
To edit an existing shortcut:
Select a shortcut from the list on the Shortcuts page and click the Details
button. This opens the Shortcut Details dialog. See Shortcut Details for
more information.
Shortcut Details
Click the Details button on the Shortcuts page to display the Shortcut
Details dialog, where you can edit the information about a shortcut being
added to a Program Manager or Start menu group. To customize a shortcut
further, or to place it in a subfolder in the Start menu, go to Script Editor
and double-click the Create Shortcut line within the If System Has
Windows 95 Shell Interface statement.
Command Line Options. Enter the command line options that are
used to open the file associated with the new shortcut .
Icon Pathname. To use a custom icon, enter the path to the icon file,
.EXE, or .DLL that contains the icon you want.
Icon Number. Enter the resource number of the shortcut (in the
shortcut file, .EXE, or .DLL specified above) to be displayed in the
Program Manager or Start menu.
107
3: INSTALLATION EXPERT PAGES
Technical Note:
An executable or shortcut file can contain multiple icons. To see the icons
in a file, go to Windows Explorer, right-click any shortcut file, and select
Properties. Click the Shortcut tab, then click the Change Icon button. The
Change Icon dialog appears. It contains a graphical list of icons for the shortcut
file you right-clicked. The icon number of the first icon is 0, the icon number for
the second is 1, and so on. To see the icons in a different file, click Browse and
choose a different file.
Default Directory. Enter the default directory that should be set when
launching the application, if it is not the directory that contains the
application. Use %MAINDIR% to substitute for the directory where the
application is being installed, rather than hard-coding a pathname. If
you view the Properties dialog for this shortcut in Windows Explorer, the
field is referred to as the “Start in” directory.
Shortcut Pathname. Displays the pathname of the file that is opened
by the shortcut.
Shortcut Location. Choose where to place the shortcut: in the
application’s group in the Programs submenu, in the StartUp group or
submenu, on the desktop, at the top of the Start menu, or directly on
the Programs menu.
Enable Access For All Windows NT Users. Mark this checkbox to add
the shortcut to the common Program Manager group under Windows
NT/2000/XP, so all end users can have access to it. This only works if
the user logged in during installation has administrator privileges.
Check self-repair items when this shortcut is opened. This
checkbox turns on self-repair functionality for this shortcut. Typically,
you turn this checkbox on for a shortcut that launches your application.
To use this feature, you must configure your installation for self-repair.
See Automatic Self-Repair on page 35 for a description of how to set up
self-repair.
SmartPatch
Use this page to turn your installation into an upgrade (patch), instead of a
full version installation. When you distribute installations of this type, the
destination computer must contain a previous version of your application in
order for the installation to be successful.
108
To create a smart patch, make sure your computer contains a copy of the
old software that is being upgraded. After you specify the path to the old
software, the SmartPatch feature compares the older versions of the
application to the version being installed and generates a patch installation
that contains only the differences between the two versions. This can result
in a significantly smaller installation file.
If you specify multiple previous versions, they’re upgraded no matter what
version is on the destination computer.
Do Not Create SmartPatch Updates. Mark this option if you wish to
create a full installation and not use the SmartPatch feature. (You can
also leave this feature off while testing your installation, to produce
faster compiles.)
Create SmartPatch Updates. Mark this option to enable SmartPatch.
109
3: INSTALLATION EXPERT PAGES
System Requirements
Use the System Requirements page to specify minimum hardware and
software requirements for the installation and to set warning messages
that display to the end user if the destination computer does not meet
specified requirements. On this page, you can set requirements for the
Windows and Windows NT versions, the screen resolution, the screen color
depth, and sound support. If you designate these settings as “required”,
the installation aborts if the requirements are not met.
110
3. In the top drop-down list, select the minimum system requirement for
your application.
• Windows Version and Windows NT version. Specify the
minimum version of Windows required by your program. For
example, choose Windows 98 if the application runs on Windows
98, but not on Windows 95 or Windows Me.
• Screen Resolution, Screen Colors, Sound Support. Specify the
minimum screen resolution, color palette, or audio support options
your program requires.
4. From the Type drop-down list, select the appropriate option:
• Choose Recommended if this configuration item is not required by
the program. The message you enter in the Message Text field
(see below) appears on the destination computer if the computer
does not meet the specified requirement, and the installation
continues once the message is acknowledged.
• Choose Required if this configuration item is critical to the
installation and the program cannot run without it. The message you
enter in the Message Text field (see below) appears on the
destination computer if the computer does not meet the specified
requirement, and the installation is aborted.
5. In the Message Title field, enter a name to appear in the title bar of
the warning message. This field is not available if the All... or Any...
option is selected in the top drop-down list.
6. In the Message Text field, enter the message that you want to appear
if the destination computer does not meet the specified requirement.
This field is not available if the All... or Any... option is selected in the
top drop-down list.
111
3: INSTALLATION EXPERT PAGES
For example, your message can inform the end user why the
installation cannot run: “This application requires Windows Me to run.
Please upgrade.”
7. Click OK.
System Search
The System Search page specifies methods by which the installation can
search for and detect a previous version of your application. If you know
certain files, registry values, or .INI file changes that would be present if
your application was installed previously, you can use this page to search
for a previous version of your application. If a previous version is installed,
its directory becomes the default directory for installation of the new
software.
If, during the previous installation, you wrote the installation directory
pathname into an .INI file or into the registry, you can search for that
pathname using this page. Or, if you know of a specific file that exists only
in the installation directory, you can search for that file, and get its
directory. In either case, the pathname you find is put into the variable
%MAINDIR%. The variable %MAINDIR% represents the default installation
directory of the installation.
112
• Search for File. Searches the destination computer’s hard drive
and network for a specific file.
• Read INI Value. Searches within an .INI file for a value. You
specify the .INI file name, the section name within the .INI file, and
the item name. Use this only to get an .INI value that you know to
be a valid pathname on the destination computer.
• Read Registry Value. Searches the Windows registry for the key
value you specify. You specify the registry key and the Value Name.
Use this only to get an .INI value that you know to be a valid
pathname on the destination computer.
Depending on your selection, a corresponding dialog opens so you can
configure the search.
2. Enter the search criteria in the dialog.
• Search for File. Specify the name of the file to look for, the
message to be displayed in the progress dialog while searching, the
drives to be searched (local hard drives only, network drives only, or
both), and the search depth. Set the search depth to zero to search
the entire directory tree of the specified volumes. A search depth of
2 or 3 is recommended when searching network volumes.
• Read INI Value. Choose the directory that contains the .INI file
from the browser at the top of this dialog. (If the directory is not
shown in this tree, select the directory it is in and click New Folder to
add it.) Then enter the file name of the .INI file to be read, the
section that contains the entry to be read (without the square
brackets), and the item name of the entry. Mark the Remove File
Name checkbox to return only the directory name if it ends with a
file name.
113
3: INSTALLATION EXPERT PAGES
• Read Registry Value. Choose the root key that contains the named
value you want to read, then enter the name of the key and the
value to be read from that key. Mark the Remove File Name
checkbox to return only the directory name if it ends with a file
name.
114
To edit the previous version search list:
To remove a search item from the System Search page, select it from
the list and click the Delete button.
To rearrange the list, use the Move Up and Move Down buttons.
Searches are performed in the listed order, and the searches cease after
a search returns a positive result.
The edit the details of a search item, select the item and click the
Details button.
Uninstall
Use this page to specify whether the installation supports the uninstall
capability and, if so, to set options for controlling which files are removed
by the uninstall program. The uninstall program, which is installed
automatically, is named unwise.exe.
Note:
Installations created in the Professional Edition of Wise Installation System
contain the Repair option (in addition to Automatic and Custom) when you choose
the application name in the Add/Remove Control Panel. Choosing Repair re-edits
the registry and .INI files, re-installs all files, and re-self-registers files.
Use the options at the top of this page to indicate whether you want to
include an uninstall routine with your installation. If you choose to add this
capability, use the remaining options on this page to configure the uninstall
program.
Do not add support for uninstall. Mark this option if you do not want
end users to be able to uninstall your application.
Support uninstall. Mark this option to allow uninstall and configure the
uninstall application using the other controls in this dialog.
Display uninstaller background window. Mark this checkbox to
display a gradient window similar to the one displayed during the
installation.
Top Color and Bottom Color. Click the Top Color and Bottom Color
buttons to use standard Windows color selectors to choose the top and
bottom colors for the background gradient. The uninstall automatically
generates a smooth transition between the two colors.
Uninstaller Font. Select the font to be used. If you do not specify a
font, a standard sans serif font is used. For a Japanese installation,
specify MS Gothic.
115
3: INSTALLATION EXPERT PAGES
Point Size. Select the point size for text displayed in the installation
dialogs. If you do not specify a point size, the standard Windows text
size is used.
Character Set. Enter the number of the character set to be used. Use
zero, which is the default, unless your uninstall is in Japanese. For a
Japanese uninstall, enter 128 and make sure you have specified MS
Gothic in the Uninstaller Font field.
In the Commands list on the Uninstall page, you can add commands to
the uninstaller. The uninstaller automatically reads commands from the
Install.log file created during installation; you can add additional
commands here. Click the Add button to add a new command, the Details
button to edit the selected command, and the Delete button to delete a
command.
116
the Program Filename field). For best results, make sure that the
program you execute has little or no user interface. The uninstall
procedure should seem like a single program to the end user, even if
additional programs are executed.
3. Mark the Delete in-use files during uninstall checkbox to delete
even those files that are in use when the uninstall program is running.
WebDeploy
Note:
WebDeploy supports only basic authentication. In your Web server software,
make sure that the directory you use for WebDeploy is secured with basic, not
domain, authentication. Also, if you use the FTP protocol for WebDeploy, keep in
mind that WebDeploy doesn’t support passive transfers via FTP. Some firewalls and
gateways require passive FTP transfers.
117
3: INSTALLATION EXPERT PAGES
118
20K, packed with the four 5K files. The other data file, because it is
bigger than the cluster size, is not split, and remains a 50K file.
5. Click the Distribute button and select the FTP Server option from the
Distribution Method combo box.
This recompiles your application and uploads the files to your server.
6. Fill in the server information requested.
Once the files are uploaded to the server, you can test your application.
WebDeploy downloads and installs only the files that a particular end
user requires, skipping those files that are the same version as existing
files on the destination computer. To determine which files can be
skipped, WebDeploy uses Microsoft’s VER.DLL. If the Internet
connection is interrupted during the download, WebDeploy
automatically picks up where the installation was cut off when
download resumes. See The WebDeploy Process on page 120.
Note:
Installations deployed through WebDeploy contain a Repair option in the
uninstall wizard, but the Repair option does not function.
Also see:
The WebDeploy Process on page 120
WebDeploy Versus Distributing to an FTP Server
119
3: INSTALLATION EXPERT PAGES
Phase 2: • Visits your web site • Contains the installation .EXE and other
Your customer • Clicks on the installation .EXE file files
• Downloads the installation to their
does this... computer
• Runs the installation
Phase 3: • Presents the user with an install wizard • Contains the pieces of your installation
When the user • Automatically determines which pieces of ready for download
your application are needed • Contains the new installation and its
runs the • Downloads only the required pieces from ReadMe
installation, it... your web host
• Installs the appropriate pieces of your
application
120
WebDeploy recompiles your information into stub files and data files,
but does not actually put the files on the Web for you. The stub files are
designed to be distributed over the Internet, that is, they contain all the
server connection information. When an end user clicks the stub file,
WebDeploy connects to the appropriate Web site, checks the system on
the destination computer to determine what it needs, then starts
downloading files. After it has finished downloading the files, it starts
the installation.
When you choose the FTP Server option in the Distribution Wizard
(with WebDeploy disabled), it simply copies your compiled files to the
location you specify.
WebDeploy and FTP server distribution can be used in conjunction with
each other. However, you should use an external FTP client to upload the
files to the Web, especially if you are not familiar with the FTP process. This
is simply because the FTP Server feature in the Wise Installation System
fully automates the upload process, so you do not have direct control over
the directories to which you are installing.
121
3: INSTALLATION EXPERT PAGES
Note:
To install a Windows CE application, you must have Windows CE Client
software version 2.2 or greater installed on the desktop computer.
122
Note:
If you are interested in learning more about Microsoft CAB wizard, refer to
the CAB wizard documentation or visit the www.microsoft.com Web site and
search for cabwiz.
Note:
Windows CE installations created with the Wise Installation System can be
executed on Windows CE version 2.0 or higher, and must be installed by the end
user from a Windows 95, Windows 98, or Windows NT 4.0 or later operating
system. Windows CE installations can only be created on Windows 98 or Windows
NT 4.0 or higher operating systems.
123
3: INSTALLATION EXPERT PAGES
This procedure guides you through the process of using the WinCE pages in
Installation Expert to build a Windows CE installation.
1. From the File menu, select New.
The New Installation File dialog opens.
2. Select Blank Script and click OK to open a new untitled installation
file.
3. On the navigation bar at the bottom of the screen, click the Installation
Expert button.
Make sure that All is selected in the Pages menu to display all pages in
Installation Expert.
4. From the Windows CE page group, select the WinCE Components page.
5. Refer to the pages below for step-by-step instructions for completing
each of the five WinCE pages.
WinCE Components on page 124.
WinCE Files on page 130.
WinCE Platform on page 133.
WinCE Shortcuts on page 137.
WinCE Registry on page 135.
6. Click the Compile button to save and test your installation.
Note:
If an error is detected at any stage of the compilation, the compiler
stops. All files generated during the compilation process are deleted and an
error message appears to indicate the nature of the error.
WinCE Components
124
The WinCE Components Page is where you define the components for your
application. A component is the smallest set of files, icons, or registry
entries that can be installed or uninstalled from the CE device as a group.
Every Windows CE installation must have at least one component to hold
the application files and settings. Installations that contain two or more
freestanding applications can benefit from being separated into two or
more WinCE components.
125
3: INSTALLATION EXPERT PAGES
There are two methods for setting installation directories for Windows CE
applications. By default, your installation paths are hard-coded based on
the installation directory you specify for each component or file. With this
method, you can install to any number of directories, including the root
directory. However, this method has the following disadvantages:
It limits the ability of your end users to change the installation directory.
126
To map your installation to the predefined WinCE paths, go to the Compiler
Variables page of Installation Expert. Add the variable _WINCE_MACROS_
and set its default value to 1.
The predefined paths are as follows:
\Program Files
\Windows
\Windows\Desktop
\Windows\Startup
\My Documents
\Program Files\Accessories
\Program Files\Communication
\Program Files\Games
\Program Files\Pocket Outlook
\Program Files\Office
\Windows\Programs
\Windows\Programs\Accessories
\Windows\Programs\Communications
\Windows\Programs\Games
\Windows\Fonts
\Windows\Recent
\Windows\Favorites
127
3: INSTALLATION EXPERT PAGES
2. Complete the fields in this dialog to define the properties of the new
component.
• Application Name. (Required field.) Enter the name of the
application you are installing. This is how the program is referenced
when it is installed/uninstalled in the application manager’s window.
• Company Name. (Required field.) Enter the name of the company
that developed the application. This is used to further identify the
application as it is being installed/uninstalled.
• Setup Name. This designates what the .CAB file(s) for this
component are named. All .CAB files are named according to the
following structure: [Setup Name.Processor Name.CAB]. If a Setup
Name is not assigned, the value of this field defaults to the
Component Name.
Note:
Do not place an extension on the Setup Name value or the
installation generates an error message.
128
must be supported. No more than 27 platforms can be supported in
any single installation.
When the installation is compiled, a separate .CAB file is created
for each platform.
When the installation is run, the application manager program
(Ceappmgr.exe) queries the CE device and selects the
compatible .CAB file for installation. If the CE device uses a
processor other than one(s) you marked here, a message
displays on the desktop indicating that the application is not
compatible with the CE device, and the installation is cancelled.
If the end user has selected a platform to support but there are
no other entries for the platform (no files, icons, shortcuts, or
registry entries), then an installation .CAB file is not generated
for that platform. Empty installation .CAB files are not created or
supported.
• Component Name. Enter a name for this component. The
Component Name identifies this component to the application
manager when the installation is run.
If there is only one component in the installation, the Component
Name can be the same as the Application Name.
If multiple components are being used, name this component in
accordance with the application or information it contains. For
example, “Widget Program”, or “Widget Help File”.
• Description. (Required.) Enter a brief description to identify this
component. The Windows CE Application Manager displays this
description when the component is being installed or uninstalled.
• Install Directory. (Required.) Enter the default installation path
where you want this component to be installed on the Windows CE
device. Use the drop-down list to choose from the most common
installation paths. This is also useful for creating an empty directory.
• Icon File. Specify the path to either a freestanding icon file (.ICO)
or an icon source (.EXE, .DLL) that is displayed in the application
manager program to identify this installation.
• Icon Index. If you are using an .EXE or a .DLL as the source for the
icon file, enter the resource number for the icon that is to be
displayed.
129
3: INSTALLATION EXPERT PAGES
Note:
An executable file or icon file can have multiple icons contained
within the file. To see the icons in a file, go to Windows Explorer, right-click
any shortcut file, and select Properties. Click the Shortcut tab, then click
the Change Icon button. The Change Icon dialog appears. It contains a
graphical list of icons for the shortcut file you right-clicked. The icon
number of the first icon is 0, the icon number for the second is 1, and so
on. To see the icons in a different file, click Browse and choose a different
file.
WinCE Files
The WinCE Files page is where you assign which files are installed under
each component by the installation. Once files have been assigned, you
can use the Details button to select platform support and other conditional
settings for the individual files.
130
Assigning Files to the WinCE Installation
131
3: INSTALLATION EXPERT PAGES
The Files Properties dialog gives you individual control over how each file is
installed to the CE device. Each file in the installation set can have its own
unique property settings, allowing it to be installed or not installed
depending on the platform used by the connected CE device or the files
already installed on the device.
Access the File Properties dialog from the WinCE Files Page.
To view or edit the properties of a single file, select the file from the
lower right window of the Files page and click the Details button.
To change the properties of several files, hold down the CTRL key while
selecting the files from the lower right window of the Files page, then
click the Details button. As you finish editing each file, click OK and the
File Properties dialog automatically displays the next file in the set. The
Source Pathname field shows the current file whose settings you are
editing.
Source Pathname. This is the current path to the file on your hard
drive. If you want to replace this file with another, click Browse to
specify the path to the new file.
Destination File Name. The name for the file as it is stored in the
target directory (on the CE device).
File Skip Options. Select an option from this drop-down list to set how
you want the installation to respond if a file error occurs during the
installation of this file.
132
• Skip silently if error occurs. Do not install this file and do not
notify the end user if an error occurs.
• Warn if attempting to skip. Warn an end user if an attempt is
made to skip a file after an error occurs.
• Do not allow file to be skipped. Do not allow the end user to skip
copying a file.
Platform Supported. If you select a specific platform from the drop-
down list, then this file is copied only when the application is installed on
that platform.
The All option installs the files to all of the platforms that have been
selected in the Platforms Supported list on the Windows CE
Component dialog on the WinCE page.
Shared File. If this checkbox is marked, the file (if it is a .DLL, .OCX, or
.VBX) is entered in the registry so that Windows can automatically keep
track of how many installed applications are using it and prevent it from
being removed until it is no longer needed.
Self Register. Some files, such as .OCXs and some .DLLs, support self-
registration. If this checkbox is marked, the file registers itself in the
Windows registry before it is used.
Replace Existing File. From the drop-down list, select how your
installation responds if the file being installed is already stored on the
CE device.
• Always. The new file always replaces the old file.
• If date/time older. Replaces the file if its modification date and
time are older than the new file.
• Never. The file is never installed if it already exists. Use this for
files, such as configuration files, which should be installed if they are
not present, but which might be customized by the end user and
should therefore not be replaced on subsequent re-installations.
Install only if file already exists. Check this option if you only want
to install this file if a file of the same name already exists in the target
directory of the CE device.
WinCE Platform
133
3: INSTALLATION EXPERT PAGES
134
Note:
If you specify a minimum build, you must also specify a maximum build.
However, if you specify a maximum build, you are not required to specify a
minimum build.
Setup Dll Path. This .DLL is called (executed) during the installation.
Information regarding the Setup .DLL Path is subject to change. Refer to
Chapter 10 in the “Microsoft Windows CE Programmer's Guide”,
published by Microsoft Corporation for the latest standards (ISBN# 1-
57231-643-8) or the Windows CE SDK help files.
4. Repeat the preceding steps for each component and platform for which
you want to specify Windows CE platform information.
WinCE Registry
The WinCE Registry Page lets you add new registry keys or update existing
registry values on the Windows CE device during the installation. The left
list box shows a list of keys that can be modified on the Windows CE
device. The right list box shows the value assigned to any new key selected
on the left.
135
3: INSTALLATION EXPERT PAGES
4. Specify the values for the registry key you want to add or update.
• Root. Select the parent key in which this key is added.
• Key. Enter the name of the key you want to create or update. You
can create multiple hierarchical keys at once by separating them
with backslashes, as in directory path names. For example, a key of
Protocol\StdFileEditing creates the StdFileEditing key inside the
Protocol key. Any keys you specify that do not exist are created
automatically.
• Value Name. Enter the name of a new named value.
• Data Value. Enter the data for the value. If the Data Type (below)
is Double word (DWORD), the data should be in decimal notation. To
insert multiple lines of data here, hold down the CTRL key and press
the ENTER key to begin a new line.
• Data Type. Select the type of data contained in the named value.
Available types are as follows:
String (REG_SZ prefix) indicates that a value entry is an
expandable string. If you want to embed a variable name, (such
as %WIN%), you must enclose it with double percents
(%%WIN%%). If you only enclose it in single percents, then the
variable name is expanded to its actual value. This allows
Windows NT4/2000/XP system variables to be embedded.
Multiple strings (REG_MULTI_SZ prefix) identifies a value entry
as a multiple string. These are multiple pieces of text, separated
by carriage returns.
Binary/Hex (REG_BINARY prefix) List of numeric values
separated by commas. Two bytes per field. Do not use the “0x”
hexadecimal prefix.
136
Double word (REG_DWORD prefix) identifies a value entry as a
4 byte (DWORD) entry. This can be in hexadecimal format and
must be a valid DWORD value.
• Platform Supported. Use this field to make this registry key
platform dependent. If you select a processor from this list, this
registry key is added only to CE devices running on that platform.
• Don't Overwrite if key already exists. If you clear this checkbox,
this registry value overwrites the existing key value on the Windows
CE device (if it exists). If you mark this checkbox, this registry
setting does not overwrite the existing key value.
5. Click OK.
The key value is added to the WinCE Registry Page.
After you have added a new key value, you can edit it by selecting the
key name from the left list box and double-clicking on the value in the
right list box. This re-opens the Registry Key Settings dialog.
• To remove an entire key from the left list box, select the key to
remove and click the Delete Key button.
• To remove a key value from the right list box, select the value to
remove and click the Delete Value button.
6. Repeat the previous steps to create additional registry entries for this
component, or other components.
WinCE Shortcuts
The WinCE Shortcuts page lets you determine shortcut icons to be installed
on the Windows CE device, giving direct access to your application.
137
3: INSTALLATION EXPERT PAGES
3. Source Path. Click Browse and select the file from your installation to
which you want to create a shortcut.
4. Shortcut Name. Enter a text label that you want to appear
underneath the shortcut icon.
5. Shortcut Location. From the drop-down list, select the path where
the shortcut is to be installed on the CE device.
Use the drop-down list to select from the most common locations for
Windows CE shortcuts. The default setting is the Programs folder on the
Start menu.
6. Platform Supported. Designate that this icon only be created when
the application is installed on the specified platform.
If the file associated with the shortcut is being installed to all platforms,
than you can use the All option to create the shortcut for all platforms.
Do not use the All option with a file that is being installed to a
particular platform.
7. Click OK.
8. Repeat the above steps for each additional shortcut you want to add.
WiseUpdate
WiseUser
The WiseUser page appears if you have WiseUser installed. WiseUser is a
separate Wise Solutions product that manages installations on shared
workstations. See the separate WiseUser Reference Manual for details.
138
Chapter 4
Script Editor
Scripting Guidelines.
139
4: SCRIPT EDITOR
140
WORKING IN SCRIPT EDITOR
The Script Editor window contains all the tools necessary to develop and
edit scripts. It contains the installation script and include scripts, tabs for
easy switching between the scripts, toolbars with script editing tools; and a
list of actions you can use to create new script lines. Each element of the
Script Editor window is described below.
Right-Click Menu. Right-click actions or script lines to perform
common operations.
Menu. Use commands on menus to perform editing functions on script
lines, and to compile, test, run, and debug your script.
Toolbar. The toolbars at the top of the window provides quick access to
common Script Editor tasks, including editing and debugging functions.
Hold your pointer over a tool to see its name. From the View menu,
select from the Toolbars submenu to show and hide toolbars.
Title. Enter the name of this script in the Title field. By default, it is the
name entered in the Installation Title field on the Product Details page
in Installation Expert followed by the word “Installation.” If you change
the title of the script here, it does not change on the Product Details
page. When you run your setup program, this name appears in two
places: at the top of the splash dialog (the Initializing Wise Installation
Wizard dialog), and in the title bar of the setup program screen.
141
4: SCRIPT EDITOR
Event. Use this drop-down list to specify which script you want to edit.
The Mainline script is the script that typically contains installation
instructions. See Choosing a Script to Edit on page 143 for more details.
Language. Use this drop-down list to specify a language. All the
languages your installation supports, which you set on the Languages
page in Installation Expert, appear in this drop-down list.
Each time you add a script line that presents user interface (UI)
elements to the end user, such as the Display Message or Prompt for
Text actions, you must edit the script line in every supported language.
For instance, suppose you set your installation to support French and
English on the Languages page in Installation Expert. While in the U.S.
English script, you add a Display Message script line that states, “Do you
want to view the ReadMe file now?” You then test your installation and
you immediately see an alert message that says you haven’t specified a
title for French in a message box. This happens because if you add an
action in one language, the same action is automatically added in the
other supported languages, but the options for the other supported
languages are not filled out.
To avoid these error messages, whenever you add a script line that
presents any kind of text to the end user, immediately go to each
language in the Language drop-down list, and edit that script line so it
contains the translated text. To automatically copy the text to every
supported language, mark the Copy Default checkbox on the
Languages page in Installation Expert. The dialogs that ship with the
Wise Installation System are pre-translated for you, so you do not need
to edit those.
Actions. The Actions list contains all the actions you can add to your
script. Click the Standard tab at the bottom of the list to see all possible
actions. Click the Custom tab to see a list that you can customize to
contain only those actions you use more frequently. See Checking for
Duplicate Files in Include Scripts on page 150.
Installation Script. The Installation Script area of the page contains
the script that is executed when an end user runs your setup program.
You can edit any script line by double-clicking it, and you can copy and
paste script lines by using the editing commands on the Edit menu.
Script lines are color-coded based on the type of the script line. To
change the color code, see Setting Preferences on page 43. The default
color code is as follows:
• Logic items - blue
• Remarks - green
• Install/Copy File Items - black
• Compiler Variable Items - gray
142
WORKING IN SCRIPT EDITOR
143
4: SCRIPT EDITOR
your own user-defined action, you store the custom dialog for it in the
Exit script.
Cancel. The script that’s executed when the end user cancels the
installation. Because some files might already have been installed when
the end user cancels, the Cancel script contains the include script,
rollback.wse, which returns the destination computer to its pre-
installation state.
Note:
Any changes you make to an include script are saved to that script when you
save your installation.
144
WORKING IN SCRIPT EDITOR
Note:
If you want inserted lines to appear below the line you selected, mark
the Append New Items checkbox in Preferences, as described in Setting
Preferences on page 43.
145
4: SCRIPT EDITOR
Note:
If you want inserted lines to appear below the line you selected, mark the
Append New Items checkbox in Preferences, as described in Setting Preferences
on page 43.
146
WORKING IN SCRIPT EDITOR
After you add the action, a dialog appears that lets you set the parameters
for the action. If the new action does not require any parameters, a dialog
does not appear, and the action appears in the script. If the new action is a
Custom Dialog or Custom Billboard action, the appropriate editing
environment opens. For more details on actions, see WiseScript Actions on
page 173.
Some actions come in pairs. For example, when you add an If action, you
must also add an End action at the end of the conditional block. Script
Editor automatically indents actions inside such structures. To see
connection lines between matching actions, select Connection Lines from
the right-click menu.
147
4: SCRIPT EDITOR
2. In the Find What field, enter the text you want to find. Use the ?
wildcard to represent any character.
3. To search for the text across all scripts, mark the Search Across
Include Scripts checkbox. For information on include scripts, see
Working With Include Scripts on page 144.
4. Click the Find Next button.
The bottom section of the dialog shows the script line that contains the
text for which you’re searching, along with the complete text item in
which the search text was found.
148
WORKING IN SCRIPT EDITOR
Tip:
To view the parameters of a script line while you are searching, enter the
search text in the Find Text in Installation Script dialog, click the Find Next button
one time, and click Close. Then press F3 to find subsequent occurrences of the
search text. A message dialog informs you when the search has reached the end of
the script.
2. In the Find What field, enter the text you want to find and replace.
Use the ? wildcard to represent any character.
3. To search for the text across all scripts, mark the Search Across
Include Scripts checkbox.
For information on include scripts, see Working With Include Scripts on
page 144.
4. Click the Find Next button.
149
4: SCRIPT EDITOR
The bottom section of the dialog changes to show you the script line
that contains the search text along with the word in which the search
text was found. You cannot double-click the found line to view its
parameters while the Replace Text in Installation Script dialog is open.
150
WORKING IN SCRIPT EDITOR
151
4: SCRIPT EDITOR
152
CREATING USER-DEFINED ACTIONS
153
4: SCRIPT EDITOR
For example, suppose that your user-defined action displays an HTML file
on the Web. In your action, a dialog asks for the URL to the file, and the
URL is put in the variable URL_PATH. For this example, you might enter the
following in Title field:
Display HTML File %URL_PATH%
When you later use your user-defined action by adding it to an installation
script, the dialog appears and you enter www.wisesolutions.com/
support.htm for the URL. The script line for your user-defined action
displays in the format you specified, except that it shows the variable’s
value instead of the variable name. For example, it displays:
Display HTML File www.wisesolutions.com/support.htm
154
CREATING USER-DEFINED ACTIONS
Technical Note:
If you want to add a drop-down list in your custom dialog that
contains all the WiseScript variables currently defined in this script, set the
list to display the compiler variable %_VAR_LIST_%. It contains all the
non-compiler variables.
155
4: SCRIPT EDITOR
Note:
You must follow all four procedures in sequence to create a new user-defined
action.
156
CREATING USER-DEFINED ACTIONS
157
4: SCRIPT EDITOR
You must store dialogs for user-defined actions in the Exit script.
2. In the Actions list, double-click the Custom Dialog action, enter the
text Enter Time to Wait in the Dialog Title field, and click OK.
3. Click the Static Control tool on the toolbar, and in the Static Control
Properties dialog that appears, enter Milliseconds to Wait in the
Text field, then click OK.
4. Click the Edit Text tool on the toolbar, and in the Edit Text Properties
dialog that appears:
• Enter %WAIT_TIME% in the Default field.
• Enter WAIT_TIME in the Variable field.
• Click OK.
5. Click the Push Button tool on the toolbar, and in the Push Button
Properties dialog that appears:
• Enter OK in the Label field.
• Mark the Return to Previous Dialog option under Action.
• Mark the Default Button checkbox.
• Click OK.
6. Click the Push Button tool on the toolbar, and in the Push Button
Properties dialog that appears:
• Enter Cancel in the Label field.
• Mark the Abort Installation option under Action.
• Click OK.
7. Rearrange the dialog so that it looks something like this:
158
CREATING USER-DEFINED ACTIONS
8. When you are done editing the dialog, select Save Changes and exit
from the File menu.
Now you have created the dialog that appears when your action is double-
clicked in the Actions list. The next step to creating a custom action is to
add a script in the main script area. See Writing a Script for Your Action.
Technical Note:
Kernel32.dll is a Windows system .DLL that contains many common
functions. To learn more about calling Windows system .DLLs, consult
documentation provided as part of the Microsoft Developer Network
(msdn.microsoft.com).
1. From the Event drop-down list, select Mainline to return to the main
part of your script.
The script should be blank.
2. In the Actions list, double-click the Call DLL Function action, and in the
Call DLL Function dialog that appears:
• Enter %SYS32%\kernel32.dll in the DLL Pathname field.
• Enter Sleep in the Function Name field.
• Mark the Call a function with variable parameter list option.
• Click the Add button, and in the DLL Parameter Settings dialog that
appears:
Select dword from the Parameter type drop-down list.
159
4: SCRIPT EDITOR
160
CREATING USER-DEFINED ACTIONS
161
4: SCRIPT EDITOR
Debugging Scripts
Once you have created or modified a script, you are ready to test it. You
can do this either by using the Test or Run buttons on the navigation bar, or
by using the more flexible capabilities available in Script Editor.
In Script Editor, you can go beyond the capabilities of the Test and Run
buttons to actually debug your installation. You can view the script and the
values of variables while you use Script Editor’s tools to single-step
through a script or to run to a breakpoint. You can also use Display
Message and Compiler Variable actions that let you generate a debug
version when you compile.
You can:
Use debugging tools to single-step through a script or run to a
breakpoint, viewing the script as you do so.
View the value of variables as the installer .EXE runs.
162
DEBUGGING SCRIPTS
163
4: SCRIPT EDITOR
164
DEBUGGING SCRIPTS
165
4: SCRIPT EDITOR
Scripting Guidelines
If you’ve used a programming language before, you probably already
understand basic scripting concepts. If you haven’t, you should become
familiar with them before attempting to write a script.
166
SCRIPTING GUIDELINES
167
4: SCRIPT EDITOR
The % symbol is not part of the variable name, but rather a marker that
tells WiseScript to replace the variable’s name with its value before
executing the command. If you want to include an actual % character in
your script, use %%.
You can use substitution to build messages to be displayed to the end user,
to set locations for copying or installing files, and to initialize new variables
to the value of one or more other variables. If you are using a variable
name as part of an expression, do not surround the variable name with
percent (%) signs. For instance, if you use an If action, an ElseIf action, a
While action, a Set Variable action, or a Wizard Loop action to evaluate an
expression, do not enclose the variables you reference in the expression
with percent (%) signs. The exception to this rule is for compiler variables;
enclose compiler variables inside percent signs no matter where you enter
them.
A few types of actions (If, While, Set Variable, and some others) can use a
more flexible scheme that lets you use arithmetic expressions and other
options See Expression Operators on page 424.
To read about scripts that demonstrate evaluating expressions with an If
statement, see Performing Calculations on Integer Values on page 398 or
Parsing Strings Using Expression Operators on page 398.
168
SCRIPTING GUIDELINES
169
4: SCRIPT EDITOR
When a script action places a value into a variable, the variable must be
a runtime variable. This is because compiler variables can’t be changed
by scripts, only by the person who builds the installer .EXE file.
In most other places, either the type of variable is implicit (for example,
the Compiler If script action requires a compiler variable) or noted
explicitly.
Anatomy of a Script
A script can be divided into four basic parts. If you are modifying the
default script generated by Installation Expert, this overview helps you
understand, in broad outline, what the default script is attempting to
accomplish. If you are writing your own script from scratch, this outline can
help you organize your thoughts and create a solid script that works
properly with minimal tweaking.
Initialization. In this section, you set up default values for your
installation, including default directory, standard components, and Start
menu or Program Manager group. You should read any information from
.INI files or the registry that you need later in the installation. Also
install any files you plan to display to the end user (README.TXT,
LICENSE.TXT, etc.). Optionally, you can search for a previous version of
your application and use its location as the default installation directory.
User Input. This section contains a series of dialogs that ask the end
user what optional components they want to install, what directory to
put the files in, and so on. Generally you use a Wizard Loop action for
this phase. This step might include displaying the README or LICENSE
files installed in the Initialization step.
File Copy. This is the longest part of the installation process; files are
copied from the installer .EXE file to the destination computer.
System Configuration. After files have been installed, the destination
computer’s configuration files (.INI files, registry, Start menu, etc.) are
updated so that the new software works properly. After this phase, you
might prompt the end user to restart the computer.
170
SCRIPTING GUIDELINES
About Components
When an end user selects one or more optional components to be installed,
a letter corresponding to each component is placed in a variable called
COMPONENTS. Selecting the first component places an A in the variable,
the second adds a B, and so forth. Up to 26 components can be added this
way. The wizard dialogs created by Installation Expert take care of placing
the correct values in the COMPONENTS variable for you, or you can use the
Select Components script action or a custom dialog to accomplish the same
result.
In the installation script, you use conditional statements of the form “If
COMPONENTS contains ‘A’” to determine which files are installed when
each component is selected. Script Editor scans the script looking for these
conditionals to determine how much disk space is required by each optional
component. You must use the variable COMPONENTS and the proper
conditional format for this feature to work. See Building a Components-
Based Installation on page 405 for an example of a components-based
installation script.
171
4: SCRIPT EDITOR
172
Chapter 5
WiseScript Actions
173
5: WISESCRIPT ACTIONS
174
Config Pathname. Enter the full pathname of the BDE configuration
file. This pathname can be read from the CONFIGFILE01 entry in the
IDAPI section of the WIN.INI file. Use the Read INI Value script action to
read this entry into a variable, for instance, BDECONFIGPATH; then use
that variable name here (%BDECONFIGPATH%).
Alias Name. Enter the name of the alias to be added.
175
5: WISESCRIPT ACTIONS
Technical Note:
The maximum length of the PATH variable under MS-DOS is 128
characters. If the path is too long, it is truncated.
176
Action. Choose whether this script action should add an icon, delete an
icon, or delete an entire group. If adding an icon, all the fields below
must be provided (except for Icon PathName and Icon Number, which
are optional). If deleting an icon, only Group Name and Icon Name must
be provided. If deleting a group, only Group Name must be provided.
Technical Note:
Always place deletions before additions in your script. If you attempt to
delete an icon from a group that does not exist, the Program Manager might
remove an icon with the same name from the last-added group, if such an icon
exists. Deleting icons and groups first eliminates this problem. This might not
be reliable in a Windows 95 shell; use Create Shortcut on 32-bit operating
systems.
Group Name. Enter the group name. If your script allows the end user
to select or enter a group name, use variable substitution to get the
value of the variable where you stored the group name (in the standard
script, for example, use %GROUP%).
Icon Name. Enter the name of the new icon, if you are adding a new
one.
Command Line. Enter the command line that is used to open the file
associated with the new icon. Use variable substitution, rather than
hard-coding the command line, to make sure the command line works
on any system. For example, use %MAINDIR% to specify the main
177
5: WISESCRIPT ACTIONS
application directory so that the icon works regardless of where the end
user installs your application.
Icon PathName. Specify a pathname or use variable substitution to
build a pathname. You must specify an icon file or an .EXE file
containing an icon, if you plan to use a custom icon.
Icon Number. Enter the resource number of the icon (from the
pathname specified above) to be displayed in the Program Manager or
Start menu.
Technical Note:
An executable or icon file can have multiple icons contained within the
file. To see the icons in a file, go to Windows Explorer, right-click any shortcut
file, and select Properties. Click the Shortcut tab, then click the Change Icon
button. The Change Icon dialog appears. It contains a graphical list of icons for
the shortcut file you right-clicked. The icon number of the first icon is 0, the
icon number for the second is 1, and so on. To see the icons in a different file,
click Browse and choose a different file.
178
Usage
In the Add Text to Install.log dialog, you simply enter the text you want to
add to Install.log. Because the log is written continuously during
installation, the location of the text in the log depends on where in the
script you put the Add Text to Install.log script line. By default the
application goes into the application directory (MAINDIR).
Log Text. Enter the text to be added to the log file. Remember, you can
use variable substitution to incorporate the values of script variables in
your log messages.
Examples
Normally, the uninstaller does not remove files that were installed to the
Windows, Windows\System, or Windows\System32 directories. If you want
these files to be removed, in Script Editor, you can place an Add Text to
Install.log script line directly before the Install File(s) script lines that
install files to one of these directories. In the Add Text to Install.log dialog,
enter the following text. Enter it exactly as shown because it is case-
sensitive:
Non-System File:
Note:
You can also specify uninstaller actions by clicking the Add button on the
Uninstall page in Installation Expert.
You can also add a line to the Install.log that executes a program during
uninstall. If you execute a program during uninstall, the uninstaller pauses
until the program finishes execution. To execute a program during
uninstall, in the Add Text to Install.log dialog, enter the following line, but
customize the program’s pathname as necessary, and add any command
line options. Enter it exactly as shown because it is case-sensitive:
Execute path: %MAINDIR%\Remove.exe
179
5: WISESCRIPT ACTIONS
If you want the uninstaller to remove not only those files that were
installed, but also files that were subsequently added by your application,
you can remove all the files and sub-directories within a specified directory.
Use this option with caution because end users might have stored their
own files in the directory. To do this, in the Add Text to Install.log dialog,
enter the following line, but customize the pathname as necessary,
including the wildcard information. Enter it exactly as shown because it is
case-sensitive:
File Tree: %MAINDIR%\Data\Temp\*.*
If you want the uninstaller to remove not only the registry keys that were
created during installation, but also those registry keys that were
subsequently added by your application, you can remove an entire registry
key, including all the sub-keys and values that exist below that key. To do
this, in the Add Text to Install.log dialog, enter the following line, but
customize the registry information as necessary. Enter it exactly as shown
because it is case-sensitive:
RegDB TREE: SOFTWARE\Wise Solutions
RegDB Root: 2
Add to Autoexec.bat
The Add to Autoexec.bat script action edits the Autoexec.bat file, which is
executed during startup, to allow you to add commands that are executed
before Windows loads. If you want to have your application start up after
Windows is loaded, add a shortcut to it to the StartUp group of the Start
menu.
Commands can be inserted in the Autoexec.bat file at an arbitrary line
number, or you can have the installation search the file to find a particular
piece of text and insert your new line before, after, or in place of the
existing line. The destination computer is restarted automatically when
installation is complete to force the new Autoexec.bat commands to take
effect.
180
Text to Insert. Enter the command line you want to add to the
Autoexec.bat file. If your command line refers to a program file, use a
full pathname built with variable substitution, such as %MAINDIR% to
specify the application directory, so your program runs regardless of the
directory the end user installs it in. The PATH variable might not be set
when your command is executed, so always use a full pathname.
Line Number. Enter the line number at which the new line should be
inserted. Specify zero to append the command to the end of the file. The
Search for Existing Text panel in this dialog overrides any line number
specified here; the line number applies only when the text is not found
or when you do not specify any text.
Search for Text. Enter the text you want to search for here. The
installation scans Autoexec.bat looking for a line that begins with, ends
with, or contains the text, depending on what you set in Match
Criteria. If more than one line in the file matches, only the first is
selected.
Comment Text. Enter the text to insert at the beginning of the line that
is found. Inserting “REM ” (with the trailing space but without the quote
marks) causes the line to be commented out and ignored during
startup. This is useful when you are replacing an existing command with
a new command and want to leave the existing command in place but
inactive. In this case, you should always set the Insert Action drop-
down to insert your new command before the existing line so that a
181
5: WISESCRIPT ACTIONS
subsequent installation finds and edits the active command, not the
commented-out line.
Insert Action. Select the action to perform when a line containing the
specified text is found. You can either insert your new command before
the existing line, replace the existing line with your new command, or
insert your new line after the existing one.
Match Criteria. Choose whether the line must begin with, contain, or
end with the text entered in the Search for Text field.
Ignore white space. If this checkbox is marked, the search operation
ignores spaces and tab characters.
Case-sensitive. If this checkbox is marked, the search operation
distinguishes between upper-case and lower-case text.
Make Backup File. If this checkbox is marked, the installation makes a
copy of the Autoexec.bat file before editing it. The backup is retained
after installation so that the end user can undo any changes made to
Autoexec.bat if they cause problems.
Add to Config.sys
The Add to Config.sys script action edits the Config.sys file to add new
commands. Commands can be inserted in the Config.sys file at an arbitrary
line number, or you can have the installation search the file to find a
particular piece of text and insert your new line before, after, or in place of
the existing line.
The destination computer is rebooted when installation is complete to force
the new Config.sys to take effect.
182
Text to Insert. Enter the command line you want to add to the
Config.sys file. Use a full pathname built with variable substitution (such
as %SYS% to specify the system directory) so your program runs
regardless of how the destination computer is set up.
Line Number. The line number at which the new line should be
inserted. (Specify zero to append the command to the end of the file.)
The Search for Existing Text panel in this dialog overrides any line
number specified here; the line number applies only when the text is
not found or when you do not specify any text.
Search for Text. Enter the text you want to search for here. The
installation scans Config.sys looking for a line that begins with, ends
with, or contains the text (depending on the setting of the Match
Criteria field). If more than one line in the file matches, only the first is
selected.
Comment Text. Enter the text to insert at the beginning of the line
when it has been found. Inserting “REM ” (with the trailing space but
without the quote marks) causes the line to be commented out and
ignored during startup. This is useful when you are replacing an existing
command with a new command and want to leave the existing
command in place but inactive. In this case, you should always set the
Insert Action drop-down to cause your new command to be inserted
before the existing line so that a subsequent installation finds and edits
the active command, not the commented-out line.
183
5: WISESCRIPT ACTIONS
Insert Action. Select the action to be taken when a line containing the
specified text is found. You can either insert your new command before
the existing line, replace the existing line with your new command, or
insert your new line after the existing one.
Match Criteria. Choose whether the line must begin with, contain, or
end with the text entered in the Search for Text field.
Ignore white space. If this checkbox is marked, the search operation
ignores spaces and tab characters.
Case-sensitive. If this checkbox is marked, the search operation
distinguishes between upper-case and lower-case text.
Make Backup File. If this checkbox is marked, the installation makes a
copy of the Config.sys file before editing it. The backup is retained after
installation so that the end user can undo any changes made to
Config.sys if they cause problems.
Add to System.ini
The Add to System.ini script action lets you add a device entry to the
386Enh section of the System.ini file. If you use this command, Windows is
restarted at the end of the installation to force the new device driver to be
loaded. You should only use this action for installations on Windows 3.1x or
Windows 9x operating systems.
Do not use this action to modify the display driver (that is, display=xxx) or
any other non-device entry. Use the Edit INI script action to make these
types of changes. See Edit INI File on page 225.
Device Name. Enter the full command line for the device (for example,
device=vshare.386). The files referenced should be in the System
directory unless a full pathname is given.
If you start the Device Name field with a semicolon (for example,
;device=*vcp), the device entry is commented out if it exists in the
386Enh section of System.ini. If you add a device entry with the same
device name but a different driver pathname, the old entry is commented
out before the new entry is added.
184
Allow Floppy Disk Change
The Allow Floppy Disk Change script action closes all the files currently in
use by the installation and allows the end user to change disks. Windows
does not allow you to change floppy disks when files are open on the disk
being removed. Use this script item, for example, when you need to run an
external .EXE located on another floppy disk. The built-in code handles
floppy disk changes, so you only need to use this action for special
circumstances.
This action does not require configuration, so no dialog appears when you
add it to your script.
Description. Enter text to explain the purpose of the directory the end
user is choosing. The description appears at the top of the Browse
dialog.
185
5: WISESCRIPT ACTIONS
186
DLL Pathname. Specify the pathname of the .DLL file or use variable
substitution to build a pathname from variables.
The .DLL should have already been installed on the destination
computer before you attempt to call it. If you call it before installing it, it
will not be found. If the .DLL does not need to remain on the destination
computer after installation is complete, copy it to the Windows
temporary directory, represented by the %TEMP% variable substitution.
Note:
When you click the Test button to test the installation, you might see a
message saying the .DLL could not be found. This is because during test mode,
files are installed, then deleted immediately, except for files copied into the
Temp directory. So if you install the .DLL with an Install File(s) statement, then
execute the Call DLL statement, the .DLL is not present, and the statement
fails. To avoid this problem, install .DLLs into the Temp directory.
Function Name. Enter the name of the function inside the .DLL to be
called. The function should be exported when creating the .DLL. The
187
5: WISESCRIPT ACTIONS
188
Edit. Opens the selected parameter in the DLL Parameter Settings
dialog for editing.
Delete. Deletes the selected parameter from the list.
189
5: WISESCRIPT ACTIONS
Parameter Type. Choose from the drop-down list. If you don’t find the
parameter type you’re looking for, it’s probably listed under a different
name. See the following table.
Wise Corresponds
Corresponds to Win32
Installation to Visual Description
SDK type
System Basic type
190
Technical Note:
If you are using the Win16 SDK, use word instead of dword for
parameters that start with H or end with HANDLE.
Buffer Length. If you set the Parameter Type to string buffer, then
this field is enabled. Set the number of characters in the string buffer in
this field. The limit is 446 characters.
Passing type. Leave the passing type set to Normal unless you are
passing a complex structure to the .DLL. If you are passing a complex
structure to the .DLL, select First element of structure for the first
element in the structure, and select Contained within structure for all
subsequent elements of the structure. You do not pass the structure
name, just the elements inside it. For more information on structures,
elements of structures, and how to pass a complex structure to a .DLL,
see Passing Complex Structures to a .DLL: An Example.
Value Source. Choose the type of value to be passed: Variable (pass
by reference), constant (pass by value), constant with null value, or
constant with window handle (pointing to the installation window).
Variable Name. Enter or choose an existing installation variable name
from the drop-down list if the Value Source is set to Variable.
Constant Value. Enter a constant here if you chose Constant for the
variable source. You can use variable substitution here; the value is
constant from the point of view of the called .DLL, not necessarily from
the script.
Technical Note:
The Wise Installation System maintains backward compatibility with
.DLLs written specifically for the API available in previous versions so that you
can continue to use older scripts with the new Wise Installation System.
However, this API might not be supported in future versions of the Wise
Installation System and is not documented here. For new installations, you
should write standard .DLLs and specify their parameters as explained above.
Compile both 16-bit and 32-bit functions using the large memory model, or
explicitly declare all pointers to the structure as far. The Wise Installation
System reserves 5KB of stack space for 16-bit .DLL functions you call, and
100KB of stack space for 32-bit .DLL functions you call. You must free any
memory allocated by your .DLL routines.
191
5: WISESCRIPT ACTIONS
Note:
The following code samples are in C notation. Syntax varies in other
development environments.
Suppose that you have a function in a .DLL that processes information for a
new employee. The return value of the function is a simple integer
indicating success or failure. The function accepts three parameters: a
structure that contains two elements, an integer, and another structure
that contains two elements. The calling statement for the .DLL is:
int NewEmployee (EMPLOYEE*, int, DEPARTMENT*);
where the parameter EMPLOYEE* is a pointer to a structure, the second
parameter is a simple integer, and the parameter DEPARTMENT* is a
pointer to a structure.
In this example, the layout of the EMPLOYEE structure is as follows:
typedef structure EMPLOYEE {
LPSTR name;
LONG salary;
CHAR title[50];
}
The layout of the DEPARTMENT structure is as follows:
typedef structure DEPARTMENT {
LPSTR deptname;
LPSTR deptnum;
}
192
To call the function NewEmployee described above, you add six
parameters in the Wise Installation System’s Call DLL Function dialog: the
three elements of the first structure, the integer, and the two elements of
the second structure. In the DLL Parameter Settings dialog, click the Add
button to add each parameter.
Add a parameter for name, the first element of the EMPLOYEE structure,
and set its parameter type to string pointer and its passing type to
First element of a structure.
Add a parameter for salary, the second element of the EMPLOYEE
structure, and set its parameter type to long and set its passing type to
Contained within structure.
Add a parameter for title, the third element of the EMPLOYEE
structure, and set its passing type to Contained within structure. Set
its parameter type to string buffer and its buffer length to 50.
Add a parameter for an integer, which is the second parameter passed
to the function, and set its parameter type to long and its passing type
to Normal.
Add a parameter for deptname, the first element of the DEPARTMENT
structure, and set its parameter type to string pointer and its passing
type to First element of a structure.
Add a parameter for deptnum, the second element of the DEPARTMENT
structure, and set its parameter type to string pointer and set its
passing type to Contained within structure.
193
5: WISESCRIPT ACTIONS
Check Configuration
The Check Configuration script action can test the hardware configuration,
operating system, and certain other characteristics of the destination
computer. As a result of this check, the action can display a message, abort
the installation after displaying a message, or start a conditional block.
194
Usage
195
5: WISESCRIPT ACTIONS
Message Text. The text of the message displayed by this action. If you
do not specify a message, no message is displayed.
Technical Note:
Checking for “Share Loaded” opens a temporary file and attempts to lock
a section of it. This detects all versions of DOS SHARE, Windows VSHARE,
Windows NT/2000/XP, and Windows 95/98. Checking for “VGA or better”
graphics makes sure display resolution is at least 640x480. Checking for free
memory tests the amount of memory (including virtual memory) available at
installation time. If the end user is running many background processes, the
amount of free memory is reduced. You might choose to instruct end users to
run the installation while they are running any other programs they usually use,
including DOS TSRs, and with their typical SMARTDRV settings. This way the
installation can determine with a reasonable degree of accuracy whether the
end user has enough memory to run your software under normal
circumstances.
Example
To read about a script that demonstrates this action, see Checking for 256
Color Display on page 411 or Checking Disk Space by Calling a Windows
.DLL on page 411.
196
If an installation contains no optional components, all fields in this action’s
dialog should usually be left blank. The Wise Installation System still
checks to make sure sufficient disk space exists for the standard portion of
the installation, even taking into account the cluster size of the disk.
Usage
197
5: WISESCRIPT ACTIONS
the Extra Space field to the right. See Modify Component Size on
page 262.
Do not cancel during silent installation. If the installation is being
run in silent mode, the installation would ordinarily be canceled if
insufficient disk space were available. There would be no error message,
because the installation is, after all, running in silent mode. If this
checkbox is marked, installation always continues during a silent
installation regardless of the amount of free space, although a message
is placed in the Install.log file.
Example
To read about a script that demonstrates this action, see Letting the User
Choose Subcomponents During Installation on page 406.
The Check HTTP Connection action determines whether a given URL is valid
or not. It attempts to open a connection to the URL by downloading the
HTML page. This script action uses the WinSock.dll to make the connection.
You specify both Win16 and Win32 error variables because until the
connection is attempted, you don’t know which WinSock.dll is used. A
Win16/32-bit installer .EXE first attempts the connection using the Win32
WinSock.dll, and if that fails, it attempts the connection using the Win16
WinSock.dll. A true Win32 installer uses only the Win32 WinSock.dll. If the
download is successful, the Win32 or Win16 Error Number Variable is set to
0, which indicates success. If an error occurs, the Error Number Variable is
set to another error code, and the Error Text Variable is set to a string that
describes the error return codes. The error return codes and the error
string come from the APIs that are called to attempt the download. A
sample of the return string is:
ProxyServer=
ProxyIgnore=
ProxyPort=80
ProxyType=CERN
WinInetText=
WinInetError=0
WinSockError=11001
198
This indicates that no proxy server was used and that WinSock returned
the error code 11001.
Technical Note:
Some Web servers redirect invalid pages to another Web page internally. In
that case no error is detected because the Web server reports that the Web page
was found.
In the Check HTTP Connection dialog, specify the URL you want to check,
then specify variables to hold any error numbers and error text that are
returned.
URL to Check. Enter the URL to be checked. You must include the
“http://” in the URL path.
Win32 Error Text Variable. Select a variable to hold the error text
returned by the 32-bit winsock.dll.
Win32 Error Number Variable. Select a variable to hold the error
code returned by the 32-bit winsock.dll.
Win16 Error Text Variable. Select a variable to hold the error text
returned by the 16-bit winsock.dll.
Win16 Error Number Variable. Select a variable to hold the error
code returned by the 16-bit winsock.dll.
199
5: WISESCRIPT ACTIONS
If. Determines whether this action checks for the presence or absence
of a file, a directory, or either. You can also test to determine if a
directory is writable or whether a .DLL module is loaded.
Pathname. The pathname of the file or directory to be tested. Wildcard
characters, such as *, are not permitted. Use variable substitution to
specify the pathname (for example, by including %WIN% at the
beginning of a path as an abbreviation for the Windows directory)
because these variables are set automatically and they reflect the actual
path to that directory on the destination computer.
Title. The title of the message displayed by this action.
Message Text. The text of the message displayed by this action. If you
do not specify a message, no message is displayed.
Action. Determines what action to take when the specified file or
directory is found (or is not found, if you are checking for the absence of
a file or directory), or when a directory is found not to be writable.
• Display Message Only. Displays a message with the title and
message specified.
• Abort Installation. Displays a message with the title and message
specified, then aborts the installation.
• Start Block. Begins a conditional block. All actions between this
action and the next Else or End action are executed.
200
• Start While Loop. Begins a loop block. All actions between this
action and the next End action are executed repeatedly as long as
the condition is true.
Perform loop at least once. If you chose the Start While Loop action,
this checkbox determines whether the body of the loop is executed once
before the test is performed. If the checkbox is cleared, the loop is
executed if the condition is true, but is not executed if the condition is
false. If the checkbox is marked, the loop always executes at least once.
To read about a script that demonstrates this action, see Prompting the
User to Insert a Floppy Disk on page 400.
Variable. Enter the name of a variable in which to put the result of this
test. This can be a variable you defined earlier in your script, or you can
create a new variable by entering a variable name here. After the script
runs the Check In-use File action, the variable contains one of the
following values: In-Use, which means the file is in use, Not In-Use,
which means the file is not in use, or Non-Existent, which means the file
could not be found.
Pathname. Enter the pathname of the file you want to check. You can
use variables to build the pathname.
201
5: WISESCRIPT ACTIONS
Check Service
The Check Service script action lets you check to see if a particular service
is running on the destination computer. You can check services on Windows
3.51, Windows NT 4.0, Windows 2000, and Windows XP systems. If you try
to check services on another operating system, the Check Services script
action always returns the result of Unknown because other operating
systems do not have services.
Usage
In the Check Service Settings dialog, you enter the service name and a
variable in which to put the service status. Services can be stopped and
started, and paused and continued, either by clicking the Stop, Start,
Pause, and Continue buttons in the Services control panel or by calling
.DLL functions. Each operation takes time to implement, so the status of a
service, in addition to being started or stopped, can be in an in-between
state, referred to as pending.
202
Example
Your software might require the presence of a particular service in order to
run properly. You can use the Check Service script action to ensure that the
required service is installed and running before continuing to install your
software.
Usage
203
5: WISESCRIPT ACTIONS
Example
To read about a script that demonstrates this action, see Creating an
Installer That Can Be Customized During Compile on page 395 or follow
the procedure in Building a Debug Version on page 164.
204
Source Name. Enter the name of the ODBC data source. This name is
displayed in the ODBC data sources list on the destination computer.
Click the Import button to import an existing ODBC data source from
your computer, which populates the relevant fields automatically.
Driver Name. Enter the name of the ODBC driver used by this data
source. The driver, along with its support files, must already have been
installed.
Install Data Source for. Choose whether you want to install the ODBC
data source for use with Win16 or Win32 APIs.
Data Source Attributes. Enter the data source attributes here. The
easiest way to obtain them is to copy them from the ODBC.INI file in the
Windows directory.
Display Configuration Dialogs. If this checkbox is marked, the
installation displays configuration dialogs that let the end user configure
the source for use on their computer system. Otherwise, the data
source is installed silently, without end user intervention, using default
settings.
System DSN. Mark this checkbox to make the data source available to
all user accounts on the destination computer.
205
5: WISESCRIPT ACTIONS
Configure BDE
The Configure BDE script action configures the Borland Database Engine
during installation. If the IDAPINST.DLL Pathname and IDAPI Config.
Template (contains the IDAPI.CNF file) fields are blank, the BDE uses the
default values. This script item is normally called twice, once to read the
default values for where BDE should be configured, and again to actually
configure BDE given the locations you specify. The two files above are used
during the installation process; after that they’re not needed.
The database actions are advanced features. You should already know
about BDE or ODBC before attempting to use these actions. The Wise
Installation System helps you install database runtimes, but you should
always check the Runtimes page on the Wise Solutions Web site for
updates before installing runtime files. You should first select the runtimes
you want on one of the runtime pages in Installation Expert, then modify
the generated script. Adding this functionality to a script from within Script
Editor requires advanced knowledge of either BDE or ODBC. You should use
the BDE Runtime page to configure BDE.
Existing Config. Variable. The variable named in this field stores the
full pathname of the existing IDAPI.CFG (or ODAPI.CFG) file. If no
existing IDAPI configuration file exists, the variable is empty.
206
Config. Directory Variable. When the IDAPINST.DLL Pathname
field is empty, this variable receives the default directory for the
IDAPI.CFG file. When the IDAPINST.DLL Pathname field is filled, the
IDAPI.CFG file is created in the specified directory.
Config. File Name Variable. If an existing IDAPI configuration file
exists, its name is placed into this variable. The file name in this field is
used to create a new IDAPI configuration file.
Lang. Directory Variable. This field holds the directory where the BDE
Language Drivers are installed on your computer.
DLL Directory Variable. This variable receives the default location for
the BDE .DLLs. This is normally C:\IDAPI or the existing location of the
BDE .DLLs.
Returned Error Variable. If an error occurs during the configuration of
BDE, a string describing the error is placed in the specified variable. This
variable can be displayed to the end user with the Display Message
script item.
IDAPINST.DLL Pathname. This field holds the pathname of the
Idapinst.dll file. This file must be installed for BDE to be configured. This
file is normally placed into the %TEMP% directory and removed at the
end of the installation. If this is blank, then the Wise Installation System
fills the fields above by reading from the system. If it’s not blank, then it
uses the value of those fields to actually configure BDE.
IDAPI Config. Template. The IDAPI.CNF file is used during the
installation to provide default values for BDE. This file must be installed
prior to BDE configuration. This file is normally placed in the %TEMP%
directory and removed at the end of the installation.
BDE Type. Select whether BDE for Win16 or BDE for Win32 is being
installed using the drop-down list.
Win16 Variable. This variable is blank if the BDE configuration file
supports only Win32 applications. If you plan to run both Win16 and
Win32 BDE applications, you should set the variable to A.
Language Number. This field holds the language number of the
installed language resource file. If you want the language to be English,
leave this field as is. If you want another language, enter one of the
following language numbers: English: 0009; Danish: 0006; French:
000c; German: 0007; Italian: 0010; Norwegian: 0014; Portuguese:
0016; Spanish: 000a; Swedish: 001d. Another way to specify a
language is to change the compiler variable _BDEWIN32LANG_ on the
Compiler Variables page. Check the BDE help file (BDE32.hlp) for details
on language numbers. Make sure the language resource file gets
deployed on the destination computer.
207
5: WISESCRIPT ACTIONS
Note:
If you enter the wrong language number, your installation fails with a
merge error.
The Copy Local File(s) script action is used to copy uncompressed files
from a floppy disk or CD-ROM during installation. It can even copy files
from the destination computer, from a network, or from an FTP or HTTP
server. However, it cannot handle wildcards for files copied from an FTP or
HTTP server. Before you use Copy Local File(s) to copy files, you must be
sure the files exist and are named as you expect.
208
Usage
209
5: WISESCRIPT ACTIONS
Path field, this field should contain a directory path. Start this path with
%MAINDIR% to copy files to the installation directory.
Description. The text you enter here is displayed in the progress bar
while the files are being copied.
Local Path. A hard-coded path that specifies the location of the files on
your computer at compile time. Filling in this field enables the progress
bar to update correctly based on file size during installation. If you plan
to use wildcards to copy multiple files, see the guidelines in the
description of the Source field above.
Require Password. If a password for the installation has been supplied
in Installation Expert, and this checkbox is marked, the end user is
prompted for a password before this file is installed.
The password prompt appears only once during installation, regardless
of the number of password-protected files being installed. It appears
only for the first password-protected file in an installation. If the end
user has chosen an installation configuration that does not include any
password-protected files, the password prompt does not appear.
Include Subdirectories. If a directory is entered as the Source,
marking this checkbox causes the installation to copy any files in sub-
directories of that directory as well.
Shared DLL Counter. If this checkbox is marked, and the file is a .DLL
or .VBX, it is entered in the registry so that Windows tracks which
installed applications use it and prevents it from being removed if it is
needed.
No Progress Bar. Marking this checkbox causes the progress dialog to
be hidden while this file is being copied. This is useful when you’re
installing a few small files that only require a second or two.
Self-Register OCX/DLL/EXE/TLB. All .OCXs and .TLBs as well as
some .DLLs and .EXEs support self-registration. If this checkbox is
marked, the file registers itself in the Windows registry before it is used.
The Copy Local File(s) action does not actually register the file, but
merely records that it should be registered later. You should include a
Self-Register OCX/DLL script action to actually register the item at the
completion of the installation. See Self-Register OCXs/DLLs on
page 281. If this action is not included, registration is performed
automatically at the completion of installation.
Don’t Convert to Floppy. If Convert CD-ROM to Floppy is marked
on the Build Settings page in Installation Expert, this file will not be
affected.
Replace Existing Files. Select an option to determine how to handle
the installation of files that already exist on the destination computer.
210
• Always. The new file always replaces the old file.
• Never. The file is never installed if it already exists. Use this for
files, such as configuration files, which should be installed if they are
not present, but which might be customized by the end user and
should therefore not be replaced on re-installation.
• Check File. The File Version and File Date/Time drop-down lists
become available. The existing file is only replaced if the
requirements set in both fields are true.
Doesn’t Matter. Select this option for a field if you only need
one of the two requirements, File Version or File Date/Time,
to be fulfilled for the existing file to be replaced.
Same or Older. (File Version) Replace the existing file if it has
a version resource, and if it is the same as or older than the new
file. If the existing file does not have a version resource, the new
file is not installed.
(File Date/Time) Replace the existing file if its modification
date and time are the same or older than the new file.
Older. (File Version) Replace the existing file if it has a version
resource, and if it is older than the new file. If the existing file
does not have a version resource, the new file is not installed.
(File Date/Time) Replace the existing file if its modification
date and time are older than the new file.
Retain duplicates in path. Normally, version-checking removes
existing copies of a .DLL that are found in the path directory list, to
ensure that the path list only contains a single version of the .DLL. You
can suppress this feature by marking this checkbox.
Example
To see how you can use this action to copy files from the Internet, see
Downloading a File from a Web Site During Installation on page 408.
Create Directory
The Wise Installation System automatically creates directories as they are
needed during installation. Use the Create Directory script action to create
empty directories.
211
5: WISESCRIPT ACTIONS
Create Service
The Create Service script action gives you the ability to install a service on
a Windows NT, Windows 2000, or Windows XP system. A service is a
specially written application that can be set to run in the background and
to start up automatically. If your software is uninstalled, the service is
removed during the uninstall process. Consult your Windows developer
documentation for information on creating applications that run as
Windows services.
212
Service Name. The internal service name. This name is used internally
by the service to register itself properly in the registry, and thus this
value must match a value stored within the executable or .DLL that is
the service.
Display Name. The name that appears in the Services control panel.
Executable Path. Specify the complete path to the executable file that
is the service. If a long file name contains spaces, you do not have to
enclose the path with quotation marks. You can use variable substitution
to build a pathname.
Login Username. The user name under which the service should run.
Login Password. The password for the user name defined above.
213
5: WISESCRIPT ACTIONS
Service interacts with desktop. Mark this checkbox to let the service
display its user interface, if any.
214
Create Shortcut
The Create Shortcut script action lets you create a shortcut on Windows
95, 98, Me, 2000, NT 4.0, and XP operating systems. You can use this
action to add shortcuts to the desktop or Start menu.
Source Path. The full path of an existing file. Enter a pathname, click
Browse to select a file from your installation, or use variable substitution
to build a pathname. For instance, start the path with %MAINDIR% to
point to the installation directory. Do not enclose the source path in
quotes because WiseScript adds quotes automatically.
Destination Path. The path to the new shortcut file. The path should
end in .LNK. To create a shortcut in the Start menu or on the desktop,
first read the appropriate directory names from the registry into a
variable, then use variable substitution to specify the appropriate
directory here. The following keys might be useful.
• Programs.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
\Explorer\Shell Folders\Programs
• StartUp.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
\Explorer\Shell Folders\StartUp
215
5: WISESCRIPT ACTIONS
• Desktop.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
\Explorer\Shell Folders\Desktop
Command Options. If the shortcut is to an .EXE file, you can enter
command line options for the program here.
Default Directory. Enter the default directory that should be set when
launching the application, if not the directory the application is in. Use
%MAINDIR% to substitute for the directory the application is being
installed in, rather than hard-coding a pathname. If you view the
Properties dialog for this shortcut in Windows Explorer, this field is
referred to as the Start in directory.
Description. Enter a description for the shortcut that can be read by
MS-DOS programs.
Icon Pathname. Enter a pathname, click Browse to select a file from
your installation, or use variable substitution to build a pathname. This
field specifies the icon to be used for the shortcut if you do not want to
use the source file’s original icon.
Window Size. Choose to have an .EXE file open in its default window, a
maximized (full-screen) window, or minimized.
Icon Number. Enter the number of the icon to use from the file
selected in the Icon Pathname field above.
Technical Note:
An executable or icon file can have multiple icons contained within the
file. To see the icons in a file, go to Windows Explorer, right-click any shortcut
file, and select Properties. Click the Shortcut tab, then click the Change Icon
button. The Change Icon dialog appears. It contains a graphical list of icons for
the shortcut file you right-clicked. The icon number of the first icon is 0, the
icon number for the second is 1, and so on. To see the icons in a different file,
click Browse and choose a different file.
216
Check self-repair items when this shortcut is opened. This
checkbox turns on self-repair functionality for this shortcut. Typically,
you turn this checkbox on for a shortcut that launches your application.
To use this feature, you must configure your installation for self-repair.
See Automatic Self-Repair on page 35 for a description of how to set up
self-repair.
Custom Billboard
Use the Custom Billboard script action to create scalable images to display
to end users while the installer is running. For details on creating and
editing images using the Custom Billboard editor, see Creating Custom
Billboards on page 337.
Billboards are the images that appear in the background of an installer
while installation is taking place. They are typically used to convey useful
tips, new features, and marketing information to end users while they are
waiting for the installation to finish.
Custom Dialog
Use the Custom Dialog script action to create your own dialog or dialog set.
For details on creating and editing dialogs and dialog sets, see Creating
Custom Dialogs on page 293.
If you want to add a dialog inside the default wizard loop, go to the Dialogs
page in Installation Expert and add a new dialog by clicking the Add
button. If you create a new dialog from the Dialogs page, the new dialog is
automatically the same size as the other dialogs, and its Back and Next
buttons are pre-configured to correctly handle click events. If you create a
new dialog from scratch within a wizard loop in Script Editor, you must
configure these settings yourself.
To read about scripts that demonstrate this action, see Using Custom
Dialog Examples on page 400. For details on the dialog Properties dialog,
see Setting Dialog Properties on page 299.
217
5: WISESCRIPT ACTIONS
Delete File(s)
To remove files on the destination computer, use the Delete File(s) script
action. Use this script action to delete files that you’ve copied during the
current installation, or to delete files from a previous version of your
software, or to delete any other files from the destination computer.
If you used an Install File(s) script action to place a temporary file in the
Windows Temp directory, you should use this script action to remove it.
However, if you used the Get Temporary Filename script action to create a
temporary file, you do not need to delete it because it is automatically
deleted when the installation has finished.
218
Display Billboard
Use the Display Billboard script action to display graphics, referred to as
billboards, on the screen during installation. You can display up to sixteen
256 color or true color bitmaps simultaneously. If you plan to display
multiple images at the same time, make sure all of them use the same
color palette. You can create scalable billboards with the Custom Billboard
Editor. Scalable billboards shrink and grow proportionally (without jagged
edges) according to the size of the screen. See Creating Custom Billboards
on page 337. When you add the Display Billboard action, the Billboard
Settings dialog opens.
Usage
Pathname. Specify the path to the image files you want to display. This
is a path to the actual image file on your computer, which is compiled
into the installer .EXE.
X Position and Y Position. Indicates the location on the screen at
which the specified image should be positioned. Specify these
coordinates for a 640x480 screen. On screens with larger resolutions,
the billboard will be placed proportionately based on the 640 x 480
location.
Erase Num. This field determines how many of the graphics currently
being displayed should be erased before the new image is displayed. To
display only one image at a time, set this field to 1. The oldest image is
removed first.
219
5: WISESCRIPT ACTIONS
Place at Bottom. Mark this checkbox to place the image at the bottom
of the screen. Due to rounding errors inherent in the Windows MetaFile
format, this option might be slightly inaccurate when used with custom
graphics that have been scaled to the screen.
Tile Background. Mark this checkbox to repeat the graphic edge-to-
edge to fill the entire screen.
Erase All. Mark this checkbox to remove all previous graphics from the
screen before displaying the new one.
Timed Display. Mark this checkbox to automatically display a series of
graphics at evenly-spaced intervals during installation. Display time is
calculated by the installer .EXE based on the number of files to be
displayed. Place all Display Billboard actions before the first Install
File(s) action if you are using Timed Display.
Local Graphic. Normally, graphics are copied to the installer’s .EXE.
Enter a pathname here (typically beginning with the %INST% variable
substitution to specify the directory containing the installer’s .EXE) to
indicate that the graphic to be displayed is in a separate file. This can be
useful to allow you to change graphics without having to rebuild the
.EXE.
220
Example
To read about a script that demonstrates this action, see Creating an
Installer That Can Be Customized During Compile on page 395.
Display Message
Use the Display Message script action to display a message to the end user
and to specify whether part of your script is executed based on the end
user’s response to the message. Normally, the message dialog includes OK
and Cancel buttons; OK continues the installation, and Cancel aborts the
installation.
You can also turn the Display Message script action into an If statement,
which lets your script execute different code according to end user input. If
you mark the Start of Block checkbox, the message dialog contains a Yes,
No, and Cancel buttons. If the end user clicks Yes, the script lines after the
If Display Message script line are executed; if the end user clicks No, the
script lines are not executed; if the end user clicks Cancel, the installation
is aborted.
Usage
Message Title. Enter the text to be displayed in the title bar of the
message dialog.
221
5: WISESCRIPT ACTIONS
Note:
The Display Message script action is ideal for helping you to debug and test
your script. You can add this action anywhere in your script to display the value of a
variable; just enter %VARIABLE_NAME% in the Message Text field of this dialog,
and when you run the installer, the message dialog appears with the value of the
variable. See Building a Debug Version on page 164 for more information.
Example
To read about a script that demonstrates this action, see Checking Disk
Space by Calling a Windows .DLL on page 411.
222
Remove previous progress messages. If this option is marked, any
progress messages that are displayed during the installation are cleared
from the screen.
Display a new progress message. If this option is marked, the
installation displays a progress message during the installation.
• Message Title. Enter the title for the dialog that displays the
message.
• Message Text. Enter a brief message to be displayed during the
installation. You can include variable references.
• X-Position / Y-Position. Use these fields to specify the exact
location of the upper left corner of the progress message dialog on
the end user’s screen, in pixels.
• Height / Width. Specify the exact dimensions of the progress
message dialog in pixels.
• Center Horizontally. If you want the progress message dialog to
be centered horizontally on the end user’s screen, mark this
checkbox. Marking this checkbox overrides any value you enter in
the X-Position field.
• Center Vertically. If you want the progress message dialog to be
centered vertically on the end user’s screen, mark this checkbox.
223
5: WISESCRIPT ACTIONS
224
Edit INI File
Use the Edit INI File script action to edit your program’s private .INI files as
well as the WIN.INI and System.ini files. You should not use this action to
add device drivers to the 386Enh section of the System.ini file; use the Add
to System.ini action to make these changes. Editing System.ini that way
causes Windows to be restarted after installation. Editing with Edit INI File
does not force Windows to restart, and might corrupt the file.
225
5: WISESCRIPT ACTIONS
File. Enter the pathname to the file to be edited. The drop-down list
provides quick access to file names based on script variables (for
example, %MAINDIR%\NONAME.INI), which can easily be edited to
refer to the file you need to modify.
INI File Contents. Enter the modifications to be made to the .INI file.
Each line in this field is interpreted separately, as follows:
• Lines with text enclosed in square brackets (such as [Section]) tell
the installation to put the lines that follow in the indicated section of
the .INI file.
• If you include a section name with no entries after it, that section
and all its entries are deleted.
• Lines that start with a parameter name followed by an equals sign
(“=”) and a value indicate lines that should be added to the .INI file.
(For example, ProgPath=%PROGDIR%.) If the .INI file already
contains an entry for the specified parameter, the existing entry is
replaced.
• If you include a parameter name with no value (for example,
Progpath=), that entry is deleted if it exists.
• Comments, lines starting with “;”, are not allowed.
226
Edit Registry
The Edit Registry script action lets you add, edit, or delete keys or values in
the registry. You can either create registry entries by hand, or import a
registry file (.REG). In the Edit Registry Settings dialog, you specify what
keys and values to add. Once you click OK in the Edit Registry Settings
dialog, the Edit Registry script line is added to your script. You can edit the
registry settings by double-clicking on the Edit Registry script line and
editing the keys and values.
Usage
Registry Keys. The root registry keys, and the keys you have added,
are listed in the upper-left panel of the dialog.
Value Names. All names for values you have added or changed in the
selected registry key are shown in the upper-right panel of the dialog.
New Key. Click Key from this drop-down button to add a new key under
the key selected in the Registry Keys panel. The Registry Key Settings
227
5: WISESCRIPT ACTIONS
dialog opens, where you can enter information about the new key. See
Registry Key Settings Dialog on page 228.
You can click Import from this drop-down button to import a registry file
(.REG).
Note that by adding a key, you are not necessarily adding it to the
registry on the destination computer. Adding a key to the Edit Registry
action simply tells the installation that you plan to perform another
operation on it; the actual operation might be to add a value, to update
it, or to delete it and all its associated values.
Delete Key. Deletes the selected key and all its associated subkeys and
values from the current installation.
New Value. Adds a new named value under the selected key or subkey.
The Registry Key Settings dialog opens, letting you enter information
about the new value.
Delete Value. Deletes the selected named value from the Value Names
panel in your installation, telling the installation that you do not want to
modify that key after all.
Data Settings. The Data Settings panel contains editable information
about the selected key and value. The Value, Type, and Operation fields
available in this panel are the same as the fields of the same name in
the Registry Key Settings dialog. See Registry Key Settings Dialog on
page 93.
Repair application if this registry value is missing. Self-repair
prevents your application from failing if this registry value has
accidentally been deleted. Mark this checkbox to initiate self-repair if
this registry value is missing during application launch. The end user
must have access to the installation media to perform a repair, and you
must also configure a shortcut to your application with self-repair turned
on. To use this feature, you must configure your installation for self-
repair. See Automatic Self-Repair on page 35 for a description of how to
set up self-repair.
228
Operation. This field determines what operation is applied to the key
and/or its associated value.
• Create/update key and value. The value is updated if it already
exists, or if the key or value does not exist, it is created.
• Create empty key. Creates the key but does not add any values.
• Remove key and all subkeys. Deletes the key, its subkeys, and all
named values associated with the key and its subkeys on the
destination computer.
• Remove key and value only. Removes the named value from the
key on the destination computer. If the key has other named values,
they are preserved.
• Preserve existing key and value. Adds a new key or value if the
specified item does not exist, but leaves the existing value in place if
one already exists.
Root. The parent key in which the new key is added.
Key. The name of the new key. You can create multiple hierarchical keys
at once by separating them with backslashes, as in directory
pathnames. For example, a key of
NewDocument\Protocol\StdFileEditing creates the StdFileEditing
key inside the Protocol key, which is created inside the NewDocument
key. Any keys in the path that do not exist are automatically created.
Value Name. The name of a new named value.
Data Value. The data for the value. If the Data Type (below) is Double
word (DWORD), the data should be in decimal notation. To insert
multiple lines of data here, hold down the CTRL key and press the ENTER
key to begin a new line.
229
5: WISESCRIPT ACTIONS
Data Type. The type of data contained in the named value. Available
types are listed below. The associated Windows API data types are in
parentheses.
• String. (REG_SZ prefix) Indicates that a value entry is an
expandable string. If you want to embed a variable name, (such as
%WIN%), you must enclose it with double percents (%%WIN%%).
If you only enclose it in single percents, then the variable name is
expanded to its actual value. This allows Windows NT4/2000/XP
system variables to be embedded.
• Unexpanded string. (REG_EXPAND_SZ prefix) Identifies a value
entry as an unexpanded data string. If you want to embed a variable
name, (such as %WIN%), you must enclose it with double percents
(%%WIN%%). If you only enclose it in single percents, then the
variable name is expanded to its actual value. This allows Windows
NT4/2000/XP system variables to be embedded.
• Multiple strings. (REG_MULTI_SZ prefix) Identifies a value entry
as a multiple string. These are multiple pieces of text, separated by
carriage returns. This is only supported for installations on Windows
NT4/2000/XP.
• Double word. (REG_DWORD prefix) Identifies a value entry as a
32-bit (DWORD) entry.
• Binary/Hex. (REG_BINARY prefix) Identifies a value entry as
binary. Each byte should be separated by at least one blank space.
For instance: AD 30 C0 A9 40 20 A8 FC 4C 00 08.
• None. This is provided for compatibility with SMS Installer
installations; it behaves the same as the binary data type.
Repair application if this registry value is missing. Self-repair
prevents your application from failing if this registry value has
accidentally been deleted. Mark this checkbox to initiate self-repair if
this registry value is missing during application launch. The end user
must have access to the installation media to perform a repair, and you
must also configure a shortcut to your application with self-repair turned
on. To use this feature, you must configure your installation for self-
repair. See Automatic Self-Repair on page 35 for a description of how to
set up self-repair.
230
Example
To read about a script that demonstrates this action, see Running a
Program Once After Computer Restart on page 396.
Else Statement
The Else script action marks the beginning of a section of instructions to be
executed when the condition specified in the matching If action is false. It
takes no parameters; selecting it from the Actions list inserts it into the
script.
ElseIf Statement
Use the ElseIf script action inside an If block to check for another condition.
It marks the beginning of a block of code that is executed only if the
condition checked by the If is false, all previous ElseIfs are false, and this
ElseIf is true. You can use one If statement with multiple ElseIf statements
to check for multiple conditions. An ElseIf statement must be contained
inside an If block.
If Variable. Select the name of the variable involved in the test for this
conditional block or loop.
Comparison. To the right of the If Variable field, select an option to
determine how the variable is compared to the value.
• Equals, Not Equal. The value of the variable must or must not
equal the value given in the field.
• Equals (Ignore Case), Not Equal (Ignore Case). The value of
the variable must or must not equal the value given in the field. The
case of the value is ignored.
• Contains, Does Not Contain. The value of the variable must or
must not contain the text given in the Value field.
• Greater Than, Greater Than or Equal To. The value of the
variable must be greater than or equal to the value given.
• Less Than, Less Than or Equal To. The value of the variable must
be less than or equal to the value given.
231
5: WISESCRIPT ACTIONS
• Contains Any Letters In. At least one of the letters in the variable
must be found in the value given in the field. This comparison and
the next one are useful for testing the results of a Radio Button
Dialog action, which returns the buttons that were marked as a
series of letters.
• Contains Letters Not In. At least one of the letters in the variable
must not be found in the value given in the Value field.
• Length Equal To. The length of the text in the variable must equal
the value given below.
• Expression True. The expression in the Value field below is
evaluated according to the rules outlined in Variables and
Expressions on page 167. The variable name specified is ignored and
can be left blank. The result is considered true if it evaluates to a
non-zero result.
• Valid Password, Invalid Password. Evaluates to true if the value
entered matches the password entered on the Passwords page in
Installation Expert.
The Value. Enter the value to be used in the comparison, or an
expression if the drop-down list is set to Expression. If you enter
variable names in this field, do not surround them with percent signs
(%). If you enter compiler variables, then you still must surround them
with percent signs.
End Statement
The End script action marks the end of an If block or a While loop. It takes
no parameters, and selecting it from the Action list inserts it directly into
the script with no further dialogs or prompts.
232
Windows Installer installations only
This action appears only if you have installed Wise for Windows Installer after
installing the Wise Installation System.
Execute Program
The Execute Program script action lets your script run another .EXE file.
The .EXE file can be a file already installed on the destination computer, a
file you installed as part of your installation, or a file you provide on a
separate disk.
If the program you plan to execute is designed to pass back a return value,
the resulting return value is put into the variable %INSTALL_RESULT% and
the variable %PROCEXITCODE%. If the program passes back a return
value, you must mark the Wait for Program to Exit checkbox.
Usage
233
5: WISESCRIPT ACTIONS
Technical Note:
This script action uses the Windows ShellExecute call, which means that you
can open documents as well as applications. When your script opens a document,
the associated application is automatically launched.
In Windows 95, the Write.EXE program calls the WordPad.EXE program. If you have
instructed the script to wait until the program exits, call WordPad.EXE directly;
otherwise your script continues immediately without showing WordPad.EXE because
Write.EXE quits itself.
Example
To read about scripts that demonstrate this action, see Downloading a File
from a Web Site During Installation on page 408 or Prompting the User to
Insert a Floppy Disk on page 400.
234
Exit Installation
The Exit Installation script action exits the installation, first calling the
script stored in the Exit event area, accessible via the Event drop-down list
in Script Editor. No message is displayed to the end user with this script
action unless you also set the RESTART variable. You can set the exit code,
also called return code, of this installation within this action. If you deploy
this installation through Microsoft SMS, you have further options for Status
MIF files.
235
5: WISESCRIPT ACTIONS
Usage
File Name. Enter the name of the file to search for here. The file name
must not contain wildcard characters (*, ?).
Variable Name. Enter the name of the variable where the path to the
file should be stored if it is found.
Default Value. Enter the value the variable equals if the file is not
found in any of the searched directories. Leave this blank if you plan to
use an If action to determine whether the file was found.
If your goal is to install a new version of the file, you could specify the
location where the file is normally installed here. That way, if the file
was located in one of the path directories, the new version of the file
would be installed in the same directory. If the file was not installed, it
would be installed into a default location.
Search Directories. Enter the directories to be searched, with each
entry separated by a semicolon. You can use variable substitution in this
field. If this field is blank, the PATH environment variable is used.
Remove filename. Mark this checkbox to remove the file name from
the end of the returned path, leaving only the path to the directory
where the file was found. This does not apply to the default path. If you
mark this checkbox, do not specify a file name as the default.
Example
To read about a script that demonstrates this action, see Finding a File in
the PATH Environment Variable on page 396.
236
Get Environment Variable
The Get Environment Variable script action copies a Windows environment
variable to a script variable. Environment variables are listed in System
control panel; the System Variables list in the Environment tab of the
System control panel shows environment variables.
Usage
In the Get Environment Variable dialog, you specify which environment
variable to get, and in which variable to put its value.
237
5: WISESCRIPT ACTIONS
Example
You could use the Get Environment Variable to run a batch file or other
program in a DOS window from within the Wise Installation System. To do
this, you use Get Environment Variable to put the value of ComSpec into a
WiseScript variable; for instance, put it in %COMMAND%. ComSpec is a
Windows variable that holds the path to command.com, the DOS command
line environment. You can then use the Execute Program action to call
command.com.
To do this, in the Execute Program Settings dialog, enter %COMMAND% in
the EXE Path field, and enter the name of your batch file or program in the
Command Line field. Also add the /c as a command line option to cause
the command line window to close when your program finishes execution.
Technical Note:
In the default script generated by Installation Expert, this function is
performed by a Wizard dialog that reads the name and company from the registry.
238
Title. Enter the title for the dialog.
239
5: WISESCRIPT ACTIONS
Technical Note:
In the default script generated by Installation Expert, this function is
performed by a Wizard dialog, not a Get ProgMan Group script action.
The Wise Installation System reads existing group names via a DDE link to
the Program Manager. Most, but not all, Program Manager replacements
support this method of reading the group names.
Variable Name. Enter the name of the variable that holds the group
chosen by the end user.
240
Get Registry Key Value
The Get Registry Key Value script action gets the value of a registry key
and stores it in the specified script variable. The Get Registry Key Value
script action can read MULTI_SZ (multi-line) registry values. They are read
as a carriage return/line feed-separated list of lines.
Usage
Variable Name. The name of the script variable in which you want to
store the value.
Default Value. The value, if any, that should be stored in the script
variable if the specified registry database entry is not found.
Registry Key. The registry database key to be retrieved.
Value Name. If you are reading a named value from the Win32
registry, enter the value name. If you are reading the Win16 registry,
leave this field blank.
Root. If you are reading the Win32 registry, select the root key for the
registry tree that contains the value being retrieved. If you are reading
the Win16 registry, leave HKEY_CLASSES_ROOT selected.
Remove File Name. If the registry entry typically contains a path to a
file, and you want to obtain the path to the directory that contains the
file, mark this checkbox. This does not apply to the default path. If you
mark the Remove File Name checkbox, do not specify a file name in
the Default Value field.
241
5: WISESCRIPT ACTIONS
Example
To read about a script that demonstrates this action, see Launching a Web
Page from an Installer on page 408.
Usage
Variable Name. The name of the script variable in which you want to
store the retrieved value.
Retrieve. The kind of information you want to retrieve. The following
types of information can be obtained:
• Current Date/Time. Military-style (24 hour) date and time, in the
format MM/DD/YY HH:MM
• Windows Version. The version of Windows in #.# format (for
example, 3.10)
• DOS Version. The version of DOS in #.# format (for example,
6.22)
• K Bytes Available Memory. The amount of physical memory on
the destination computer
• File Date/Time Modified. The date and time the file specified in
the Pathname field was modified, in military (24-hour) MM/DD/YY
HH:MM format
242
• File Version Number. The version number of the file specified in
the Pathname field, in the format #.#.#.# (for example, 2.5.4.0).
If the file does not have a version resource, the response is blank
(no characters).
• Registered Owner Name. The user name entered when Windows
was installed. This is used to pre-fill the Branding / Registration
dialog.
• Registered Company Name. The company name entered when
Windows was installed. This is used to pre-fill the Branding /
Registration dialog.
• Drive Type for Pathname. The type of drive of the file or directory
whose path is in the Pathname field; N (network), H (hard disk), C
(CD-ROM), F (floppy or removable disk), R (RAM disk).
• First Network Drive. The letter of the first network drive, followed
by a colon. If there are no network drives, the response is blank.
• First CD-ROM Drive. The letter of the first CD-ROM drive, followed
by a colon. If there is no CD-ROM drive, the response is blank.
• Win32s Version. The version number of the currently running
Win32s system in #.# format, or blank if Win32s is not installed.
• Full UNC Pathname. The Universal Naming Convention pathname
of the resource.
• Installer EXE Pathname. The full pathname, including the file
name, of the installation currently executing.
• File Size (Bytes). The size of the file you specify in the Pathname
field.
• Volume Serial Number. The serial number of the disk drive
specified in the Pathname field.
• Volume Label. The label of the disk drive specified in the
Pathname field.
• Windows Logon Name. The Windows network logon name of the
person logged onto the destination computer.
• Service Pack Number. Returns the service pack number of the
operating system, if one exists.
• Current Date/Time (4-digit year). The current date and time on
the destination computer, showing a four-digit year.
• File Date/Time Modified (4-digit year). The date and time the
file in the Pathname field was modified, showing a four-digit year.
• Disk Free Space (KBytes). Returns the free disk space in kilobytes
on the disk specified by the Pathname field. In the Pathname field,
you can enter just a drive (C:\), or you can enter a pathname
243
5: WISESCRIPT ACTIONS
Example
To read about a script that demonstrates this action, see Making an
Installer Open Automatically (AutoPlay) on page 403.
Variable. The name of the variable in which to store the temporary file
name. Note that only a file name is generated; to refer to this file, you
should always prefix it with the %TEMP% variable extension. So if you
stored the temporary file name in a variable called %HELPFILE%, the
full path of the file would be %TEMP%\%HELPFILE%.
244
Get Windows Installer Property
The Get Windows Installer Property script action gets the value of a
property in the currently-running Windows Installer installation and puts it
into a WiseScript variable. It only appears if you install Wise for Windows
Installer on your computer after you install the Wise Installation System.
This script action is only relevant in a WiseScript that you plan to call with a
Windows Installer installation.
245
5: WISESCRIPT ACTIONS
Halt Compilation
The Halt Compilation script action immediately halts compilation of your
script. You should place it between Compiler Variable If and Compiler
Variable End statements; if you do not, your script never compiles. Use this
script action when you want to test for certain conditions before compiling
your installer.
Usage
In the Halt Compilation Settings dialog, you enter message text.
Message Text. Enter the message the end user sees if the compilation
is terminated.
Example
For instance, suppose you develop an installation script that uses certain
runtime files—if older versions of those runtime files are used, the resulting
installer could damage runtime installations on destination computers. On
your own computer, you can verify that you have the latest version of the
runtime files, but because your installation script might be compiled on
other computers, you need a way to prevent compilation if those
computers do not contain the correct runtime versions.
To solve this problem, you could add a Compiler Variable If/Else/End block.
Inside the compiler block, you first get the file version number of a key
runtime file using the file version checking option of a Compiler If
statement. Then, if the file version number is not the one your script
requires, you use the Halt Compilation script action to prevent compilation
with outdated files.
246
If Statement
This script action marks the beginning of a conditional block of script, an If
block. If the condition specified in the If action is true, the script lines
inside the If block are executed; if the condition is false, the script lines
inside the If block are not executed. The If block can also contain an Else or
several ElseIf actions that mark the beginning of actions to be executed
when the condition specified by the If is not true.
Usage
If Variable. Select the name of the variable involved in the test for this
conditional block or loop.
Comparison. To the right of the If Variable field, select an option to
determine how the variable is compared to the value.
• Equals, Not Equal. The value of the variable must or must not
equal the value given in the field.
• Contains, Does Not Contain. The value of the variable must (or
must not) contain the text given in the Value field.
• Greater Than, Greater Than or Equal To. The value of the
variable must be greater than or equal to the value given.
• Less Than, Less Than or Equal To. The value of the variable must
be less than or equal to the value given.
• Contains Any Letters In. At least one of the letters in the variable
must be found in the value given in the field. This comparison and
the next one are useful for testing the results of dialogs containing
radio buttons, list boxes, or checkboxes, which return letters to
indicate which options the end user selected.
• Contains Letters Not In. At least one of the letters in the variable
must not be found in the value given in the Value field.
• Length Equal To. The length of the text in the variable must equal
the value given below.
• Expression True. The expression in the Value field below is
evaluated according to the rules outlined in Variables and
Expressions on page 167. The variable name specified is ignored and
247
5: WISESCRIPT ACTIONS
Example
To read about a script that demonstrates this action, see Finding an
Application That Is Associated With an Extension on page 396. To read
about scripts that demonstrate evaluating expressions within an If
statement, see Performing Calculations on Integer Values on page 398 or
Parsing Strings Using Expression Operators on page 398. To read about a
script that demonstrates nested If, Else, and End statements, see Checking
an FTP Site for Newer Files on page 408.
Include Script
The Include Script action adds an additional script to the current
installation script. For easy switching between the scripts in your
installation, include scripts are displayed in tabs at the bottom of the Script
Editor window. When you compile, the entire include script is copied into
the calling script at the location of the Include Script script action, so the
result is a combination of the scripts, with the include script inserted into
the calling script. Use the Duplicate Files Report, on the Edit menu, to list
duplicate files.
Include scripts can help save time in developing installations, because you
can develop a library of WiseScripts that perform very specific functions,
like subroutines. You can re-use these specialized scripts in future
installations you create, and you can easily share them with colleagues.
To make an include script, choose Blank Script when you create a new
file, which gives you a totally blank script. You should start with a blank
script when building an include script; otherwise your include script
contains the default script, which is designed to perform an installation. If
you insert a default script inside your installation script, you will have two
wizard loops, two of every dialog, and so on. Include scripts typically have
248
just a few lines of code that perform very specialized functions, such as
calling an executable program or displaying a particular dialog. Only the
script itself is inserted into the calling script; any configuration in
Installation Expert is ignored, including compiler variables set on the
Compiler Variables page.
Usage
Example
This is an example of the line you might use in your script to include a
script:
Include Script C:\MyScripts\OpensWord.wse
This is an example of what a short include script might look like. They can
be much longer:
Execute %PROGRAM_FILES%\winword.exe
The script above contains only one line, but keep in mind that the script
can be whatever size you want. The only limitation is that the calling script
combined with the include script or scripts cannot be longer than 32,000
lines.
249
5: WISESCRIPT ACTIONS
New lines can be inserted in the file at an arbitrary line number, or you can
have the installation search the file to find a particular piece of text and
insert your new line before, after, or in place of the existing line. Either fill
out the Line Number field in the top section of the dialog, or fill out the
Search for Existing Text section of the dialog. Do not fill out both because
you can only do one or the other, search by line number, or search for
existing text.
Usage
File to Edit. Specify a pathname to the text file you want to edit or use
variable substitution to build a pathname.
Text to Insert. Enter the command line you want to add to the file. If
the line refers to a directory or file, use a full pathname built with
variable substitution (such as %MAINDIR% to specify the application’s
directory) so the path is correct regardless of the directory where the
end user installs your software.
Line Number. The line number at which the new line should be
inserted. Specify zero to append the command to the end of the file. The
Search for Existing Text panel in this dialog overrides any line number
specified here; the line number applies only when the text is not found
or when you do not specify any text.
Search for Text. Enter the text for which you want to search. The
installer scans the file looking for a line that begins with, ends with, or
250
contains the text (depending on the setting of the Match Criteria field).
If more than one line in the file matches, only the first is edited.
Comment Text. Enter the text to insert at the beginning of the line
when it has been found. This can be useful when you are replacing an
existing command with a new command and want to leave the existing
command in place but inactive. In this case, you should always set the
Insert Action drop-down to cause your new command to be inserted
before the existing line so that a subsequent installation finds and edits
the active command, not the commented-out line.
Insert Action. Select the action to be taken when a line containing the
specified text is found. You can either insert your new command before
the existing line, replace the existing line with your new command, or
insert your new line after the existing one.
Match Criteria. Choose whether the line must begin with, contain, or
end with the text entered in the Search for Text field.
Ignore white space. If this checkbox is marked, the search operation
ignores spaces and tab characters.
Case-sensitive. If this checkbox is marked, the search operation
distinguishes between uppercase and lowercase text.
Make Backup File. If this checkbox is marked, the installation makes a
copy of the file before editing it. The backup has the same file name
except with a number appended to the end. The backup is retained after
installation so that the end user can undo any changes made to it if they
cause problems.
Example
To read about a script that demonstrates this action, see Creating a
Connection Between a Database Client and Oracle Server on page 397 or
Manipulating a Text File on page 396.
Install DirectX
Use the Install DirectX script action to install DirectDraw, DirectSound, or
DirectPlay drivers by calling the Microsoft-provided DirectXSetup API call
within the DSETUP.DLL file. DirectX components can be installed only on
Windows 95/98 or Windows NT 4.0, or later.
If you deploy your installation from floppy disks, you must first install the
DirectX installation files (including an entire directory sub-tree of files) and
the DSETUP.DLL and DSETUP16.DLL files. Both must be in the same
directory as the installer .EXE. If your installation is on a CD-ROM, you can
simply run the installation from a directory on the CD-ROM. Use the
Runtimes page in Installation Expert. See Runtimes on page 97.
251
5: WISESCRIPT ACTIONS
252
Prompt when replacing audio/video drivers. If this checkbox is
marked, end users are prompted whether to replace their existing audio
and video drivers when DirectX installs new ones.
Restore audio/video drivers. The installation restores the original
default DirectX audio and video drivers.
Install File(s)
The Install File(s) script action installs files on the destination computer.
Each file or directory to be installed must have a separate Install File(s)
action. For this reason, it’s simplest to use Installation Expert to add files to
the installation, then, if necessary, switch to Script Editor to edit Install
File(s) script lines.
Note:
The results from an Install File(s) script action are put into a variable,
INSTALL_RESULT. See its description in Automatic Runtime Variables on page 419.
253
5: WISESCRIPT ACTIONS
254
Register OCXs/DLLs on page 281. If this action is not included,
registration occurs automatically at the end of installation.
Do Not Download With WebDeploy. This checkbox is available when
you click the Create Internet-based installation option on the WebDeploy
page. In an Internet-based installation, files are stored as separate files
in the same directory as the installation .EXE on the web server and are
downloaded only as they are needed.
To place the file into the installation .EXE rather than storing it as a
separate file, click the Do Not Download With WebDeploy checkbox.
Repair application if this file is missing. Self-repair prevents your
application from failing if this file has been deleted accidentally. Mark
this checkbox to initiate self-repair if this file is missing during
application launch. The end user must have access to the installation
media to perform a repair, and you must also configure a shortcut to
your application with self-repair turned on. To use this feature, you must
configure your installation for self-repair. See Automatic Self-Repair on
page 35 for a description of how to set up self-repair.
255
5: WISESCRIPT ACTIONS
256
Driver Name. The name of the ODBC driver used by this data source.
This driver, along with its support files, should be installed in the
directory returned in the Driver Pathname Variable.
The Import button is a convenient way to add an already-configured
ODBC driver with all its settings. Click this button to choose an existing
driver from the list of drivers installed on your computer.
Manager Pathname Variable. If you enter a variable name in this
field, the directory that the ODBC.DLL file should be installed to is stored
in the variable. If you are installing multiple ODBC drivers, only the first
Install ODBC Driver action needs to set this variable.
Driver Pathname Variable. Select a variable to which to store the
directory where the driver files should be copied.
Install Drivers For. Choose a Win16 or Win32 installation. The Win16
ODBC installation requires the Win16 version of ODBCINST.DLL; the
Win32 ODBC installation requires ODBCCP32.DLL.
Driver Attributes. Enter attributes for the installed ODBC drivers here
in ENTRY=VALUE format. This information is added to the ODBCINST.INI
file.
257
5: WISESCRIPT ACTIONS
Setup Name. This determines the name of the .CAB file(s) for this
component. All .CAB files are named according to the following
structure: [Setup Name.Processor Name.CAB]. If a Setup Name is not
assigned, the value of this field defaults to the name of the component.
Note:
Do not place an extension on the Setup Name value; if you do, the
installer generates an error message.
258
WiseUpdate offers you an easy method for updating your software on your
customers’ computers, ensuring that customers are always working the
most up-to-date version of your software. Based on settings you specify on
the WiseUpdate page in Installation Expert, WiseUpdate installs a small
client application along with your software. The end user can open this
client application from the Start menu, or you can place it in their Startup
group so that it opens at set intervals when the computer boots. The
WiseUpdate client checks for newer versions of your application at the Web
location you specified. If it finds a new installation, it downloads and runs
it. For more details, see Using WiseUpdate on page 373.
To use WiseUpdate, first fill out the WiseUpdate page in Installation Expert:
Do not include WiseUpdate client in this installation. Mark this
option if you do not want to use WiseUpdate in this installation.
Include WiseUpdate client. Mark this option to include WiseUpdate
functionality in this installation. This enables gives your application the
capability to be updated over the Internet the next time you release an
update. If you mark this, the WiseUpdate client executable is installed
into your main application directory with your software.
Then you can either fill out the rest of the WiseUpdate page, or you can
double-click the Install WiseUpdate Client action in Script Editor. The Install
WiseUpdate Client Settings dialog that appears, has the same settings as
the WiseUpdate page.
Host Address. Enter the Web server address where the WiseUpdate
Client looks for updated software. The WiseUpdate Client deployed on
the destination computer uses this information when it checks for
updates. The WiseUpdate Client communicates using HTTP, so the
259
5: WISESCRIPT ACTIONS
Note:
The Internet location you choose must be accessible through both the
FTP and the HTTP protocol—you use FTP (in the Distribution Wizard) to transfer
files to it, and your customers use HTTP (WiseUpdate Client) to read and
download files from it. See WiseUpdate Tips and Troubleshooting on page 387.
260
restarted or the end user logs into Windows. If the time interval has not
been reached, is simply runs silently, checks the time interval, and
quits. However, after the number of days you enter in this field have
elapsed, instead of running silently and quitting, it runs with its normal
interface and prompts the end user to check for updates.
Alternate Web Page. If, for any reason, the WiseUpdate client cannot
check for updates or download the installer, it opens the end user’s
browser to this Web page specified in this field. You might direct the end
user to a technical support page, a page that contains upgrade
information, or a page that discusses possible problems.
Start Menu Icon. Enter the name of a shortcut to the WiseUpdate
Client here. The shortcut appears in the Windows Start menu, giving
end users the option to check for updates whenever they want. To let
your end users know the function of this shortcut, give it a descriptive
name, such as “Update WidgetWare.” This name cannot contain special
characters such as /, :, *, or ?. If you leave this field blank, make sure
you mark the Add Client to Startup group checkbox so that the
WiseUpdate Client runs automatically.
Add client to StartUp group. Mark this checkbox if you want a
shortcut for the WiseUpdate Client to be added to the Windows Startup
group. If you place the WiseUpdate shortcut in the StartUp group on the
destination computer, the WiseUpdate Client runs silently every time the
destination computer is restarted or the end user logs into Windows. If
the time interval has not been reached, is simply runs silently, checks
the time interval, and quits. However, after the number of days you
enter in the Check Interval field have elapsed, instead of running
silently and quitting, it runs with its normal interface and prompts the
end user to check for updates.
261
5: WISESCRIPT ACTIONS
Open/Close Install.log
Use the Open/Close Install.log script action to control the writing of entries
into the installation log file, Install.log. Normally every file that is installed
is logged to the file. If you want to log only some of the files being
installed, you can stop logging at certain points and resume logging at
other points. If you fail to resume, no log file is created. Also use this
action to create a new installation log.
The uninstaller reads the installation log from bottom to top and reverses
every recorded action when it uninstalls. Therefore, to prevent the
uninstaller from undoing some actions, you prevent those actions from
appearing in the log by using the Open/Close Install.log action. Turn off the
installation log before the script actions you don’t want to be uninstalled,
then turn the log back on after those actions. See Add Text to Install.log on
page 178 for more information on editing the installation log.
262
Resume/Start writing entries into installation log. If this option is
marked, the action begins writing entries to an existing log.
Stop writing entries into installation log. If this option is marked,
entries are suspended until the next Resume/Start action. If the log is
not restarted by the end of installation, no log file is created.
Open new installation log. If this option is marked, a new installation
log is created. Enter the name of the new log in the field to the right.
The installation log’s default location and name are set on the
Installation Log page of Installation Expert. See Installation Log on
page 84. You can enter a pathname here using variable substitution; if
no pathname is entered, the log is written to the same directory as the
first installed file.
Parse String
The Parse String script action is used to split or edit a piece of text (which
can be obtained from a variable) and place the results in two new
variables. For example, if you are splitting a string at the first comma, the
part of the string before the first comma is placed in the first destination
variable and the remainder of the string, after the comma, is placed in the
second destination variable. You can also split a string at any arbitrary
character position.
263
5: WISESCRIPT ACTIONS
Usage
Source Value. The text to be parsed. You can use variable substitution
(using the %VARNAME% convention) in this field to incorporate the
values of one or more variables. If you want to include a literal %
symbol, use %%.
Pattern/Position. The substring or character position at which the split
is to occur. For example, if you want to split a comma-separated string,
you enter a comma here. The pattern can be any number of characters.
If you are splitting a string based on character position, enter the
desired character position starting with 1 for the first character in the
string.
Destination Variable 1,2. Enter the names of the variables to hold the
two strings resulting from this operation or choose them from the drop-
down list. Typically, the first variable holds text from the left part of the
string and the second holds text from the right part. See Operation,
below, for exact details on what information is placed in each variable.
Operation. Choose the operation to be performed.
• Split value at first occurrence of pattern. Finds the first
occurrence of the pattern in the source value, then places the text
on either side of it in the two destination variables.
• Split value at last occurrence of pattern. Finds the last
occurrence of the pattern in the source value, then places the text
on either side of it in the two destination variables.
• Split value at position from left. Places the first n characters of
the source value in the first destination variable, and the remainder
of the string in the second, where n is the value entered in the
Pattern/Position field.
264
• Split value at position from right. Places the last n characters of
the source value in the second destination variable, and the
remainder of the string in the first, where n is the value entered in
the Pattern/Position field.
• Trim Spaces. If this checkbox is marked, leading and trailing
spaces are removed from both destination variables.
Ignore Case. If this checkbox is marked, uppercase and lowercase are
considered equal for the purpose of matching the pattern.
Example
To read about scripts that demonstrate this action, see Finding a File on the
Destination Computer on page 395, Launching a Web Page from an
Installer on page 408, or Manipulating a Text File on page 396.
Pause
Use the Pause script action to temporarily stop a script from executing.
After the specified number of milliseconds, the script continues running.
You can use this script action to cause a billboard to display for a certain
number of seconds.
265
5: WISESCRIPT ACTIONS
File Type. Choose the kind of file to be played back, either .WAV or
.AVI.
Pathname. The pathname to the .WAV or .AVI file. Enter a pathname,
click Browse to select a file from your installation, or use variable
substitution to build a pathname. See Variables and Expressions on
page 167. If you are playing a file that is only used during installation,
you can use the %TEMP% substitution to play the file that was
previously installed in the Windows temporary directory.
X Position / Y Position. Indicates the location on the screen at which
an .AVI file should be played back. Coordinates should be specified for a
640x480 screen; coordinates are automatically adjusted proportionally
for the display resolution on the destination computer.
Use the Post to HTTP Server script action to cause your installation to post
information over the Internet to your organization’s Web server. You can
use it to record user registration information or other data. You must have
a CGI program or Active Server Page (.ASP) on the server that accepts
data sent by an HTTP POST operation and deciphers encoded characters.
The destination computer must have an Internet connection (such as Dial-
Up Networking) properly configured. If your target users might not have
this capability, you can put the Post action inside a conditional block that
asks the end user if they have Internet connectivity and if they want to
register over the Internet.
266
Destination URL. The URL (Uniform Resource Locator) of the CGI
program or ASP page that will accept the posted data.
Text to Post. The text to post should be one or more lines in the format
field=data, where field is the name of the field as it is expected by the
CGI program, and data is the data to be sent in that field. If a line does
not appear to contain a field name followed by an equals sign, it is taken
to be a continuation of the previous line, and the data on the two lines is
concatenated and sent with a single field identifier.
The field names might be the same as script variable names, but they
do not have to be. You can use the %VARNAME% convention to include
variables in the data to be sent. Use %% to send an actual % symbol.
Error Handling. Determines how errors in the posting operation are
handled.
• Ignore Errors. The script continues regardless of any errors.
• Abort Installation. The installation stops if the posting operation
cannot be completed.
• Start Block. The Post to HTTP Server action begins a conditional
block. All the statements between this action and the next End
statement are executed only in the event of an error.
267
5: WISESCRIPT ACTIONS
Dest. Variable. The variable that holds the name of the file or directory
selected.
Default Extension. The extension appended to the file name if the end
user does not enter one.
268
Filter List. Enter file specifiers for the types of files you want to display
in the dialog. End users can select the types of files they want to see
from a drop-down list. The format is illustrated in the Prompt for File
Name dialog: a textual description of the types of files, followed by a
semicolon, followed by a comma-separated list of wildcard specifiers for
those types of files (*.TXT for text files). Each line in this field is a
separate entry in the File Type drop-down list in the dialog.
Allow selection of multiple files. Mark this checkbox to allow end
users to choose multiple files by holding the CTRL or SHIFT key while
clicking in the file list.
Prompt if file does not exist. Mark this checkbox to display a
confirmation dialog if the end user enters the name of a file that does
not exist.
File must exist. Mark this checkbox to cause the script action to fail to
proceed until a file that exists has been specified.
Pathname must exist. Mark this checkbox to verify that the pathname
specified exists before proceeding.
Skip write permissions test. If you selected Save As for the Dialog
Type, the installer displays a Save As dialog when the end user enters a
file name. If you clear this checkbox, the installer attempts to create the
file that the end user specified in the Save As dialog to verify that the
end user has write permission to the directory. If you mark this
checkbox, the installer skips the file creation attempt.
Do not validate the pathname. Mark this checkbox to allow the Wise
Installation System to accept any specified pathname without checks of
any sort.
Display prompt if overwriting existing file. Mark this checkbox to
have your installation display a message if a file already exists on the
destination computer with the same name as a new file about to be
installed.
269
5: WISESCRIPT ACTIONS
Usage
Window Name. Enter a name for the window in which the prompt
appears, such as “Select Destination Directory.”
Description. Enter brief instructions here.
Prompt Name. Enter the label text to be displayed beside the text
input field in the dialog.
Default Value. Enter the text that should be displayed in the dialog
when it first appears. If the end user does not edit this text, it is
returned as their input.
Variable Name. Enter the name of the variable that holds the text
entered by the end user.
Directory. If this checkbox is marked, any trailing backslashes are
deleted from the end user’s input, so you can use it as a directory
pathname.
Confirm If Exists. If this checkbox is marked, and the end user enters
the pathname of a file or directory that already exists, they are asked to
confirm that they want to overwrite the existing file with the file to be
installed.
Example
To read about a script that demonstrates this action, see Performing
Calculations on Integer Values on page 398 or Parsing Strings Using
Expression Operators on page 398.
270
Radio Button Dialog
The Radio Button Dialog script action lets you display a collection of up to
ten mutually exclusive options to your end users, presenting them as a
group of radio buttons. Only one button can be chosen. The button
selected by the end user is returned as a letter: A for the first radio button,
B for the second, and so on. This script action is included to provide
backward compatibility for WiseScripts created in earlier versions of the
Wise Installation System. You can use custom dialogs to perform the same
function.
Dest. Variable. Enter the name of the script variable that stores the
letters corresponding to the button the end user chooses. If your script
sets this variable to a letter before the dialog is displayed, the
corresponding button appears selected when the dialog appears to the
end user.
Description. Enter instructional or explanatory text to be displayed in
the dialog above the radio buttons.
Component List. Enter the available choices, one on each line,
pressing ENTER after each.
271
5: WISESCRIPT ACTIONS
INI Pathname. The path to the .INI file to be read. Enter a pathname,
click Browse to select a file from your installation, or use variable
substitution to build a pathname. For example, begin the pathname with
%WIN% to specify that the file is in the Windows directory, so the script
works regardless of the actual Windows directory pathname on the
destination computer.
INI Section. INI files can be divided into “sections” by including
markers enclosed by square brackets. (Brackets are “[” and “]”
characters.) Enter the name of the section that contains the entry you
want to read, without the brackets.
INI Item. The name of the entry you want to read from the .INI file.
Default Value. The value, if any, that should be stored in the script
variable specified below if the specified entry is not found in the .INI file.
Variable Name. The name of the script variable in which the value
obtained should be stored.
Remove File Name. If the .INI entry typically contains a path to a file
name, and you want to obtain the path to the directory that contains the
file, mark this checkbox. This does not apply to the default path. If you
mark the Remove File Name checkbox, do not specify a file name in
the Default Value field.
272
Read/Update Text File
The Read/Update Text File script action begins a loop designed to read and,
optionally, update the lines of text contained in a text file. Each repetition
of the loop brings a new line of text into the specified variable; the
instructions inside the loop can be used to change the contents of the
variable. The changed contents of the variable can then be written back to
the file. When there are no more lines left in the file, the loop ends. As with
a While loop, mark the end of the Read/Update loop with an End action.
Usage
Example
To read about a script that demonstrates this action, see Manipulating a
Text File on page 396.
273
5: WISESCRIPT ACTIONS
Technical Note:
The Read/Write Binary File action does not support reading or writing non-
ASCII characters (characters with codes above 127).
274
Reboot System
The Reboot System script action reboots the destination computer and
exits the installation at that point.
275
5: WISESCRIPT ACTIONS
Register Font
The Register Font script action registers a new TrueType font (.TTF file) that
has been copied into the Windows font directory.
Font File Name. Select a font from the drop-down list or enter the file
name of the .TTF font file (not the full pathname) to be added to the
system. The drop-down list contains any font files that you have added
to your installation using the Files page in Installation Expert. The file
must already have been installed in the font directory, and the font’s file
name must match its internal name.
Font Name. Enter the full name of the font here. The name you enter
here appears in Font menus on the destination computer. It is added to
the Fonts section of the WIN.INI file. Under Windows 95 or later, the
font is added to the registry.
Remark
The Remark script action is a documentation tool; it is not processed, but
provides a place for script developers to write notes to themselves and to
others who might read and maintain their scripts.
Script Editor displays remarks in green by default; however, you can
change this color in Preferences. See Setting Preferences on page 43.
Comment. Enter the comment here. To insert a blank line into your
script, leave this field blank and click OK.
276
Rename File/Directory
Use the Rename File/Directory script action to rename a file or directory on
the destination computer. This can be a file or directory that existed prior
to your installation, or a file or directory that your installer placed on the
destination computer. The file must not be in use for this script action to
work.
Old Pathname. Specify the full path to the existing file or directory. You
can use variable substitution to build a pathname. For instance, start
the pathname with %MAINDIR% or %WIN% to refer to files in the
installation directory or the Windows directory. If you click Browse, you
cannot choose a directory, only a file.
New File Name. The new name for the file or directory. Do not specify
the entire pathname, only the file name or directory name.
277
5: WISESCRIPT ACTIONS
Usage
File Name. Enter the name of the file for which to search. The file name
can contain wildcard characters (*, ?). If you choose Directory given
by File Name field in the Drives to Search field, then you must
include the directory pathname here.
Variable Name. Enter the name of the variable where the path to the
file is stored if it is found.
Default Value. Enter the value you want the variable listed above to
receive if the file is not found on any of the searched drives. Leave this
blank if you plan to use an If action to determine whether the file was
found.
If your goal is to install a new version of the file, you could specify the
location where the file is normally installed. That way, if the file is
located elsewhere on the destination computer, the new version of the
file would be installed in the same directory. If the file was not installed,
it would be installed into a default location.
Message Text. Enter a brief message to be displayed while the search
operation is in progress.
Return Type. You can choose to return only the first match, or a
carriage return/line feed-delimited list of all matches.
Drives to Search. Choose to search local drives, network drives, or
both. You can also choose to search the directory path specified in the
File Name field.
Search Depth. Specify how deeply into subdirectories the search
should look. A depth of 1 searches only the root directory, a depth of 2
278
searches the root directory and any subdirectories in it, and so on. A
depth of 0 searches the entire drive.
When searching network volumes, limit search depth to 2 or 3 if you
want to avoid a long wait for the end user. If a search to this depth does
not find the file, you can add extra script actions to ask the end user to
manually locate the directory containing the file. See Browse for
Directory on page 185.
Remove File Name. Mark this checkbox to remove the file name from
the end of the returned path, leaving only the path to the directory
where the file was found. This does not apply to the default path. If you
mark the Remove File Name checkbox, do not specify a file name in
the Default Value field.
Example
To read about a script that demonstrates this action, see Finding a File on
the Destination Computer on page 395.
Select Components
The Select Components script action lets you display up to ten optional
installation components to your end users, presenting them as a group of
checkboxes. Any number of these checkboxes can be marked. The
checkboxes marked by the end user are returned as a series of letters: A
for the first checkbox, B for the second, and so on. This script action is
included to provide backward compatibility for WiseScripts created in
earlier versions of the Wise Installation System. You can use custom
dialogs to perform the same function.
279
5: WISESCRIPT ACTIONS
Technical Note:
In scripts generated by Installation Expert, this function is performed by a
Wizard dialog, not a Select Components script action.
280
Self-Register OCXs/DLLs
When an .OCX, a .DLL, or an .EXE file is installed, you can queue it for self-
registration. See Install File(s) on page 253. Use the Self-Register OCXs/
DLLs script action to self-register all queued .OCX, .DLL, and .EXE files. You
can also use it to add an existing file to the queue.
281
5: WISESCRIPT ACTIONS
Usage
Control Name. This drop-down list contains the names of all the
controls in the current dialog. Select the control you want to manipulate.
Use Custom Dialog Editor to name all controls that you want to
manipulate with script actions. To name a control, right-click the control,
select Control Properties, and, in the dialog that appears, enter a name
in the Control Name field.
Operation. Choose from Show/Enable Control, Disable Control, and
Hide Control.
Example
To read about a script that demonstrates this action, see Configuring a
Dialog to Handle Mouse Events on page 400.
Usage
Control Name. This drop-down list contains the names of all the
controls in the current dialog. Select the control you want to change.
282
Use Custom Dialog Editor to name all controls that you want to
manipulate with script actions. To name a control, right-click the control,
select Control Properties, and, in the dialog that appears, enter a name
in the Control Name field.
Control Text. Enter new text to associate with the control.
Example
To read about a script that demonstrates this action, see Configuring a
Dialog to Handle Mouse Events on page 400.
Usage
Control Name. This drop-down list contains the names of all the
controls in the current dialog. Select the control you want to set as
current.
Use Custom Dialog Editor to name all controls that you want to
manipulate with script actions. Custom Dialog Editor to name all
controls that you want to manipulate with script actions. To name a
control, right-click the control, select Control Properties, and, in the
dialog that appears, enter a name in the Control Name field.
Example
To read about a script that demonstrates this action, see Configuring a
Dialog to Handle Mouse Events on page 400.
283
5: WISESCRIPT ACTIONS
File Pathname. Select the path to the file to be changed. You can enter
variables to build a pathname. You can use wildcards to specify multiple
files.
Read-Only / Hidden / System. Mark a checkbox to set the indicated
attribute for the file or files specified above.
Scan directory tree. Mark this checkbox to apply the changes to all
files in the specified directory, along with all files in its subdirectories
and their subdirectories.
Archive. Mark this checkbox to set the archive flag for the specified
files. The archive bit is used by many backup programs to determine
which files should be backed up in an incremental backup.
Set Files/Buffers
The Set Files/Buffers script action sets the FILES= and BUFFERS= lines in
the Config.sys file. If either is currently lower than the minimum specified
in this action, it is increased to the specified value. If either is already
greater than or equal to the desired value, it is not changed.
284
Minimum Files. The minimum number of files to be specified by
FILES= in Config.sys. Set to zero or leave blank to leave FILES=
unchanged.
Minimum Buffers. The minimum number of buffers to be specified by
BUFFERS= in Config.sys. Set to zero or leave blank to leave BUFFERS=
unchanged.
Set Variable
Use the Set Variable script action to set the value of a variable by providing
a literal value, by generating the new value from the variable’s existing
value after modifying it in some way, or by evaluating an expression.
Usage
285
5: WISESCRIPT ACTIONS
the value field. For example, to increment the variable FOO, place
FOO in the Variable field and %FOO% in the New Value field.
• Remove trailing backslashes. Any trailing backslashes (\) are
removed, converting the variable to a valid directory name.
• Convert to long (short) filename. Converts an existing pathname
to its equivalent long or short pathname if the installer is running
under Windows 95 or NT. For this to work, the specified directory or
file must exist.
• Convert to uppercase or lowercase. All alphabetical characters
are converted to uppercase or lowercase.
• Evaluate Expression. The expression in the New Value field is
evaluated according to the rules outlined in Variables and
Expressions on page 167.
Append to Existing Value. If this checkbox is marked, the variable’s
new value is added to the end of its original value instead of replacing it.
Remove File Name. Removes a file name from the end of a pathname,
leaving only the directory name.
Read Variable From Values File. Mark this checkbox to read the
variable from the values file specified on the command line to the
installer .EXE using the /M command line option. The values file is a
simple text file with variables listed, one per line, in NAME=“VALUE”
format. If the variable is found in the values file, the specified value is
used; otherwise, its value is unchanged. It can be up to 32K in size.
Example
To read about a script that demonstrates this action, see Performing
Calculations on Integer Values on page 398.
286
Property Name. Enter the name of a Windows Installer property. This
can be either an existing Windows Installer property, or a new property
name. Entering a new property name creates the property in Windows
Installer.
Property Value. Enter the value to assign to the Windows Installer
property. You can either hard-code a value or enter a WiseScript
variable enclosed in percent signs.
Start/Stop Service
The Start/Stop Service script action lets you start or stop the specified
service on the destination computer. This action only applies to Windows
3.51, Windows NT 4.0, Windows 2000, and Windows XP systems because
other operating systems do not have services.
Usage
After you attempt to stop a service, the script pauses for a moment to give
the service time to stop. The currently logged-in end user must have the
appropriate privileges to start and stop services. In the Start/Stop Service
Details dialog, you enter the service name and specify whether to stop or
start the service.
Service Name. Enter the name of the service here. This is not
necessarily the same name you see in the Services control panel. If you
are unsure what the service name is, consult the documentation that
came with the software that installed the service. If you used the Create
Service script action to create the service, this is the same name you
entered in the Create Service Settings dialog.
Operation. Choose to start or stop the service.
287
5: WISESCRIPT ACTIONS
Example
Your installation might need to stop a service before it can install an update
to that service. You can use this script action to first stop the service, then
update the necessary files.
While Statement
The While script action marks the beginning of a loop. An End statement
marks the end of the loop. As long as the condition specified in the While
Statement Settings is true, then the script lines inside the loop continue to
execute repeatedly. If the condition specified is not true, then the While
loop is exited, and the script line following the While loop is executed. In
the While Statement Settings dialog, you specify the condition to test for,
and also whether the loop should execute at least one time.
Usage
While Variable. The name of the variable involved in the test for this
conditional block or loop.
Comparison. To the right of the While Variable field, select an option
to determine how the variable is compared to the value.
• Equals, Not Equal. The value of the variable must or must not
equal the value given in the field.
• Contains, Does Not Contain. The value of the variable must or
must not contain the text given in the Value field.
• Greater Than, Greater Than or Equal To. The value of the
variable must be greater than or equal to the value given.
• Less Than, Less Than or Equal To. The value of the variable must
be less than or equal to the value given.
• Contains Any Letters In. At least one of the letters in the variable
must be found in the value given in the field. This comparison and
the next one are useful for testing the results of returned by custom
dialogs, which returns letters for each option the end user chooses.
288
• Contains Letters Not In. At least one of the letters in the variable
must not be found in the value given in the Value field.
• Length Equal To. The length of the text in the variable must equal
the value given below.
• Expression True. The expression in the Value field below is
evaluated according to the rules outlined in Variables and
Expressions on page 167. The variable name specified is ignored and
can be left blank. The result is considered true if it evaluates to a
non-zero result.
• Equals (Ignore Case), Not Equal (Ignore Case). The value of
the variable must or must not equal the value given in the field. The
case of the value is ignored.
• Valid Password, Invalid Password. Evaluates to true if the value
entered matches the password entered on the Passwords page in
Installation Expert.
The Value. Enter the value to be used in the comparison, or an
expression if the drop-down list is set to Expression.
Perform while loop at least once. This checkbox determines whether
the body of the loop is executed once before the test is performed. If
the checkbox is cleared, the loop is executed if the condition is true, but
is not executed if the condition is false. If the checkbox is marked, the
loop always executes at least once.
Example
To read about a script that demonstrates this action, see Error Checking
User Input on page 399 or Killing an Application Using Windows .DLL Calls
on page 410.
289
5: WISESCRIPT ACTIONS
Variable Name. The name of the script variable in which the value
obtained should be stored.
Wizard Loop
The Wizard Loop script action is used to construct a series of wizard dialogs
that make up the majority of the installer’s end user interface. End users
can move forward and backward through these dialogs; the script
continues executing inside the wizard loop structure until the last wizard
dialog has been filled out and accepted. Installation Expert creates default
Wizard Loop and Custom Dialog actions for you, but you can also build
them yourself, or use Script Editor to customize the existing structure.
Usage
290
Dialog Boxes. Displays a list of the Custom Dialog actions inside the
wizard loop structure. Click the dialog you want to change.
Skip Dialog. This section of the Wizard Loop dialog lets you set the
circumstances under which a dialog is skipped. You can set different
Skip settings for each dialog.
For example, if one dialog asks the end user if they want to back up
their configuration files before installing, and the next asks where they
want to store the backup files, you might set a condition on the second
dialog to skip it if the DOBACKUP variable, which is set by the first
dialog, is equal to “NO.”
The options available for setting up a condition (If Variable, the
condition, and the Value) are the same as in an If or a While action; see
If Statement on page 247.
Direction Variable. The variable named here stores the direction the
Wizard is currently heading. When the end user clicks Next in a wizard
dialog, the value N is stored in the specified variable; when the end user
clicks Back, a B is stored. If you create your own custom Wizard dialogs,
you should follow this convention. The wizard loop created by
Installation Expert uses a variable called DIRECTION for this purpose.
You can use this variable in the Skip Dialog condition tests to set up
dialogs that should be displayed when the end user is going forward but
should be skipped when going backward, for instance.
Display Variable. The variable named here holds the name of the
dialog that is being displayed this time through the loop. You should
choose this variable in the Dialog Set Properties dialog in the Custom
Dialog Editor. Wizard loops generated by Installation Expert use the
variable DISPLAY for this purpose.
Pathname. Specify the path to the bitmap to be displayed in the wizard
dialogs. This is a file on your computer, not the destination computer.
The Wise Installation System copies it into your installation when you
compile.
You can turn off this graphic for selected wizard dialogs using the Dialog
Box Properties dialog. See Setting Dialog Properties on page 299.
X-Pos / Y-Pos. Determines the relative placement of the graphic in the
dialog, using X and Y coordinates.
Do not resize bitmap. Normally, the Wise Installation System
automatically resizes the graphic based on the destination computer’s
resolution. The image is displayed at actual size on a 640x480 monitor,
and is enlarged if the destination computer is set to a higher resolution.
Mark this checkbox to force the image to be displayed at the same size
at all resolutions.
291
5: WISESCRIPT ACTIONS
Technical Note:
The dimensions of the first Wizard dialog set the dimensions for all the
dialogs in the wizard loop.
Example
To read about a script that demonstrates this action, see Showing or
Skipping Dialogs Based on End User Input on page 404.
292
Chapter 6
Creating Custom Dialogs
293
6: CREATING CUSTOM DIALOGS
294
ADDING AND EDITING DIALOGS
2. In the Dialog Box Properties dialog, enter a title for the dialog in the
Dialog Title field and click OK. Do not give it the same name as an
existing dialog. For information on how to set dialog properties, see
Setting Dialog Properties on page 299.
The new dialog opens in the Custom Dialog Editor.
295
6: CREATING CUSTOM DIALOGS
Note:
If you want to use this dialog in other installation scripts, select Save As from
the File menu, and save the dialog as a .DLG file. (Built-in dialogs are stored in the
\Dialogs\Template directory.) This does not affect the current installation. You can
add a saved dialog to another installation by selecting Open from the File menu
while in Custom Dialog Editor.
Note:
If you save the dialog and overwrite the .DLG template file, then the dialog
changes permanently for all future installations.
296
ADDING AND EDITING DIALOGS
297
6: CREATING CUSTOM DIALOGS
298
WORKING WITH DIALOGS
In the Dialog Box Properties dialog, you can specify the following:
Dialog Title. Enter the title for the dialog’s title bar.
Font Name / Font Size. Enter the exact name of a font and a point
size. This font type and size is applied to any text whose font attribute is
set to Default Font. When you add or edit a text box, you can set the
font to Default Font, or you can set it to a customized font to override
the default.
Width / Height. Enter the point sizes of the dialog to be more precise
and to be consistent with other dialogs. All dialogs in a wizard loop
MUST have the same size as the first dialog. Otherwise screen refresh
problems occur.
299
6: CREATING CUSTOM DIALOGS
Note:
You can also resize the dialog by clicking its edges and dragging. Use the
Width and Height fields for more precise positioning.
Hot Text. Adds hot text that you can link to actions or even a Web
page. See Hot Text Controls on page 306.
Edit Text. Adds an editable text field, such as a field where the end
user enters information. The field can show single or multiple lines. You
can also use this type of control to display a text file. See Edit Text
Controls on page 309.
Push Button. Adds a clickable button. Generally you must configure
buttons to perform an action, such as displaying another dialog. Buttons
can also close a dialog, set script variables, and take other actions.
Every dialog must contain at least one button. See Push Button Controls
on page 312.
Radio Button. Adds a radio button group. Use a radio button group
when the end user can make only one selection from a group of options.
See Radio Button Controls on page 314.
300
WORKING WITH DIALOGS
Checkbox. Adds a checkbox. Use checkboxes when the end user can
make multiple selections from a group of options. See Checkbox
Controls on page 315.
Combo Box. Adds a drop-down list or a multi-line list box. You can
configure the drop-down list to either allow the end user to enter a non-
listed option, or constrict the end user to the listed choices. See Combo
Box Controls on page 317.
List Box. Adds a scrolling list of items from which the end user can
select one or more options. See List Box Controls on page 319.
Group Box. Adds a box that encloses a group of related controls with a
rectangle. See Group Box Control on page 322.
Graphic. Adds a non-editable bitmap graphic. See Graphic Controls on
page 322.
Rectangle. Adds a box. See Rectangle Control on page 323.
Play AVI. Adds a movie but no controls to play, stop, rewind, or fast
forward the movie. See Play AVI Control on page 324.
301
6: CREATING CUSTOM DIALOGS
You can resize and move the control using its handles. Use SHIFT-CLICK to
select multiple controls. To resize and move controls with more precision,
double-click the control to view its Properties dialog and set the
Placement options, which include X- and Y-position, height, and width.
302
WORKING WITH DIALOGS
Note:
Although static controls such as graphics, text messages, divider lines
and so on are included in the tab order, they are ignored when the end user
presses the TAB key. Thus, their actual tab order is irrelevant.
303
6: CREATING CUSTOM DIALOGS
Text Controls
Use text controls to display information in a dialog. Text controls are static
controls, which means that the end user cannot make changes to them.
When you add text to your dialog, you also determine text alignment, font,
or placement.
To add a text control, select Text Control from the Add menu in Custom
Dialog Editor. The Text Control Settings dialog appears.
304
CONFIGURING DIALOG CONTROL PROPERTIES
305
6: CREATING CUSTOM DIALOGS
306
CONFIGURING DIALOG CONTROL PROPERTIES
307
6: CREATING CUSTOM DIALOGS
308
CONFIGURING DIALOG CONTROL PROPERTIES
309
6: CREATING CUSTOM DIALOGS
Default. The text you enter into this field appears in the Edit Text
control by default. To put a paragraph character in this field, type CTRL-
ENTER.
Variable. Select a variable to store the contents of this field after the
dialog is dismissed.
Alignment. Specify how the text is aligned in the edit field: left-
justified, centered, or right-justified.
Control Name. Enter the name by which you plan to refer to this
control in the dialog script. Leave this blank if you do not plan to
manipulate this control with a script.
Horiz. Scroll. Mark this checkbox to add a horizontal scroll bar to the
field.
Vert. Scroll. Mark this checkbox to add a vertical scroll bar to the field.
310
CONFIGURING DIALOG CONTROL PROPERTIES
311
6: CREATING CUSTOM DIALOGS
Label. Enter the name of the push button. To indicate the keyboard
equivalent for the button, enter an ampersand (&) immediately before a
letter. For example, “< &Back” would display the label “< Back” and set
the keyboard shortcut to ALT-B.
Variable and Value. Use the Variable field to enter (or select) the
name of the variable that is modified when this button is clicked by the
end user. In the Value field, enter the value that gets assigned to that
variable. This can be useful in a script when more than one button can
dismiss a dialog and you need to know which one the end user clicked.
312
CONFIGURING DIALOG CONTROL PROPERTIES
Control Name. Enter the name by which you plan to refer to this
control in the dialog script. Leave this blank if you do not plan to
manipulate this control with a script.
Action. Choose an action for the button.
• Return to Previous Dialog. Displays the previously-displayed
dialog in the dialog set. (The exception: the Back buttons in Wizard
dialogs do not use this option. They are controlled by the Wizard
Loop script action.) If this is the first dialog displayed from the set, it
returns to the installation script.
• Return to Script. Returns to the installation script, even if this
dialog was called from another dialog in the dialog set.
• Display Dialog. Displays the selected dialog from the current set.
• Abort Installation. The end user is asked to confirm that the
installation should be aborted. If the end user confirms, the
installation is exited.
• Display Help Context. If the HELPFILE variable points to a valid
copy of a Windows help file, the specified numeric help context is
displayed.
• Execute Program. Another application is launched. Click the Edit
button to specify and configure the application to be launched. See
Specifying Execute Program Settings on page 326.
• Execute Named Event. Passes a named event to the dialog script.
The DLG_EVENT_TYPE variable is set to the entered text. See
Creating a Custom Dialog Script on page 333 for more information.
X-Position / Y-Position. Use these fields to specify the exact location
of the control on the dialog, in dialog units. As an alternative, you can
use the alignment tools to precisely arrange controls on the dialog. See
Aligning and Spacing Dialog Controls on page 302.
Width / Height. Specify the exact dimensions of the control in dialog
units. You can also resize controls by dragging their handles, but this
method is more precise.
Default Button. Mark this checkbox to make this the default button,
that is, the one that is selected if the end user presses the ENTER key.
Only one button should be set to the default per dialog.
Do Not Check Fields. Mark this checkbox to suppress directory
confirmation and field validity checking (useful for Browse buttons).
313
6: CREATING CUSTOM DIALOGS
Radio Button Text. Enter the text options for the radio buttons, one on
each line. If the end user selects the first radio button, the letter A will
be put into the variable that stores the return value. If the end user
selects the second radio button, the letter B is returned, and so on. Each
option in the radio button is assigned a sequential character value (A, B,
C, D, and so on).
Retain Disabled. If you preset the radio button variable so that some
of its options are disabled, those options become enabled if the end user
proceeds to the next dialog and clicks Back to backtrack. Marking this
checkbox makes disabled radio button options retain their disabled
state, even if end users go backward and forward in dialogs. Technically,
this checkbox causes any lowercase letters in the variable to stay in the
variable, even after the end user navigates between dialogs. If this
314
CONFIGURING DIALOG CONTROL PROPERTIES
checkbox is cleared, the variable takes on the value of the option that
was selected, and the lowercase information is lost.
Variable. Enter or select the name of the script variable that stores the
return value of this dialog control.
Technical Note:
If you set the variable to a string containing one or more lowercase
letters, the corresponding options will be disabled in the radio button control
when it displays on the dialog. For instance, a radio button with four options
whose variable is set to “ABcd” would have the last two options disabled.
Control Name. Enter the name by which you plan to refer to this
control in the dialog script. Leave this blank if you do not plan to
manipulate this control with a script.
X-Position / Y-Position. Use these fields to specify the exact location
of the control on the dialog, in dialog units. As an alternative, you can
use the alignment tools to precisely arrange controls on the dialog. See
Aligning and Spacing Dialog Controls on page 302.
Width / Height. Specify the exact dimensions of the control in dialog
units. You can also resize controls by dragging their handles, but this
method is more precise.
Checkbox Controls
Like radio buttons, a group of checkboxes is considered a single control.
Unlike radio buttons, however, the end user can select multiple boxes. The
alignment and spacing between the individual boxes is automatically
maintained by the Custom Dialog Editor. Checkboxes are often used to
control the installation of components or sub-components.
To learn more about scripting checkboxes to handle mouse events and to
retrieve information, see Enabling, Disabling, and Marking Controls in a
Dialog on page 402.
To add a checkbox, select Checkbox from the Add menu in Custom Dialog
Editor. The Checkbox Control Settings dialog appears.
315
6: CREATING CUSTOM DIALOGS
Checkbox Text. Enter the text options for the checkboxes here, one on
each line. If the end user selects the first checkbox, the letter A will be
appended to the variable that stores the return value. If the end user
selects the second checkbox, the letter B is appended, and so on. Each
option in the checkbox is assigned a sequential character value (A, B, C,
D, and so on). The variable stores all letters of checkboxes that are
selected. For instance, if the end user picks the first, third, and fourth
checkboxes, the variable is “ABD”.
Variable. Enter or select the name of the script variable that stores the
result of this dialog control.
Technical Note:
If you set the variable to a string containing one or more lowercase
letters, the corresponding options will be disabled in the checkbox control when
it displays on the dialog. For instance, a checkbox with four options whose
variable is set to “ABcd” would have the last two options disabled.
316
CONFIGURING DIALOG CONTROL PROPERTIES
Control Name. Enter the name by which you plan to refer to this
control in the dialog script. Leave this blank if you do not plan to
manipulate this control with a script.
X-Position / Y-Position. Use these fields to specify the exact location
of the control on the dialog, in dialog units. As an alternative, you can
use the alignment tools to precisely arrange controls on the dialog. See
Aligning and Spacing Dialog Controls on page 302.
Width / Height. Specify the exact dimensions of the control in dialog
units. You can also resize controls by dragging their handles, but this
method is more precise.
Components. If this checkbox is marked, the sizes of the components
that correspond to the variable specified are displayed to the right of the
checkboxes. (Usually, you should mark this checkbox only if you are
selecting components and have specified the COMPONENTS variable.)
Retain Disabled. When this option is marked, it causes any lowercase
letters in the variable to stay in the variable, even if the end user selects
an option, proceeds to the next wizard dialog, then returns to the
checkbox field. If this option is cleared, the variable takes on (only) the
value of the selected option and the lowercase information is lost. Now,
if the end user selects an option, proceeds to the next wizard dialog,
then returns back to the checkbox field, all four options are available.
Note:
When you place a combo box, you must resize the bounding box so that it is
taller than the visible combo box. If you do not, the drop-down list fails to “drop-
down” when you run the installation.
To add a combo box, select Combo Box from the Add menu in Custom
Dialog Editor. The Combo Box Control Settings dialog appears.
317
6: CREATING CUSTOM DIALOGS
Combo Box Text. Enter the text to be displayed in the list. Enter one
item per line.
Sort. Mark this checkbox to sort the combo box items into ascending
order.
Vert. Scroll. Mark this checkbox to let the end user scroll vertically if
there are more items than fit into the allocated space.
Auto HScroll. Mark this checkbox to scroll the text entry field
horizontally automatically if more text is entered than fits.
ProgMan Groups. If you mark this checkbox, the items in the
Programs group of the Windows Start menu appear in the combo box. If
the installer runs on Windows 3.1, the Program Manager groups appear
in the combo box.
Drive List. Mark this checkbox to display the end user’s available drives
in the combo box. The value returned is a letter and a colon (such as
“C:”).
Directory. Mark this checkbox to have trailing backslashes
automatically removed from the entered or selected text.
Confirm If Exists. Mark this checkbox to prompt for confirmation if the
pathname the end user entered already exists on the destination
computer. Clear this checkbox if you do not want the “This directory
already exists” message to appear.
318
CONFIGURING DIALOG CONTROL PROPERTIES
Variable. Enter or select the name of the script variable that stores the
result of this dialog control.
Technical Note:
To cause an option in the list to be pre-selected, choose use a Set
Variable action to set a variable to the value of one of the options. Then choose
that variable in the Variable field.
Combo Box Type. Choose Simple (list box from which end users can
make a selection), Drop Down (drop-down list that allows text entry or
selection from the list), or Drop List (drop-down list that only allows a
selection from the list).
Control Name. Enter the name by which you plan to refer to this
control in the dialog script. Leave this blank if you do not plan to
manipulate this control with a script.
X-Position / Y-Position. Use these fields to specify the exact location
of the control on the dialog, in dialog units. As an alternative, you can
use the alignment tools to precisely arrange controls on the dialog. See
Aligning and Spacing Dialog Controls on page 302.
Width / Height. Specify the exact dimensions of the control in dialog
units. You can also resize controls by dragging their handles, but this
method is more precise.
Technical Note:
When setting the width and height for a combo box field, make sure the
box’s dimensions are at least as wide as the longest option in the list. If the
field does not “drop down” when tested, increase the dimensions of the field so
it is twice as wide and three times as tall.
319
6: CREATING CUSTOM DIALOGS
To add a list box, select List Box from the Add menu in Custom Dialog
Editor. The List Box Control Settings dialog appears.
List Box Text. Each line of this text is displayed as a separate item in
the list box. Press the ENTER key between selections so there is only one
item per line.
Variable. Enter or select the name of the script variable that stores the
result of this dialog control.
Control Name. Enter the name by which you plan to refer to this
control in the dialog script. Leave this blank if you do not plan to
manipulate this control with a script.
List Box Type. Choose Normal (a simple list), Program Manager
Groups (a list of the items in the Programs group of the Start menu),
Directory Tree Browse (a directory tree browser including an edit
field, directory tree, and disk drive list), or List Box with Checkboxes
(a list containing a checkbox for each item, allowing multiple items to be
selected simultaneously). If the installer runs on Windows 3.1,
Program Manager Groups causes the Program Manager groups to
appear in the list box.
320
CONFIGURING DIALOG CONTROL PROPERTIES
Vert. Scroll. Mark this checkbox to allow the end user to scroll
vertically if there are more items than fit into the allotted space.
Horiz. Scroll. Mark this checkbox to allow the end user to scroll
horizontally if any items are too long for the allotted space.
Disable No Scroll. Mark this checkbox to display a vertical scrollbar
even if one is not needed.
Multi-Select. Mark this checkbox to allow the end user to select
multiple items from the list.
Return Letters. Mark this checkbox to cause the control to return a list
of letters representing the item selected (that is, A for the first, B for the
second, etc.) rather than the item text itself.
Don’t Append. Mark this checkbox to not append the “Program Files”
directory name onto the Destination Directory selected by the end user.
Confirm If Exists. Mark this checkbox to prompt for confirmation if the
pathname the end user entered already exists on the destination
computer. Clear this checkbox if you do not want the “This directory
already exists” message to display.
Components (checkbox). Mark this checkbox to create named
components and fill in the Components field above.
Store Position. Mark this checkbox to store the position of the last
selected item. The position is stored as a zero-padded, two-digit decimal
number at the beginning of the variable. For example, if the end user
selects the first, the third, then the fourth item, this control returns a
value of 04ACD.
X-Position / Y-Position. Use these fields to specify the exact location
of the control on the dialog, in dialog units. As an alternative, you can
use the alignment tools to precisely arrange controls on the dialog. See
Aligning and Spacing Dialog Controls on page 302.
Width / Height. Specify the exact dimensions of the control in dialog
units. You can also resize controls by dragging their handles, but this
method is more precise.
321
6: CREATING CUSTOM DIALOGS
Group Box Text. Enter a name to appear at the top of your group box.
For example, in the Group Box Control Settings dialog, “Placement” is
the group box text.
Control Name. Enter the name by which you plan to refer to this
control in the dialog script. Leave the field blank if you do not plan to
manipulate this control with a script.
Transparent Background. Mark this checkbox to make the
background for this control transparent.
X-Position / Y-Position. Use these fields to specify the exact location
of the control on the dialog, in dialog units. As an alternative, you can
use the alignment tools to precisely arrange controls on the dialog. See
Aligning and Spacing Dialog Controls on page 302.
Width / Height. Specify the exact dimensions of the control in dialog
units. You can also resize controls by dragging their handles, but this
method is more precise.
Graphic Controls
You can add graphics to be displayed on a dialog. Graphic controls are
static controls, which means that the end user cannot make changes to
them.
To add a graphic, select Graphic from the Add menu in Custom Dialog
Editor. The Graphic Control Settings dialog appears.
322
CONFIGURING DIALOG CONTROL PROPERTIES
Graphic Pathname. Enter the pathname for the bitmap graphic to add
to the dialog or click Browse to navigate to its location.
Control Name. Enter the name by which you plan to refer to this
control in the dialog script. Leave the field blank if you do not plan to
manipulate this control with a script.
Do not resize bitmap graphic. Normally, graphics are resized if the
dialog needs to be made larger, for example, because the destination
computer uses a larger font size. Mark this checkbox to keep the graphic
at the same size, regardless of the system settings. Be aware though,
that marking this checkbox on systems with standard font sizes causes
the graphic to appear in a different place on the dialog. Therefore, test
your installation thoroughly if you decide to mark this checkbox.
X-Position / Y-Position. Use these fields to specify the exact location
of the control on the dialog, in dialog units. As an alternative, you can
use the alignment tools to precisely arrange controls on the dialog. See
Aligning and Spacing Dialog Controls on page 302.
Width / Height. Specify the exact dimensions of the control in dialog
units. You can also resize controls by dragging their handles, but this
method is more precise.
Rectangle Control
Use the Rectangle dialog control to draw a box in the dialog. Rectangle
controls are static controls, which means that the end user cannot make
changes to them.
To add a rectangle, select Rectangle from the Add menu in Custom Dialog
Editor. The Frame/Rectangle Control Settings dialog appears.
323
6: CREATING CUSTOM DIALOGS
324
CONFIGURING DIALOG CONTROL PROPERTIES
.AVI Pathname. Specify the pathname for the movie (.AVI file) you
want to play on the dialog.
Control Name. Enter the name by which you plan to refer to this
control in the dialog script. Leave the field blank if you do not plan to
manipulate this control with a script.
X-Position / Y-Position. Use these fields to specify the exact location
of the control on the dialog, in dialog units. As an alternative, you can
use the alignment tools to precisely arrange controls on the dialog. See
Aligning and Spacing Dialog Controls on page 302.
Width / Height. Specify the exact dimensions of the control in dialog
units. You can also resize controls by dragging their handles, but this
method is more precise.
Loop Continuously. Mark this checkbox to repeatedly start the movie
from the beginning.
325
6: CREATING CUSTOM DIALOGS
Technical Note:
Variables Added is retained for backward compatibility only.
326
SOLVING PROBLEMS IN DIALOGS
327
6: CREATING CUSTOM DIALOGS
328
SOLVING PROBLEMS IN DIALOGS
329
6: CREATING CUSTOM DIALOGS
330
WORKING WITH CUSTOM DIALOG SETS
Note:
Generally dialog sets are comprised of one dialog and the other dialogs that
it calls. For instance, a dialog might have an Options button and Browse button,
each of which brings up the corresponding dialog. The three dialogs together
comprise a dialog set. The main dialogs that you see during installation are not a
dialog set; they are controlled by a Wizard Loop action in the script.
331
6: CREATING CUSTOM DIALOGS
Dialog Set Name. The name of this dialog set. If this dialog set is
comprised of only one dialog, then this is usually the same name as the
dialog. The Dialog Set Name must be unique within a wizard loop. This
value is displayed in the installation script.
Display Variable. The display variable determines which dialog in the
wizard loop to present to the end user the next time the wizard loop is
executed. When this dialog is presented to the end user, the display
variable is set to this dialog set name. If this field is not blank the dialog
is only displayed if the variable holds the same value as the Dialog Set
Name field.
Called Dialogs Float. If you are displaying a dialog outside a wizard
loop, mark this checkbox if you want called dialogs to appear over the
calling dialog. For instance, suppose you display a Select Destination
Directory dialog that contains a Browse button. If this checkbox is
marked, and the end user clicks Browse, the Browse dialog appears on
top of the Select Destination Directory dialog instead of replacing it. This
behavior is built into the wizard loop dialogs by default.
332
CREATING A CUSTOM DIALOG SCRIPT
Note:
Before attempting to write a custom dialog script, you should familiarize
yourself with at least the introductory material in Script Editor on page 139. Also
see Conditionals and Loops on page 166 and Variables and Expressions on
page 167.
Certain events are generated automatically as the end user works with the
dialog on the destination computer. Built-in dialog events include first-time
display of the dialog (INIT), updating of information displayed in the dialog
(UPDATE), and verification of the validity of the contents of the dialog
(VERIFY). Additional events, whose names you define, can be triggered by
buttons in the dialog by choosing Execute Named Event as the button’s
action.
To handle the generated events, you create a conditional structure that
tests the variable DLG_EVENT_TYPE for the appropriate value. If
DLG_EVENT_TYPE is equal to INIT, for instance, the INIT event is being
called. The script actions between the If statement that tests for this value
and the End statement that goes with it should handle that event. Your
script can handle multiple events in different ways by including multiple
conditional blocks, one after the other.
The script actions available in the Dialog Script Editor are a subset of the
full WiseScript, with a few additions specific to dialogs. Here is a list of the
available script actions:
Call DLL Function. Calls an external program in a dynamically linked
library. See Call DLL Function on page 186.
333
6: CREATING CUSTOM DIALOGS
334
CREATING A CUSTOM DIALOG SCRIPT
335
6: CREATING CUSTOM DIALOGS
336
Chapter 7
Creating Custom Billboards
Billboards are a series of one or more graphics that present a “slide show”
to the end user while files are being installed on the destination computer.
These are typically used to encourage the end user to register the product,
to promote related products, or to provide other useful information.
The Custom Billboard Editor provides a basic set of drawing tools for
creating billboards. Here you can create scalable, vector-based artwork
that can be added to the billboards and displayed during installation.
Although you can import graphics created in other drawing programs,
there are advantages to using the Custom Billboard Editor. For example,
the “Scale to Screen” option can resize native billboard objects so they look
the same regardless of the resolution the end user is running.
Editing graphics in the Custom Billboard Editor is easy because all objects
can be moved, rearranged, recolored, or resized. For instance, Text
remains editable once it has been added, making it easy to translate your
billboards into multiple languages. If you import bitmaps created in other
paint and draw programs, you can still use the Custom Billboard Editor to
place other objects, such as editable text, over them.
Topics in this section cover:
Accessing the Custom Billboard Editor.
337
7: CREATING CUSTOM BILLBOARDS
All the tools you need to work in the Custom Billboard Editor are accessible
from its menu bar or the icons on the toolbar.
Note:
Although the graphics created by the Custom Billboard Editor can be added
to the installation using Installation Expert’s Billboards page, the editor itself is only
accessible through Script Editor.
338
WORKING WITH THE CUSTOM BILLBOARD EDITOR
339
7: CREATING CUSTOM BILLBOARDS
To add an object:
1. Click the Add menu and choose the appropriate type of object from the
menu list.
OR
Select the desired object directly from the toolbar. (You can see a
tooltip description of each toolbar icon by holding the mouse pointer
over it.)
2. Drag in the work area to create an object of that type. (The polygon
tool requires that you click at each point of the polygon, then double-
click at the last point.)
After you place the object in the work area, a Settings dialog appears.
3. In the Settings dialog, set the object’s initial characteristics. (line style,
line color, fill color, etc.) Each type of object is covered separately in the
sections that follow.
• For text objects, see Editing Billboard Text Objects.
• For line objects, see Editing Billboard Line Objects on page 342.
• For rectangles, rounded rectangles, and ellipses, see Editing
Billboard Rectangles and Ellipses on page 343.
• For polygons, see Editing Billboard Polygon Objects on page 344.
• For bitmaps, see Editing Billboard Bitmap Objects on page 345.
4. Click OK to save the object settings, then position the object to the
desired location on the billboard.
See Resizing, Moving, and Aligning Billboard Objects on page 346.
340
WORKING WITH THE CUSTOM BILLBOARD EDITOR
341
7: CREATING CUSTOM BILLBOARDS
Line Arrows. Determines which ends of the line will have arrowheads,
if any.
Line Direction. Determines whether the line should connect the lower
left corner of the bounding rectangle to the upper right corner, or the
upper left to the lower right.
Line Width. The width of the line in pixels.
Line Color. Click the Pick button to choose a color for the line using the
standard Windows color picker.
Placement. Specify the size and location of the object in pixels. The
upper left corner is 0,0. The black rectangle on the billboard editor
defines an area of 640 x 480 pixels.
342
WORKING WITH THE CUSTOM BILLBOARD EDITOR
Line Color / Fill Color. Click the Pick button to open the standard
Windows color palette, then select the color you want to apply to the
object’s outline or its interior.
Placement. Specify the size and location of the object in pixels. The
upper left corner is 0,0. The black rectangle on the billboard editor
defines an area of 640 x 480 pixels.
343
7: CREATING CUSTOM BILLBOARDS
Polygon Points. The list of points that define the polygon’s vertices.
Click the Delete button to delete the selected points, or use the X and Y
fields to move the selected points to new coordinates.
Line Color / Fill Color. Click the Pick button to open the standard
Windows palette, then select the color for the object’s outline or its
interior.
344
WORKING WITH THE CUSTOM BILLBOARD EDITOR
Note:
Imported bitmap objects can appear distorted when the billboard is run with
the Scale to Screen option enabled on the Billboard Settings dialog. This is not
true of objects created in the Custom Billboard Editor.
After you draw the bitmap frame in the Billboard Editor, the Bitmap
Settings dialog opens so you can specify the path of the bitmap. The
Custom Billboard Editor supports 256-color and true-color bitmap images.
345
7: CREATING CUSTOM BILLBOARDS
Placement. Specify the size and location of the object. For best results,
make the width and height equal to the actual width and height of the
image.
346
WORKING WITH THE CUSTOM BILLBOARD EDITOR
347
7: CREATING CUSTOM BILLBOARDS
Place at Bottom. Mark this checkbox to place the image at the bottom
of the screen. Due to rounding errors inherent in the Windows MetaFile
format, this option can be slightly inaccurate when used with billboards
that have been scaled to the screen.
Erase All. Mark this checkbox to remove all previous billboards from
the screen before displaying the new one. You need to specify this on
the last billboard in a group (of billboards) to clear it and any others
from the display.
Timed Display. Mark this checkbox to automatically display a series of
billboards at evenly-spaced intervals during an installation. To make this
work, place all of the timed Custom Billboard script actions in
consecutive rows before the first Install File(s) action. The installation
engine calculates how long to display each so that they are displayed for
approximately the same amount of time during the installation process.
To control the installation speed so that each billboard displays long
enough to read, go to Installation Expert, open the Build Settings page,
and check the Control Installation Speed checkbox. Otherwise, the
billboards flash by too quickly to be read.
348
Chapter 8
Tools
The Wise Installation System includes three powerful tools that let you
quickly start installations, saving you valuable time. You can use these
tools to create a fully-functional setup program, or as a starting point for
creating an installation file that you want to modify with Installation Expert
or Script Editor.
In this section, you’ll learn how to:
Record another setup program, recreating it in the Wise Installation
System. See SetupCapture on page 351.
Create an installation that records the accessed files of an installed
application. See ApplicationWatch on page 365.
Import a Visual Basic project into an installation. Import Visual Basic
Project on page 368.
349
8: TOOLS
About Tools
Access built-in tools by selecting them from the Tools menu or by clicking
their icons on the toolbar.
SetupCapture. Use SetupCapture to create a WiseScript version of an
existing installation program. It records the changes that occur on your
system during the installation of an application, including files and other
system changes. From this, it recreates the installation in the Wise
Installation System. Use this wizard on a computer that has a clean
installation of the Windows operating system. See SetupCapture on
page 351.
350
SETUPCAPTURE
SetupCapture
Before using SetupCapture for the first time, read the guidelines below to
familiarize yourself with the process. They contain tips and tricks that help
you understand details of how SetupCapture works.
Run SetupCapture on a “clean machine.” Because SetupCapture works
by comparing the contents of your hard disk before and after
installation, you should run it only on a computer with a clean
installation of Windows. Otherwise, some of the files required by the
program being installed might already exist on your computer. For
instance, if you already have an HP LaserJet 4050 printer driver on your
machine and capture an HP printer driver setup program, SetupCapture
will not record the HP LaserJet 4050 printer driver file because it existed
prior to the pre-installation scan.
Before running SetupCapture, exit all other applications. Otherwise, you
might inadvertently capture the activities of other applications.
351
8: TOOLS
Running SetupCapture
352
SETUPCAPTURE
353
8: TOOLS
A scan of your system begins based on the settings you chose, which
might take a few minutes. The Execute Installation dialog appears.
354
SETUPCAPTURE
You can see the results from the SetupCapture by exploring the Files page,
Registry page, and other pages in the Installation Details page group in
Installation Expert. To see exactly what the recreated script does, look at
Script Editor.
You should set general preferences for SetupCapture before running it.
These preferences determine what kind of information is captured and how
that information is interpreted in the Wise Installation System installation.
Access the General Settings tab by clicking the Settings button on the
Welcome dialog of SetupCapture. See Running SetupCapture on page 352.
355
8: TOOLS
script, files that are deleted will appear in Remove File(s) script actions
in Script Editor.
Include registry keys deleted during capture. Normally
SetupCapture doesn’t record the deletion of registry keys by an
installation. Mark this checkbox if you want SetupCapture to record the
deletion of registry keys and to add the necessary deletion code in the
resulting installation. In the resulting script, files that are deleted will
appear in Edit Registry script actions in Script Editor.
Capture changes in hardware registry entries. Normally
SetupCapture doesn’t record changes to hardware registry entries,
which are typically stored in HKEY_LOCAL_MACHINE\SYSTEM. Installing
the same hardware information on destination computers that have
different hardware could damage the system. Mark this option only if all
target machines of the installation you are capturing will have identical
hardware configuration.
356
SETUPCAPTURE
Note:
Because making changes to files on the root can have undesirable results,
changes to the top level of the root drive are not captured even if you select the
root (C:\). This limitation does not apply to directories created on the root;
directories created on the root and all their contents are captured.
357
8: TOOLS
You specify files and folders to be ignored on the File and Folder Exclusions
tab in the SetupCapture Configuration dialog. Access this tab by clicking
the Settings button in the Welcome dialog of SetupCapture. See Running
SetupCapture on page 352.
Generally, you should exclude anything that is temporary, anything that is
likely to be different based on the user or hardware, or anything that is not
relevant to the installation. SetupCapture automatically ignores certain
system files; see Files Ignored by SetupCapture on page 364 for a
complete list.
You can exclude the following:
A file. You specify the directory where it is located and the file name.
See Setting a File to Be Ignored on page 358.
A directory. You can either exclude only the files in the top level of the
directory, or exclude all contents of the directory, including
subdirectories. See Setting a Directory to Be Ignored on page 359.
Files in a directory based on a wildcard. For instance, you could
choose to exclude all temporary files on the computer by entering C:\
for the directory, entering *.tmp for the wildcard, and choosing to also
exclude files in the subdirectories of C:\. See Setting a File to Be
Ignored Based on a Wildcard on page 360.
You can set files to be ignored during SetupCapture. Edit the list of files to
be ignored from the File and Folder Exclusions tab of the SetupCapture
Configuration dialog. Access this by clicking the Settings button on the
SetupCapture Welcome dialog.
358
SETUPCAPTURE
2. Click the Browse button next to the File/Wildcard field to select a file.
The Directory field is filled in for you automatically.
3. If you want the specified file to be ignored not only in the directory you
selected, but also in all its subdirectories, mark the Exclude Sub-
Directories checkbox.
4. Click OK.
Note:
To exclude the file or wildcard for all local drives, leave the Directory field
blank.
If this file changes during an installation that you are capturing, it will be
ignored. To edit the exclusion, double-click it in the list.
You can set directories to be ignored during SetupCapture. Edit the list of
directories to be ignored from the File and Folder Exclusions tab of the
SetupCapture Configuration dialog. Access this by clicking the Settings
button on the SetupCapture Welcome dialog.
359
8: TOOLS
360
SETUPCAPTURE
361
8: TOOLS
362
SETUPCAPTURE
Tip:
Do not capture .MSI installations with SetupCapture because they cannot be
captured correctly with SetupCapture. You can open and edit .MSI-based
installations in Wise for Windows Installer, another Wise Solutions product.
363
8: TOOLS
364
APPLICATIONWATCH
ApplicationWatch
This tool helps you start an installation for an application that’s installed on
a local hard drive on your system. It monitors your system as you execute
that application, automatically determining which .DLL, .OCX, and .EXE
files are used by the application. It provides a basis for a new installation
by adding these files to a WiseScript. You can also use this tool for
informational purposes; if you want to learn what .DLL, .OCX, and .EXE
files are accessed by an application or installation, run this tool during
execution of the application or installation.
If you want to completely recreate an installation, and you have the setup
program that installed the application, use SetupCapture instead of
ApplicationWatch. SetupCapture produces a complete record of the files
and system changes made during installation while ApplicationWatch only
records what .DLL, .OCX, or .EXE files are accessed during execution of an
application.
Before beginning this process, close all other applications that are running;
otherwise files accessed by other applications are recorded.
Note:
Items you enter in the System .DLLs to Exclude listbox in Preferences are
ignored during the import process. See Setting Preferences on page 43.
365
8: TOOLS
366
APPLICATIONWATCH
Based on the files that were accessed by the target application, accessed
files are added to the Files page in Installation Expert. You can use this
information as a starting point for developing a complete installation, or
simply use it for informational purposes. As with any installation, you
should compile and test the installation thoroughly to make sure it
operates correctly.
Warning:
Check the files listed on the Files page carefully: they might be platform-
specific or non-distributable Windows system files. As a general rule, you should
not replace system files on the destination computer unless you have a specific
reason for doing so. For instance, you might need to upgrade a particular Windows
system file to ensure that a call your application makes will work correctly.
Replacing system files blindly could adversely affect the performance of the
destination computer’s operating system. If you are not sure about a file, check
with Microsoft developer documentation.
367
8: TOOLS
Note:
Items you enter in the System .DLLs to Exclude listbox in Preferences are
ignored during the import process. See Setting Preferences on page 43.
368
IMPORT VISUAL BASIC PROJECT
2. In the VB Project File field, specify the path to the project (.VBP) file,
then click Next.
The Select Visual Basic Directory dialog appears.
3. In the VB Directory field, specify the path to the Visual Basic directory,
then click Next.
The VB directory contains the support files that must be included as
part of the installer because they are needed by the Visual Basic
program.
The Dependency Files Not Found dialog appears. This lists the files
referenced in the VB project file that are not available on your
computer, such as .OCX files. This window might not appear if all the
necessary files are available.
369
8: TOOLS
4. Mark the checkbox next to any common files that should already exist
on the destination computer, then click Next.
This causes the Wise Installation System to refrain from alerting you of
these missing files in the future.
If there are any missing files, the Files Not Found dialog appears.
5. If the Files Not Found dialog appears, click each file in the list, then
click Browse to locate the file.
6. Click Next when you finish specifying the location of all missing files.
The Select Files dialog appears, listing files referenced in the Visual
Basic project file.
370
IMPORT VISUAL BASIC PROJECT
7. To add a new file to the list, click the Add button and locate the file. To
remove a file from the list, select it and click the Delete button.
8. Click Next when you are finished adding or deleting files.
The Application Installation Information dialog appears so you can
enter details about the installation.
371
8: TOOLS
• Icon Name. Enter the name you want to assign to the .EXE file’s
icon in the program folder.
• Start Menu Name. Enter a name for the folder that will appear in
the Programs folder in the Windows Start menu. If you leave this
blank, the folder is placed in the top level of the Start menu.
• Help File Icon Name. Enter a name for the icon assigned to your
program’s .HLP file. This field is disabled if the Visual Basic project
contains no help file.
10. Click Finish to complete the import.
The Visual Basic project is now integrated into your Wise Installation
System installation file, and your installation contains all the
information it needs to install the Visual Basic project. Options have
been filled out on the Files, Shortcuts, and Product Details pages in
Installation Expert. As with any installation, you should compile and
test the installation thoroughly to make sure it operates correctly.
372
Chapter 9
Using WiseUpdate
373
9: USING WISEUPDATE
Phase 3: • Develop installation for new version • Contains the WiseUpdate configuration file:
When you update • Configure WiseUpdate: - Stores the new version number of software
- Specify new version of software - Stores URLs to the new installer and ReadMe
your software to - Specify location of updates on Web • Contains the new installer and its ReadMe
a new version, (location info must be identical to
previous version’s location info)
you... • Use the Distribution wizard (FTP) to:
- Create / upload WiseUpdate config file
- Upload the installer and its ReadMe
Phase 4: • Presents the user with an upgrade wizard • Contains the WiseUpdate configuration file:
When • Reads WiseUpdate configuration file on host - Stores the new version number
• Determines that a new version exists - Stores URLs to the new installer and ReadMe
WiseUpdate • Contains the new installer and its ReadMe
• Displays ReadMe to user
Client is opened
• Downloads new version of installer
on the user’s • Runs the installer
computer, it... • Updates local version number
374
USING WISEUPDATE IN YOUR INSTALLATION
The steps below illustrate the process you go through to successfully use
WiseUpdate.
1. On the WiseUpdate page in Installation Expert, mark the Include
WiseUpdate Client option.
This causes the WiseUpdate Client, a small executable file, to be
included in your installation and installed in your main application
directory along with your software.
2. Configure the WiseUpdate page. See Configuring the WiseUpdate Page
on page 376 for details.
• In the Host fields, enter connection information for an HTTP (Web
server) location where updated installer files are stored.
• The Update Filename field contains the name of a server
configuration file—the Distribution Wizard creates and uploads this
file to the Internet host (see next step).
• The Product Version is very important because the WiseUpdate
Client on your end users’ machines uses it to determine if the end
user needs an update.
3. When your installation is tested and ready for customers, click the
Compile button and run the Distribution Wizard. See Using the
Distribution Wizard to Upload WiseUpdate Files on page 379 for details.
If your network setup requires that you use a proxy server to FTP files,
you cannot use the Distribution Wizard. See Using WiseUpdate Without
the Distribution Wizard on page 380.
In the Distribution Wizard, you specify FTP (FTP Server) connection
information that points to the same directory specified in the Host
fields on the WiseUpdate page. The Distribution Wizard uploads the
compiled installer files, a ReadMe file of your choice, and the server
configuration file.
375
9: USING WISEUPDATE
Note:
Make sure that you use the Distribution Wizard to upload WiseUpdate
information before deploying your software to your customers. If you do not,
they see an error when they attempt to check for upgrades.
376
USING WISEUPDATE IN YOUR INSTALLATION
Note:
The Internet location you choose must be accessible through both
the FTP and the HTTP protocol—you use FTP (in the Distribution Wizard) to
transfer files to it, and your customers use HTTP (WiseUpdate Client) to
read and download files from it. See WiseUpdate Tips and Troubleshooting
on page 387.
377
9: USING WISEUPDATE
• Host Directory. Enter the directory name on the host that stores
the WiseUpdate configuration file. Your installer and its ReadMe are
also stored in this directory. Leave this field blank to put the files on
the top level of the host.
• Update Filename. Enter a name for the configuration file for
WiseUpdate. This can be any name you choose, because it is for a
configuration file that has not yet been created, but keep in mind
that you must use the same file name when you use WiseUpdate in
the future. For example, enter WiseUpdate.INI for the file name.
The file, which is created and uploaded by the Distribution Wizard, is
in .INI file format and contains information you enter on the
WiseUpdate page. See Using WiseUpdate Without the Distribution
Wizard on page 380 for an example of the file. It resides on the host
in the host directory you specified, and is read by the WiseUpdate
Client to determine if a new version exists, and if so, where to find
the new version and its ReadMe.
• Product Version. Enter the version of the current installation. This
version is stored in the configuration file specified in the Update
Filename field.
• Check Interval (days). This field works in conjunction with the
Add client to StartUp group checkbox. If you place the
WiseUpdate shortcut in the StartUp group on the destination
computer, the WiseUpdate Client runs silently every time the
destination computer is restarted or the end user logs into Windows.
If the time interval has not been reached, is simply runs silently,
checks the time interval, and quits. However, after the number of
days you enter in this field have elapsed, instead of running silently
and quitting, it runs with its normal interface and prompts the end
user to check for updates.
• Alternate Web Page. If, for any reason, the WiseUpdate Client
cannot check for updates or download the installer, it prompts the
end user to open the browser to the Web page specified in this field.
You might direct the end user to a technical support page, a page
that contains upgrade information, or a page that discusses possible
problems.
• Start Menu Icon. Choose a name for a shortcut to be created in the
end user’s Windows Start menu. The shortcut opens the WiseUpdate
client, giving end users the option to check for updates whenever
they want. To let your end users know the function of this shortcut,
give it a descriptive name, such as “Update WidgetWare.” This name
cannot contain special characters such as /, :, *, or ?. If you leave
this field blank, make sure you mark the Add Client to Startup
group checkbox so that the WiseUpdate Client runs automatically.
378
USING WISEUPDATE IN YOUR INSTALLATION
379
9: USING WISEUPDATE
Technical Note:
The Distribution Wizard connects to the directory through FTP, and the
WiseUpdate page contains HTTP logon information. The logon information for
FTP might be different from that of HTTP even though both point to the same
directory on the same host. This is because a Web server and an FTP server
running on the same computer can have different sets of users and passwords
and can use different aliases to refer to the same physical directory.
380
USING WISEUPDATE IN YOUR INSTALLATION
The Distribution Wizard can only FTP files directly; if your network setup
requires that you FTP files through a proxy server, or if your HTTP server
does not support FTP uploads, you cannot use the Distribution Wizard to
FTP the files to the Internet host. However, you can still use WiseUpdate,
but you must manually do what the Distribution Wizard does automatically.
You must place three items at the Internet location you specified on the
WiseUpdate page:
The compiled installer file or files.
Note:
When you type the URLs to the installer and ReadMe, make sure they
match the case of the actual path on the server. Some HTTP servers are case-
sensitive and display errors if the case does not match exactly.
Testing WiseUpdate
After you’ve configured the WiseUpdate page in Installation Expert and
used the Distribution Wizard to upload files, you are ready to test the
WiseUpdate process. You should fully test the entire WiseUpdate process
before deploying your software. Follow the steps below to see how the
process works from the customer’s point of view. You must have followed
the steps in Configuring the WiseUpdate Page on page 376 and Using the
Distribution Wizard to Upload WiseUpdate Files on page 379 before you can
test WiseUpdate.
381
9: USING WISEUPDATE
To test how WiseUpdate works when your customer has the latest
version:
1. Install your application on a separate, testing computer (not your
development machine).
2. On the testing computer, open the WiseUpdate Client by selecting the
icon from the Start menu. It is named whatever you specified in the
Start Menu Icon field on the WiseUpdate page in the Installation
Expert.
A WiseUpdate Client opens, customized with your software’s name.
3. Click Next.
The WiseUpdate Client uses the HTTP connection information that you
specified on the WiseUpdate page to read the server configuration file.
If you are running the same version of your software as that on the
server, the WiseUpdate client tells you that you have the latest version.
382
USING WISEUPDATE IN YOUR INSTALLATION
383
9: USING WISEUPDATE
384
CONFIGURING WISEUPDATE FOR SUBSEQUENT VERSIONS
385
9: USING WISEUPDATE
386
WISEUPDATE TIPS AND TROUBLESHOOTING
387
9: USING WISEUPDATE
388
Chapter 10
Advanced Scripting
389
10: ADVANCED SCRIPTING
Note:
To test the options without the scheduling program, open a command
line window and type a command line statement. Click the Windows Start
menu, select Run, type command (Windows 9x) or cmd (Windows NT), and
click OK.
390
USING SCRIPT SAMPLES
391
10: ADVANCED SCRIPTING
392
TROUBLESHOOTING SCRIPT SAMPLES
393
10: ADVANCED SCRIPTING
394
SOLVING PROBLEMS BY USING SAMPLE SCRIPTS
395
10: ADVANCED SCRIPTING
396
SOLVING PROBLEMS BY USING SAMPLE SCRIPTS
397
10: ADVANCED SCRIPTING
398
MANIPULATING STRINGS AND PERFORMING CALCULATIONS
399
10: ADVANCED SCRIPTING
400
USING CUSTOM DIALOG EXAMPLES
Program field is executed. Each of the hot text options in the dialog
have similar settings to initiate actions based on mouse clicks.
401
10: ADVANCED SCRIPTING
402
USING CUSTOM DIALOG EXAMPLES
403
10: ADVANCED SCRIPTING
404
USING CUSTOM DIALOG EXAMPLES
405
10: ADVANCED SCRIPTING
406
USING CUSTOM DIALOG EXAMPLES
407
10: ADVANCED SCRIPTING
408
PERFORMING WEB AND FTP TRANSACTIONS
409
10: ADVANCED SCRIPTING
410
CHECKING SYSTEM CONFIGURATION WITH SAMPLE SCRIPTS
Note:
The Display control panel Settings tab indicates what color palette is set on
the computer.
411
10: ADVANCED SCRIPTING
412
Chapter 11
Troubleshooting
Installations
You can choose from several options when you debug your installations.
You can use the installation log to determine what is really happening
during your installation, including what fails. You can use the built-in
debugger, as described in Debugging Scripts on page 162. Or, you can use
compiler variables to build a debug version of your installer .EXE that
displays values of variables and other useful information while it is
executing. The compiler itself helps ensure stability because it checks that
all required information is present before it builds an installer .EXE.
Topics in this section cover:
Using the Installation Log to debug your script.
413
11: TROUBLESHOOTING INSTALLATIONS
414
FILE REPLACEMENT PROBLEMS IN SYSTEM32
415
11: TROUBLESHOOTING INSTALLATIONS
416
Chapter 12
Quick Reference
This section contains reference material that you might need when you are
developing installations. It contains lists of variables, language codes, and
command line options.
417
12: QUICK REFERENCE
Standard Variables
The following variables are set automatically by the Wise Installation
System or by the script generated by Installation Expert. Many of these
variables can be modified by a script, but their initial values are set before
the script executes.
Variable Description
418
STANDARD VARIABLES
Variable Description
Variable Description
419
12: QUICK REFERENCE
Variable Description
420
STANDARD VARIABLES
Variable Description
421
12: QUICK REFERENCE
Runtime Variables
The following runtime variables might be set and/or used by script actions
generated by Installation Expert. Some variables might not have values
assigned, depending on settings you chose in Installation Expert.
Variable Description
APPTITLE The title of the installation as entered in
Installation Expert.
BACKUP Pathname to the end user’s selected backup
directory on the destination computer.
BRANDING If set to 1, end user information is written to
CUSTDATA.INI in the directory containing the
installation .EXE.
CDESKTOPDIR Common desktop directory for adding shortcuts
to desktop.
CGROUPDIR Path to the directory where shortcuts for all users
are stored on Windows NT/2000/XP operating
systems.
COMMON Common files directory.
COMPONENTS A list of the components the end user selects for
installation on the destination computer (A for
first component, B for second, etc.).
CSTARTMENUDIR Common Start menu directory for adding
shortcuts to Start menu.
CSTARTUPDIR Common StartUp directory for adding shortcuts
to StartUp group.
DESKTOPDIR Desktop directory for adding shortcuts to
desktop.
DIRECTION Used by Wizard Loop action to control direction of
motion through dialogs.
DISPLAY Holds the name of the current Wizard dialog
(read-only).
DOBACKUP Holds the end user’s choice as to whether to back
up replaced files.
DOBRAND If set to 1, this is the first time the installation has
been branded and user information is written to
CUSTDATA.INI.
422
STANDARD VARIABLES
Variable Description
423
12: QUICK REFERENCE
Expression Operators
In conditionals, loops, and Set Variable commands, you can use symbols
like + and – for addition and subtraction, functions like Left$ to work with
bits of text, and logical (Boolean) operators like AND and OR to combine
several conditions into one.
Operators can operate on a variable or on a constant. There are two types
of constants: numeric and string. Numeric constants must be a positive or
negative integer, such as 234 or -100. Strings must be enclosed in double
quotes.
If you enter a variable name instead of a number or string in any of the
functions below, do not enter the percent signs (%) around the variable
name. Variables must follow the standard naming conventions, described
in Variables and Expressions on page 167.
To read about a script that demonstrates using expression operators, see
Parsing Strings Using Expression Operators on page 398.
Operator Description
+ Addition
– Subtraction
* Multiplication
/ Division
Left$(str, position) For taking left portion of string, where str is the
string, and position is number of characters from
the left to return. For instance,
Left$(“windows”,3) returns “win”.
Right$(str,position) For taking right portion of string, where str is the
string, and position is the number of characters
from the right to return. For instance
Right$(“windows”,3) returns “ows”.
Mid$(str,position, For taking middle portion of string, where str is
length) the string, position is the number of characters
from the left to start, and length is the number of
characters to return. For instance
Mid$(“windows”,2,3) returns “ind”.
Concat$(str1,str2) For appending two strings together.
424
EXPRESSION OPERATORS
Operator Description
Logical
Example Description
Operator
425
12: QUICK REFERENCE
426
WINDOWS LANGUAGE CODES
427
12: QUICK REFERENCE
Option Function
428
COMMAND LINE OPTIONS
Option Function
429
12: QUICK REFERENCE
Option Function
When you use command line options for the uninstall program, you must
send it the path to the log file as a parameter. It must be the log file that is
in the same folder as unwise.exe. If the path to the log file contains
spaces, it must be surrounded by quotation marks.
Example:
"C:\Program Files\My App\UNWISE.EXE" /A "C:\Program
Files\My App\INSTALL.LOG" Widget Uninstall
You can specify the title of the Uninstall dialog that appears. Just type the
title at the end of the command line after all other options. In the example
above, the title would be “Widget Uninstall”.
430
Index
431
INDEX
432
INDEX
433
INDEX
Delete File(s) dialog 218 showing or skipping 404 Display Message Settings dialog
Delete File(s) script action 218 simple dialog 221 221
solving common problems Display Progress Message 222
Delphi page groups 38
327
dependencies Display Progress Message script
static control 304
for group 105, 213 action 222
stop ’dir exists’ message 329
desktop icon 105 stop appending to path 328 Display Progress Message
text box 309 Settings dialog 222
DESKTOPDIR 422
text control 309 Display Text File script action 224
destination computer to get filename 268
requirements 110, 110 Display Text File Settings dialog
to get text input 269 224
destination directory to let user browse 185
’dir’ exists message 329 toolbar 301 Display Variable 332
append directory problem 328 Web link 309 Distribute button 21
setting default 91 wizard loop dialogs 290 Distribution Wizard
user-selectable 70 Dialog Box Properties dialog 295, about 46
device 184 299 copying .EXE to floppies 46
dialog dialog set copying .EXE to network 48
adding button 312 creating 331 copying to FTP server 50
adding checkbox 315 custom 331 dividing numbers 398
adding combo box 317 defined 331 DLG_EVENT_TYPE 419
adding control 301, 301 example 331
DLL Parameter Settings dialog
adding drop-down 317 Dialog Set Properties dialog 332, 190
adding list box 319 332
adding radio button 314 DLL, see .DLL
adding to your script 295 Dialog Templates 297
DLLRegisterServer 281
adding wizard dialog 217 Dialogs page 70
DOBACKUP 422
aligning and spacing 302 Digital Signature page 71
branding/registration 238 DOBRAND 422
DIRECTION 422
change default image 327 document types 72
changing controls text 282 Directories to Watch
documentation, using 12
control 300 in SetupCapture 356
Also see manual
control, configuring 304 directory
DOS version, getting 242
creating 217, 295 appends to directory 328
display to user 221 changing 29 double-byte language 86
displaying rich text 309 check if exists 199 download installation 117
displaying text file 224 creating empty 211 Download Runtimes 16
edit text field 309 predefined for WinCE 127
drive
editing 296, 299 rename 277
CD-ROM, getting 243
editing control 301 setting default 91
getting first network drive 243
editing defaults 297 DirectX 100 type, getting 243
enabling,disabling controls
disabling checkbox 400 driver
333
executing program from 326 disabling control 330 defining device drivers 69
font problems 86 disabling radio button 329 MDAC 98
handling mouse event 330, ODBC 256
disk space
400 checking with .DLL 411 Duplicate Files Report 150
installation wizard 70 free disk space 196, 243 dword 190
list box 309
listing Program group 320 DISK_NUMBER 419 dword pointer 190
movie 324 DISPLAY 422
push button 312 Display Billboard script action 219
E
script 333
Display Message example 164
scripting 281, 283, 330, 401 Edit INI File script action 225
setting tab order 302 Display Message script action 221
Edit INI File Settings dialog 82,
settings 299 83, 225
434
INDEX
Edit Registry script action 227 Exit event 143, 235 File and Folder Exclusions
Edit Registry Settings dialog 227 Exit Installation script action 235 in SetupCapture 358, 358,
359, 360
Edit Text Control Settings dialog Exit Without Saving 339
309 File Associations page 72
EXPLORER 423
ellipse in billboard 343 file extensions
expression
.386 69
Else 247 about 167
.ASP 266
Else script action 231 examples 398
.AVI 265
operators 424
ElseIf 247 .CAB 122
operators, example 398
ElseIf script action 231 .DRV 69
Expression True 232, 247, 289 .FON 81
ElseIf Settings dialog 231 .GRF 339
extension
empty project 25, 37, 140 finding app for 396 .INI 272
enabling checkbox 400 setting up 72 .OCX 281
.PDF 87
enabling control 330
enabling radio button 329
F .REG 92, 227
.RPT 101
End Installation Capture dialog .SYS 69
features 66
in SetupCapture 354 .TLB 281
file .TTF 81, 276
End script action 232
4-digit modified date 243 .VXD 69
environment variable 54, 175, adding to installation 74 .WAV 265
235, 237 associating file type with
reading 242 File Properties dialog 132
program 72
error checking user input 399 association 72 file type, associating with
auto-addition of associated 74 program 72
error message
about converting script 393 check if exist 199 files
about missing files 393 converting short to long 286 excluding 358
Also refer to online copying from CD-ROM 62 self-repair 79, 108, 217, 255
Knowledgebase copying to destination Find command 147
changing text for 41 computer 253
Find File in Path dialog 235
compiler variable 43 date/time modified 242
downloading during install Find File in Path example 396
for script samples 393
version errors 44 408 Find File in Path script action 235
downloading from Web 208 Find Text in Installation Script
Evaluate Expression 286
extension 72 dialog 147
Evaluate Windows Installer finding on target computer
Condition 232 395 Finished dialog 70
Event drop-down 143 FTPing from Web 208, 408 firewall 409
Event field 142 getting size 243 First element of structure 192
getting version of 243
Events drop-down 143 floppies
in use 201
copying to 46
Exclude Registry Key installation options 77
in SetupCapture 362 long filename 286 floppy disk 87, 185
exclusion list removing 218 folder, excluding
editing files 358 rename 277 from SetupCapture 359
replace in System32 415 font 81, 276
exclusion types 358
replace on destination
EXE Name field FONTS 419
computer 79, 210, 255
in SetupCapture 354, 363 require password 78 Fonts page 81
Execute Installation dialog search for 277 Frame/Rectangle Control Settings
in SetupCapture 354, 362 searching drives for 395 dialog 323
Execute Program script action 233 setting attributes 284 FTP 117
short filename 286
Execute Program Settings dialog FTP files 208
troubleshoot replacement 415
233, 326, 326 FTP Server dialog 50
version checking 79, 210, 255
435
INDEX
436
INDEX
437
INDEX
438
INDEX
439
INDEX
Run button 21, 28, 162 Add Text to Install.log 178 Play a Multimedia File 265
run program 233 Add to Autoexec.bat 180 Post to HTTP Server 266
Add to Config.sys 182 Prompt for Filename 268
runtime variable 168
Add to System.ini 184 Prompt for Text 269
runtimes Allow Floppy Disk Change 185 Radio Button Dialog 271
Apollo 98 Browse for Directory 185 Read INI Value 272
BDE 57 Call DLL Function 186 Read/Update Text File 273
Crystal Reports 101 Check Configuration 194 Read/Write Binary File 274
DAO 98 Check Disk Space 196 Reboot Sustem 275
database 97, 98 Check HTTP Connection 198 Register Font 276
downloading 16 Check If File/Dir Exists 199 Remark 276
MDAC 98 Check In-use File 201 Rename File/Directory 277
MSDE 98 Check Service 202 Search for File 277
MSJet 98 Config ODBC Data Source 204 Select Components 279
updating 16 Configure BDE 206 Self-Register OCXs/DLLs 281
Visual Basic 99 Copy Local File(s) 208 Set Control Attributes 281
Visual C++ 99 Create Directory 211 Set Control Text 282
Visual FoxPro 99 Create Service 212 Set Current Control 283
Windows 100 Create Shortcut 215 Set File Attributes 284
Custom Billboard 217 Set Files/Buffers 284
S Custom Dialog 217 Set Variable 285
Delete File(s) 218 Set Windows Installer
sales number, Wise Solutions 12 Display Billboard 219 Property 286
Display Message 221 Start/Stop Service 287
Samples directory 391
Display Progess Message 222 While 288
Save Changes and Exit 339, 339 Display Text File 224 Win32 System Directory 289
scaling billboard 61 Edit INI File 225 Wizard Loop 290
screen color requirements 110 Edit Registry 227 Script Editor
Else 231 about 27, 139
Screen page 102 ElseIf 231 action list 142
screen resolution requirements End 232 creating action 153
110 Evaluate Windows Installer customized list 151
script Condition 232 defined 20
include script, see include Execute Program 233 Events drop-down 143
script Exit Installation 235 line colors 44
see also script actions Find File in Path 235 navigating to 21
adding actions to 146 Get Environment Variable 237 relation to Expert 140
basic concepts 166 Get Name/Serial Number 238 toolbar 141
colors 142 Get ProgMan Group 240 window 141
commenting out lines 147 Get Registry Key Value 241 window described 27
comments 276 Get System Information 242 working with 140
converting 21 Get Temporary Filename 244
script samples
debugging 28, 162, 162 Get Windows Installer
documentation 392
editing 144 Property 245
missing file messages 393
explained 170 Halt Compilation 246
opening 392
find 147 If 247
REM statements 392
place new lines after 44 Include Script 248
solving problems with 395
referencing compiler variables Insert Line into Text File 249
troubleshooting 391, 393
64 Install DirectX 251
using 391
replacing 149 Install File(s) 253
samples 391 Install ODBC Driver 256 scripting a dialog 401
saving 144 Install WinCE Component 258 Search for File dialog 113
Install WiseUpdate Client 259 Search for File script action 277
script actions
Modify Component Size 262
Add BDE Alias 174 Search for File Settings dialog 278
Open/Close Install.log 262
Add Directory to Path 175
Parse String script action 263 Search.WSE 395
Add ProgMan Icons 176
Pause 265
440
INDEX
searching for files 395 Set Windows Installer Property SmartPatch page 108
sections 82 Settings dialog 287 SMS
Select Component Settings dialog setup program creating .MIF file 87
280 capturing 353 sound support requirements 110
Select Components script action setup program, changing 64 source directories 29
279 SETUP.DLL (WinCE) 134 source files
Select Dialog to Edit dialog 298 Setup.EXE 429 changing location 29
Select File from Installation dialog SetupCapture relative path 32
69, 72, 103, 106 capturing .MSI 352 UNC path 30
selecting components 70 capturing deletions 355 specify proxy server information
capturing multiple 17
self register (WinCE) 133
installations 352, 354 specifying system requirements
Self-Register 210, 254 directories to watch 356 110
Self-Register OCXs/DLLs script excluding a file 358
Standard tab 142
action 281 excluding a folder 359
excluding registry key 362 Start menu 105, 215, 320
self-repair
about 34 excluding registry value 362 Start menu (WinCE) 137
files 79, 255 executing installations 362 Start/Stop Service Details dialog
registry value 95, 228, 230 files ignored 364 287
turning on 108, 217 guidelines 351
procedure 351 Start/Stop Service script action
using 35 287
uninstall, capturing 352
serial number 90 using 351, 352 starting installation 70
serial number, getting from user using wildcards 360 STARTMENUDIR 423
238 SetupCapture wizard 350 STARTUPDIR 423
server, Internet 117 Share Support 100 static control 304, 322
service shared .DLL 79, 79, 210, 210, Status MIF
checking 202, 202 254, 254 see Microsoft SMS
controlling behaviour 104
creating 103, 212 Shared Directory 45 string 263
starting 287 shared file string buffer 190
stopping 287 keeping track of 79, 254
string pointer 190
service pack number, getting 243 shared file (WinCE) 133
structure
Services page 103 shared workstations 138 complex 192
Set Control Attributes dialog 282 shell execute 233 passing params example 192
shell link 105, 215 passing to DLL 191
Set Control Attributes script
action 281 shell link (WinCE) 137 support 14
newsgroups 13
Set Control Text dialog 282 short 190 online support 13
Set Control Text script action 282 short pointer 190 searchable knowledgebase 13
Set Current Control dialog 283 shortcut SYS 421
Set Current Control script action adding 105, 215 SYS32 421
283 creating 215
details 107 System attribute 284
Set File Attributes dialog 284
for WinCE 137 system configuration, checking
Set File Attributes script action with .DLL 411
284 Shortcut Details dialog 107
Shortcuts page 105 System Requirements page 110
Set Files/Buffers dialog 285
silent compile 428 system requirements, Wise
Set Files/Buffers script action 284 Installation System
Set Variable dialog 285 silent install 428 Refer to Getting Started Guide
Set Variable script action 285 silent mode 429 System Restore Snapshots, in
Set Windows Installer Property size of file 243 Windows ME 62
286 SmartPatch 79, 210, 253, 255 System Search page 112
441
INDEX
442
INDEX
WinCE Installation pages 121 Windows XP service 212 using Distribute with 379
WinCE Platform page 134 WinExec 233 using with SmartPatch 386
using with WebDeploy 386
WinCE Registry page 135 WinSock.dll 198
WiseUpdate page 373
WinCE Shortcuts page 137 Wise include scripts 144
WiseUser page 138
window background 102 Wise Installation System
launching 24 wizard
Windows
ApplicationWatch, about 365
language codes 426 Wise scripting language 173
SetupCapture 351
logon name, getting 243 Wise Solutions
runtime components 100 wizard dialog
getting updates 15
version, getting 242 changing image 327
sales number 12
for installation 70
Windows 2000 page technical support 14
see Add/Remove Programs Wizard Loop script action 290
WISE_ERROR_RTN 235, 423
Windows 2000 service 103, 202, Wizard Loop Settings dialog 291,
Wise32.EXE, run from command
212, 287 327
428
Windows CE Components dialog Wizard Loop, adding dialog 217
WiseUpdate
127 about 373 wizards (Wizard view)
Windows CE Shortcut Properties configuring 376 about 350
dialog 137 customizing 387 defined 20
process overview 374 for creating installation 350
Windows NT service 103, 202,
running from your app 387 Import VB Project 350
212, 287
running silently 387 word 190
Windows Runtime page 97, 100
troubleshooting 387 word pointer 190
Windows XP 287 Update Filename 381
443
INDEX
444