Wise Script Editor
Wise Script Editor
5)
Copyright
© 1994-2004 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®; ExpressBuild™; Installation Development Life
Cycle™; InstallBuilder®; InstallMaker®; InstallManager®; InstallTailor™; MSI Debugger™; MSI Script™;
PackageManager™; Preflight Deployment™; SetupCapture®; SmartMonitor™; SmartPatch®; Software Distribution
Made Easy™; Software Installations Made Easy®; Visual MSIDiff™; Virtual Capture™; WebDeploy™; Wise Installation
System®; Wise Package Studio®; Wise Software Repository™; 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
1 Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Documentation Roadmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Getting Help and Product Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3
Product Details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Progress Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
SmartPatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
System Search. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Uninstall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
WebDeploy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4 Setup Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
About Setup Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
The Setup Editor Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Choosing a Script to Edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Editing the Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Adding New Actions to a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Finding Text in a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Replacing Text in a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Checking for Duplicate Files in Include Scripts . . . . . . . . . . . . . . . . . . . . . . . 68
Customizing the List of Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
About User-Defined Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Creating a User-Defined Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Creating a User-Defined Action Tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
About Debug Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Using the Debug Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Building a Debug Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Basic Scripting Concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Conditionals and Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Variables and Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Compiler Variables vs. Runtime Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Anatomy of a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
About Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5 WiseScript Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
WiseScript Editor and Wise Installation System Script Actions . . . . . . . . . . . . 83
Add Directory to PATH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Add ProgMan Icons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Add Text to INSTALL.LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Add to AUTOEXEC.BAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Add to CONFIG.SYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Add to SYSTEM.INI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Allow Floppy Disk Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Browse for Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Call DLL Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Check Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Check Disk Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Check HTTP Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Check If File/Dir Exists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Check In-use File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
4
Check Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Compiler Variable If/Else/End . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Config ODBC Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Copy Local File(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Create Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Create Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Create Shortcut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Custom Billboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Custom Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Delete File(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Display Billboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Display Message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Display Progress Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Display Text File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Edit INI File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Edit Registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Else Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
ElseIf Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
End Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Evaluate Windows Installer Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Execute Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Exit Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Find File in Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Get Environment Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Get Name/Serial Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Get ProgMan Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Get Registry Key Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Get System Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Get Temporary Filename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Get Windows Installer Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Halt Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
If Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Include Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Insert Line Into Text File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Install File(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Install ODBC Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Modify Component Size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Open/Close Install.log. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Parse String. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Pause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Play Multimedia File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Post to HTTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Prompt for Filename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Prompt for Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Radio Button Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Read INI Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Read/Update Text File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Read/Write Binary File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Reboot System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Register Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Remark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Rename File/Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
5
Search for File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Select Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Self-Register OCXs/DLLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Set Control Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Set Control Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Set Current Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Set File Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Set Files/Buffers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Set Variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Set Windows Installer Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Start/Stop Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
While Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Win32 System Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Wizard Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
6
Setting Billboard Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
7
Chapter 1
Welcome
8
Documentation Roadmap
Documentation Roadmap
The WiseScript Editor documentation assumes that you are proficient in the use of the
Windows operating system. If you need help using the operating system, consult its user
documentation.
Use the following sources of information to learn WiseScript Editor.
Online Help
The online help contains detailed technical information and step-by-step instructions for
performing common tasks. For details on using help, see Check Online Help on page 10.
Reference Manual
All the material in the online help is also available in a .PDF-format reference manual,
which you can access by selecting Help menu > Reference Manual.
Release Notes
A release notes document, in .HTM format, covers new features, enhancements, bug
fixes, and known issues for the current version of this product. It also contains links to
release notes for other versions. Access the release notes in the following ways:
! Browse the product CD.
! In Wise Package Studio, select Help menu > Release Notes.
! If you are a registered user, visit http://support.wise.com to enter the Support
Center, and then click the Downloads link.
9
Getting Help and Product Support
Subscribe to TechInfo
TechInfo is a free e-mail newsletter that contains technical tips, product updates, and
other important technical information. To subscribe or to read back issues, visit
www.wise.com/techinfo.asp.
10
Getting Help and Product Support
development, and other solutions that are fully customizable to fit your project and
budget. Visit www.wise.com/consulting.asp for details.
To upgrade your installation and packaging skills, consider Wise Solutions training. Our
certified instructors draw from practical experience to provide relevant course content.
Visit www.wise.com/training.asp for course descriptions and schedules.
11
Chapter 2
WiseScript Editor Basics
Read this overview before you create an installation. It discusses the process of creating
and maintaining installations.
Topics include:
! WiseScript Editor Views.
! Creating a New Installation.
! Installation Management.
! Customizing Your Development Environment.
12
WiseScript Editor Views
13
Getting Started
Getting Started
Following is a broad outline of possible steps for building and distributing an installation:
1. Create a new installation. See Creating a New Installation on page 14.
2. Set options on the Installation Expert pages to create basic installation functionality.
See Using Installation Expert on page 15 and Installation Expert Pages on page 26.
3. Edit the script in Setup Editor to create advanced installation functionality. See
Setup Editor on page 62 and WiseScript Actions on page 83.
4. Create or modify dialogs. See Creating Custom Dialogs on page 134.
5. Test and debug the installation. See Compiling, Testing, and Running the
Installation on page 16 and Using the Debug Commands on page 75.
6. Explore options for outputting the installer .EXE file and prepare it for distribution.
See Media on page 43 and WebDeploy on page 58.
7. Use the Package Distribution tool in Wise Package Studio to distribute the
installation into a variety of formats. To simply create a compiled .EXE, click
Compile. See Package Distribution in the Wise Package Studio Help.
Note
The Blank Script icon creates a blank script, which you code from scratch. If you select it,
you cannot see all the pages in Installation Expert. See Navigating Between Views on
page 13.
4. Click OK.
The installation opens, and you can edit it on the pages in Installation Expert or by
adding script actions in Setup Editor.
14
Getting Started
Use ( ) in the toolbar to navigate from page to page, or click the page name in the
list of pages. To expand or collapse a page group, click its name. To return a page to its
last saved state, select Edit menu > Reset Page.
When you
select different
Page groups page names,
with pages. this area
changes to
display the
page’s options.
15
Getting Started
List of
available script
actions.
Double-click a
script action to The Installation
insert it in the Script contains
script. the commands
to be executed
when you run
the installation.
The Standard
tab shows all
actions. Set the Include script
Custom tab to tabs. Click tabs
show actions to switch
you use between scripts.
frequently.
Add script lines by double-clicking an action, and then selecting options for the action on
a dialog. The script is displayed in English-like terminology to help with testing and
troubleshooting. For details, see Setup Editor on page 62 and WiseScript Actions on
page 83.
Note
You can also use Setup Editor’s debugging functions to test the script. See About Debug
Commands on page 75.
16
Getting Started
! Compile
Click Compile to build a single executable file that contains the installation script as
well as all the files needed for the installation. This is the installer .EXE that you
distribute to end users. If any files are absent or not readable, error messages
appear when compiling. The installation is saved each time you compile unless you
mark the Prompt to Save checkbox in Preferences; see Setting Preferences on
page 23.
! Test
Click Test to compile and run the installation in test mode. In test mode, the
installation performs all script actions without actually installing or modifying files.
However, if any script lines are dependent on files being installed by previous script
lines, then test mode might fail. Example: If an Install File(s) line copies a ReadMe to
the Temp directory and a second script line attempts to launch ReadMe, the second
script line fails because the ReadMe is not in the Temp directory.
! Run
Click Run to execute the installation. The entire installation is executed just as it
would be on the destination computer.
17
Installation Management
Installation Management
There are several management tools to help maintain installations:
! To globally change source file directories, see Changing Source Directories on
page 18.
! To change the format of pathnames, see Converting to UNC-Based Source File Paths
on page 18 and Converting to Relative Source File Paths on page 19.
! To use self-repair, which enables an application to repair itself, see Using Self-Repair
on page 19.
18
Installation Management
The Change Source Directories dialog appears with a list of all the directories
referenced in the installation.
2. From Type, select Change source paths to UNC paths, and click OK.
A warning appears because this action cannot be undone.
3. Click Yes.
Converting paths to UNC-based paths does a one-time conversion of all the network
paths in the script. Paths to files that are located on local drives are not converted. If
Type is set to Change source paths to UNC paths, all network files you add
subsequently are converted to UNC-based paths. If you change Type back to Do not
modify source paths, the converted pathnames stay converted, but new files you add
do not have UNC-based paths.
Using Self-Repair
You can enable an application to repair itself. There are two ways to implement repair.
One is passive, and is included in every installation you create. The other is proactive,
and requires you to define files and registry entries that are crucial to the application.
When these files or registry entries are absent and the application is launched via its
shortcut, a self-repair process is initiated.
Both self-repair and uninstall can only be run under the same user account under which
the application was originally installed. During self-repair, 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.
19
Installation Management
To run this repair option, the end user chooses the application in the Add/Remove
Programs Control Panel and chooses the Repair option. If files need to be reinstalled, the
end user is prompted for the media or network location of the original installation.
20
Customizing Your Development Environment
Caution
Predefined templates are read-only. Editing them is not recommended, because they
might be overwritten during upgrades. Instead, save customized templates with new
names.
21
Customizing Your Development Environment
! All
Displays all page groups and all pages associated with each group.
! Properties
Displays only the pages that do not add or change script lines in the script. This page
group also appears when you select Setup Editor > Edit menu > Installation
Properties.
You can add your own sets of page groups to the Pages menu. This lets you customize
your work environment so you only see the pages you frequently use. You can edit any
set of page groups you create, but not the predefined sets. You also cannot edit page
names.
22
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.
1. To access Preferences, select Edit menu > Preferences.
2. Complete the dialog:
• Prompt to Save
Mark this to have Setup Editor prompt you to save the installation script each
time you build a new installer .EXE. If you do not mark this checkbox, the script
is always saved before compiling.
• Prompt for Changed Compiler Variables
Mark this to receive a warning if the compiler variables _WISE_ or _ODBC32_
have changed from the last time the installation script was opened.
Example: If you develop an installation script where the WiseScript Editor
application directory is C:\Wise, the compiler variable _WISE_ is set to C:\Wise.
If you then open the same script on a different computer, where the application
23
Customizing Your Development Environment
24
Customizing Your Development Environment
appear in the Actions list in Setup Editor in addition to the ones in the Actions
sub-directory.
• System .DLLs to Exclude
Enter the names of .DLL and .OCX files that should not be included when you
create a .WSE file with ApplicationWatch or Import VB Project from Wise Package
Studio. Enter one file name on each line with no other delimiter. Example: If you
are watching a Visual Basic application, you could ignore VBRUN300.DLL
because that file is accessed by Visual Basic applications, but is not necessarily
installed with the Visual Basic application.
25
Chapter 3
Installation Expert Pages
In Installation Expert, the pages are organized into logical groups and listed in the order
in which you usually use them. For quick reference, the pages here are arranged
alphabetically. See Using Installation Expert on page 15.
Active Directory
Use the Active Directory page to create a .ZAP file. You need a .ZAP file to distribute
.EXEs through Microsoft Active Directory. The .ZAP file is created in the same directory
as the installation .EXE. Microsoft Active Directory uses the information in the .ZAP file
to distribute the .EXE.
Note
Complete the Product Details and Add/Remove pages before completing the Active Directory
page. Three of the fields on the Active Directory page obtain their values from fields on those
pages.
26
Add/Remove Programs
Windows 2000 and Windows XP have an Add/Remove programs window that supports a
rich display of application information. Use the Add/Remove Programs page to enter the
information necessary to support these capabilities.
Note
The Add/Remove Programs page applies only when the application is installed on the Windows
2000 or XP platform.
! Display Icon
Select an icon to appear next to the application name in the Add/Remove Programs
window. Click Browse to select a file from the installation.
! Icon Number
Enter the resource index for the icon in the selected .EXE or .DLL file.
Note
An executable or icon 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 Change Icon. The Change Icon dialog appears. It contains a graphical list
of icons for the file. The icon number of the first icon is 0, the icon number for the second
is 1, and so on.
Autoexec.bat
Use the Autoexec.bat page to specify command lines to add to the destination
computer’s AUTOEXEC.BAT file during installation. If the AUTOEXEC.BAT file changes,
the end user is prompted to restart the computer to initiate the changes.
! Directory to add to PATH
Enter the pathname of the directory to be added. To build the directory path, use one
of the built-in WiseScript Editor runtime variables. Example: %MAINDIR% for the
27
Application directory or %SYS% for the Windows System directory. See Compiler
Variables vs. Runtime Variables on page 80.
! 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 commands to be added to the AUTOEXEC.BAT file.
To add a command line to the AUTOEXEC.BAT file, click Add and enter the command line
on the dialog. To specify how to add the command line to the AUTOEXEC.BAT file, select
it and click Details. See Specifying How to Add Commands AUTOEXEC.BAT. To remove
an existing command line, select it and click Delete.
28
• Case Sensitive
Mark this to match case.
• Make Backup File
Mark this to make a copy of Autoexec.bat before editing it.
4. Click OK.
Build Settings
Use the Build Settings page to specify options for compiling the installation.
! Maximum Compression
Mark this to make the installation file as small as possible before compiling an
installation for distribution. Since it takes longer to compile an installation when
maximum compression is enabled, disable it during development.
! Use Internal 3D Effects
This causes the installation to display 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 select TrueWin32 from
Destination Platforms, this option is disabled.
! No Reboot Message During Silent Installs
Normally, when an installation is run in silent mode, it displays a message that the
system must be restarted after installation. Mark this to not display the warning
message and to reboot 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
Mark this to have the installation add 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 the application’s installation. The installation takes longer
to perform when this is marked. This works only if you enable it in the Windows
Millennium operating system.
! Replace In-Use Files
Mark this to have the installation force the replacement of in-use files by performing
a reboot of the system. Otherwise, the end user is notified that the 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 to have these files included in
the installer .EXE so the installation can be placed on floppy disk(s). (You can exclude
individual Copy Local Files script actions from conversion by marking their Don’t
Convert To Floppy checkbox. See Copy Local File(s) on page 98.)
! Beep on New Disk Prompt
Mark this to cause the compiled installation to beep when requesting a new disk.
! ZIP Compatible
Mark this to make the compiled installation compatible with the ZIP archive format.
If you make the installation ZIP compatible, end users can extract files from it using
any unzip utility, such as WinZip. They must open the installation by selecting File
menu > Open in the ZIP utility. Double-clicking the installation launches it normally.
! Network Installation
Mark this if you are creating a network installation and want to reduce network
traffic. If this is marked, 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
29
down, reducing traffic. However, because CRC checks are time-intensive, this can
slow down the installation, so limit this option to installations that are performed
without end user intervention.
! Destination Platforms
Select the operating system for running the installation.
• Windows 3.1x, 95, and NT (Win16/Win32)
The installation can run under both Win16 and Win32 but is slower.
• Windows 95 and NT (True Win32)
The installation can run only under Win32 but is faster.
For the Pathname fields, click Browse to simplify path and file selection.
! Installation .EXE Name
Specify a name and location for storing the executable file after it is compiled. If left
blank, the name of the installation executable defaults to the name of the installation
file (*.WSE).
! Language .INI Name
To use a language that is not built into WiseScript Editor, 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 created a directory containing customized versions of dialogs and dialog
templates, specify the path to that directory.
! Temp. Files Directory
Specify the path to a directory where WiseScript Editor can store temporary files
while building the installation. If this directory is not specified, the Windows
temporary directory is used.
Compiler Variables
Use the Compiler Variables page to set compiler variables that change the compiled
setup program. There are many uses for compiler variables. You could use a compiler
variable to determine which files are included in the compiled .EXE file or to create either
a Win16 or a Win32 version of the application. You could also use them to build a debug
version of the installation, see Building a Debug Version on page 76.
To see a sample script that uses compiler variables, open the file COMPVAR.WSE from
the Samples directory in the WiseScript Editor application directory. See Creating an
Installer That Can Be Customized During Compile on page 177.
When you reference a compiler variable name in the script, you must surround the name
with percent signs. (Example: %_DEBUG_%.) For information about variables, see
Variables and Expressions on page 79. For automated build processes, you can specify
compiler variable values from the command line, by entering the value directly on the
command line or by storing the values in a text file. For information on using command
lines, see WiseScript Editor (Wise32.EXE) on page 199.
To add a compiler variable, click Add and complete the Compiler Variable Settings dialog.
This dialog also appears if you double-click a variable to edit it. See Setting Compiler
Variable Settings. To remove a variable, select it from the list and click Delete.
There are 2 options for being prompted for compiler variables:
! Compiling from Command Line
Mark this to be prompted for the value of compiler variables when you compile an
installation from the command line.
30
! Compiling from Within Wise
Mark this to be prompted for the value of compiler variables when you compile an
installation from WiseScript Editor. If you mark this, then a Select Compile Settings
dialog appears at compile time that lists this compiler variable’s values. A dialog
appears for each compiler variable you define. Value length is limited by the amount
of text that displays on the dialog. The Do not prompt for value checkbox on the
Compiler Variable Settings dialog overrides this setting.
Components
Use the Components page to add components to the installation. Components let you
add optional pieces, such as a spell checker, a tutorial, sample files, and other add-ons.
When the installation is run, end users can choose which components they want to
include. For information on building a component-based installation, see Letting the End
User Select Components and Subcomponents on page 182.
The current set of components is shown on this page in the same order that the
components are listed in the installation. Any component that is marked as being
installed by default is enabled in the component list during installation. (The end user
can still deactivate this component.)
31
Use the buttons to the right of the list to add, edit, delete, or rearrange components.
The Component Details dialog appears, if you click the Details or Add button. This dialog
lets you name or rename the component and specify whether it should be installed by
default. To remove a component select it and click Delete.
If you use components in an installation, you must assign the appropriate program files
to each component on the Files page.
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.
Config.sys
Use the Config.sys page to specify command lines to be added to the destination
computer’s CONFIG.SYS file during installation. If the CONFIG.SYS file changes, the end
user is prompted to restart the computer to initiate the changes.
To add a command line to the CONFIG.SYS file, click Add and enter the line on the
dialog. To specify how to add the command line to the CONFIG.SYS file, select it and
click Details. See Specifying How to Add Commands to CONFIG.SYS on page 32. To
remove an existing line, select it and click Delete.
32
• Comment Text
Enter text to insert at the beginning of the line that is found. Insert “REM ” (with
the trailing space but without the quotation marks) to comment out the line,
which lets you replace an existing command with a new command while leaving
the existing command in place but inactive. If this is the case, set Insert Action
to insert before the existing line so that a subsequent installation finds and edits
the active command, not the commented line.
• Insert Action
Select where to insert the new line in relation to the found line.
• Match Criteria
Select how the found line matches the Search for Text.
• Ignore White Space
Mark this to have the search operation ignore spaces and tab characters.
• Case Sensitive
Mark this to ignore spaces and tab characters.
• Make Backup File
Mark this to make a copy of Config.sys before editing it.
4. Click OK.
Devices
The Devices page lets you define device drivers to be installed under Windows 3.1x and
Windows 9x. 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 added to the installation on the Files page.
1. Select Installation Expert > Devices page.
2. Click Add.
The Select File from Installation dialog appears.
The list on the left displays the installation’s components with their directories. The
list on the right displays the device files in the selected directory.
3. To add a device to System.ini, select it from the list on the right and click OK.
To remove a device driver from the installation, select it from the list and click Delete.
If you choose a device driver that is part of an optional installation component, the
System.ini entry is added only if that component is installed.
Dialogs
Use the Dialogs page to choose and edit the dialogs that make up the wizard end users
navigate through during installation. The dialogs you choose determine the level of
control the end user has over the installation. The wizard dialogs include:
! Welcome
Welcomes the end user to the installation, suggests exiting other running
applications, and warns of the software copyright.
! ReadMe
Displays the ReadMe file for the application. When you select this dialog, the
Pathname field is enabled in the Settings section where you specify the .TXT file
for the Readme text.
! Branding/Registration
Prompts for the end user’s name, company name, and, optionally, a serial number.
33
! 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 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
This dialog informs the end user that the software was successfully installed.
To edit a dialog:
1. Select Installation Expert > Dialogs page.
2. Mark the dialog’s checkbox and click Edit.
The Custom Dialog Editor opens. For information on using the Custom Dialog Editor,
see Creating Custom Dialogs on page 134.
3. Edit the dialog.
The changes you make affect only the dialogs in this installation.
Digital Signature
Use the Digital Signature page to add an Authenticode digital signature to an installation
so its integrity and authenticity can be verified. You must have a valid VeriSign
commercial certificate to use this feature. For information about digital signatures, visit
the VeriSign Web site at www.verisign.com and search for authenticode. The digital
signature protocol of Internet Explorer 4.0 is used.
You have 2 options for adding a digital signature:
34
! Add a digital signature externally
Mark this 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, errors occur when CRC
checks are performed because of the resulting size increase. This option eliminates
those errors.
! Add a digital signature
Mark this to add a digital signature to the installation and to enable the following
fields:
• Web URL
Enter your company’s Internet Web address.
• Descriptive Name
Enter the name of your application. This name is embedded in your Authenticode
certificate to let 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
Specify your VeriSign credentials file and private key file. They must be located
in the Windows directory.
File Associations
Use the File Associations page to associate a file extension with an application that can
open a file with that extension. 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.
35
If you choose an .EXE file that is part of an optional installation component, the
association is created only if that component is installed.
Files
Use the Files page to specify the files and directories to be installed on the destination
computer. When you add files, Installation Expert does not actually copy or store the
files, but records the location of the files. The files are not copied until you compile and
build the installation. Therefore, if you change a file’s name or location, you must update
its path, otherwise you get error messages when you compile. See Changing Source
Directories on page 18.
When you add a program file to the Files page, Installation Expert searches the registry
for related information, such as file associations and icons. This information is added to
the installation 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 Setup Editor > Edit menu > Duplicate Files
Report, to find duplicate files.
The upper two list boxes display the directories and files available to your computer. The
lower two list boxes represent the directory structure and files that will be installed on
the destination computer.
Use the following buttons:
! Add Contents
Add entire directories. When you add an entire directory you can filter it using
wildcards. See Adding Contents of Directories to the Installation on page 38.
! Add File
Add single or multiple files. See Adding Files to an Installation.
36
! New Folder
Create directories to be installed on the destination computer.
! Delete Folder, Delete File
Remove a directory or file from the installation.
! Details
Edit file settings. See Specifying Installation File Settings.
37
Adding Contents of Directories to the Installation
You can add the entire contents of a directory to an installation or use wildcard filters to
add only specified files in the directory.
1. Select Installation Expert > Files page.
2. In the upper left list box, select the directory whose contents you want to add.
3. In the lower left list box, select the directory where you want to add the contents.
4. Click Add Contents.
The Add Wildcards dialog appears.
5. Complete the Add Wildcards dialog:
• Dest. Directory
Enter the name of the installation directory that will hold the contents of the
directory you’re adding. If you don’t enter a directory name, the contents are
added to the directory that’s selected in the lower left list box.
• Include Wildcard, Exclude Wildcard
To include or exclude files based on specific criteria, enter a semicolon-delimited
list of wildcards. (Example: Enter *.EXE for all .EXE files or *.DLL for .DLL files.)
If you leave the wildcard fields blank, all files in the directory are added.
• Include Subdirectories
Mark this to add all the subdirectories within the directory you’re adding. The
wildcard settings apply to the subdirectories also.
• Add as a wildcard instead of adding the files
Mark this to have the lower right list box display 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. With this option, the program does not automatically
create icons and file associations.
6. Click OK.
The contents of the directory in the upper left list box are added to the directory you
selected in the lower left list box or to the directory you specified in the Dest.
Directory field. If you specified wildcards, only files that match the wildcard criteria
are added.
38
• Description
Enter text to appear in the progress bar while this file is installed.
• Require Password
If you entered a password in Installation Expert > Password page, and you mark
this, the end user is prompted for the password before this file is installed.
The password prompt appears only once, for the first password-protected file in
an installation, regardless of the number of password-protected files. If no
password-protected files are slated for installation, the prompt does not appear.
• Include Sub-Directories
If you specify a directory in Source Pathname, mark this to include all
subdirectories and their contents.
• Shared DLL Counter
If this is marked, and the file is a .DLL or .VBX, Windows tracks the file to
prevent its removal if an installed application is still using it.
• No Progress Bar
To hide the progress bar, mark this for every file in the installation. If you mark it
for some files, but not others, the progress bar seems to display continuously
because the screen does not refresh between files.
• Self-Register OCX/DLL/EXE/TLB
All .OCXs and .TLBs and some .DLLs and .EXEs support self-registration. Mark
this so the file registers itself in the Windows registry before it is used.
• Do Not Download With WebDeploy
This checkbox is available if you click Complete support for Internet-based
installation 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.
Mark this checkbox to put the file in the installation .EXE rather than storing it as
a separate file.
• Repair application if this file is missing
Mark this checkbox to initiate self-repair if this file is missing during application
launch. This prevents your application from failing if this file is accidently
deleted. For information on setting up self-repair, see Configuring an Application
for Automatic Self-Repair on page 20.
• Replace Existing File
Specify when to replace existing files on the destination computer.
" Always
The new file always replaces the old file.
" Never
The file never overwrites an existing file. Select this for files that 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 (example:
configuration files).
" Check File
The existing file is only replaced if the requirements you set in File Version
and File Date/Time are true.
• File Version, File Date/Time
These become enabled if Check File is selected from Replace Existing Files.
" Doesn’t Matter
Select this option if only one of the requirements, File Version or File
Date/Time, must be fulfilled to replace the existing file.
39
" Same or Older
For File Version, this replaces the existing file if it has a version resource
that is the same as or older than the new file. If the existing file lacks a
version resource, it is not replaced.
For File Date/Time, this replaces the existing file if its modification date
and time are the same or older than the new file.
" Older
For File Version, this replaces the existing file if it has a version resource
that is older than the new file. If the existing file lacks a version resource, it
is not replaced.
For File Date/Time, this replaces the existing file if its modification date
and time are older than the new file.
• Retain duplicates on path
By default, version checking removes existing copies of .DLLs that are found in
the path list. To suppress this feature, mark this checkbox.
• Existing File Pathname
SmartPatch creates a patch file that contains only the differences between the
older installation and the new installation.
If you are using Smartpatch, specify the pathname where the installation can
expect to find one of the files listed in Previous File Versions. If a wildcard was
used in Source Pathname, this field should contain a directory. Start the path
with a variable.
• Previous File Versions
Use the Browse button to create a list of files that are older versions of the file or
files being installed.
Note
Rather than specifying SmartPatch information for each file, you can use the SmartPatch
page in Installation Expert to specify entire directories that contain older versions of your
files. See SmartPatch on page 53.
4. Click OK.
Fonts
Use this page to add fonts to an 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.
40
The font is added to the selected component. To remove an existing font, select it on the
Fonts page and click Delete.
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). The
end user sees this information by right-clicking the setup file and selecting Properties.
If you plan to use an automated build system and want to set these values at compile
time, create compiler variables to set these values, and enter the compiler variable
name, surrounded by percent signs, in these fields. 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 30.
Enter information about your application in the following fields:
! Installation Version
The version number of the installation.
! Description
A description of the installation, perhaps including your application’s name.
! Copyright
The copyright notice for the installation.
! Company Name
The name of your company.
INI Files
The INI Files page lets you create a new .INI file to store your program’s settings, or
update an .INI file on the destination computer during installation.
1. Select Installation Expert > INI Files page.
2. Select the destination directory from the left list.
3. Click New File to open the Edit INI File Settings dialog.
4. From File, select a default path where the .INI file is stored.
Example: %SYS32%\NONAME.INI.
5. Overwrite the default NONAME.INI with the appropriate name.
Example: System.ini.
6. In INI File Contents, enter the information that appears in the .INI file.
You can copy and paste the .INI contents from an existing file into this field. You
must enter at least one section heading and one command line.
If you create an .INI file to update a system file on the destination computer, your
settings are merged into the existing system file during the installation. Any
duplicate settings are overwritten with the values you enter here.
7. Click OK.
To remove an .INI file, select it in the list on the right and click Delete. To edit an
existing .INI file, select it in the list on the right and click Details. See Editing INI File
Settings.
41
The Edit INI File Settings dialog appears.
3. Complete the dialog:
• File
Displays the pathname to the .INI file. Installation Expert uses a variable
(example: %MAINDIR%) to refer to the directory. To edit this field, you must
create a new .INI file item.
• INI File Contents
Enter changes to make in the .INI file. Changes are interpreted as follows:
" To add to a section, type the section name in brackets, then type new lines
for that section. If the .INI file already contains a name-value pair that you
type, the existing line is replaced by the new one. Example:
[SECTIONNAME]
Color=Blue
" To delete a section and its contents, type a section name with no lines after
it. Example:
[SECTIONNAME]
" To delete a name-value pair, type the name with an equals sign followed by
nothing. Example:
Color=
" Comments (lines starting with ;) are not supported.
" You can enter variables in INI File Contents to insert the values of script
variables into the .INI file. See Variables and Expressions on page 79.
4. Click OK.
Installation Log
Use the Installation Log page to create an installation log and to specify its location and
name. As an alternative, set the compiler variable _LOGFILE_PATH_ to the path of the
log file.
The installation log is a text file that lists the events that occur while the installation
runs. (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.
! Do not create installation log
Mark this if you do not want an installation log to be created. 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
This saves the installation log in the root, because the first Install File action is in the
uninstal.wse include script, which appears before any of your Install File lines. This
option is included for backwards compatibility with WiseScripts from previous
versions of the Wise Installation System.
! Create installation log in custom directory
Mark this to save the installation log in a directory you specify. This enables the
options for selecting the directory. Select a directory and enter a name for the
installation log in Install Log File Name. (Example: Install.log.) To create a new
directory for the log within the Application or Windows directory, click New Folder.
42
Languages
Use the Languages page to define the languages supported by the installation, the
default language, and the font used by the Japanese version of the installation.
Note
If you are working with a double-byte language do not include any other languages in the
installation. 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 to copy messages from the default language to all others to provide a
starting point for translating the message.
Example: Your installation supports two languages and you add a Display Message
action to your script with English selected in Setup 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 to have the installation always prompt the end user to select a language,
unless there is only one language in the installation.
Media
Use the Media page to configure the installation for the type of media on which it will be
stored and distributed.
43
! Single File Installation
Mark this to pack all the files into a single installation file. This is convenient if you
plan to distribute the 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 to break the installation into files that fit on a specific type of removable
media and to enable the following fields:
• Media Type
Select the type of media 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 this field.
Microsoft SMS
If an installation runs in a Microsoft Systems Management Server (SMS) environment,
you can have the installation create a status .MIF file and a definition file (.PDF or .SMS)
in the Windows directory during compile. Use the Microsoft SMS page to specify the
information for the .MIF file and package definition file. For information about SMS, see
msdn.microsoft.com.
! Install MIF Filename
Enter the name of the application being installed. Example: sample.mif.
! Uninstall MIF Filename
Enter the name of the application being uninstalled. Example: uninstall_sample.mif.
! Manufacturer, Product, Version,
Enter the manufacturer, name, and version number of the application. These fields
are required. If they are left blank, the package definition file is not created.
! Serial Number
Enter the serial number of the application being installed.
! Package Definition File
To create a package definition file when the installation is compiled, mark e one of
the following and enter the correct SMS version:
• Create Package Definition File (SMS 1.2 or earlier)
Mark this to create a package definition file of file type .PDF.
• Create SMS File (SMS 2.0 or later)
Mark this to create a package definition file of file type .SMS.
To distribute the package definition file with the installation using Package Distribution in
Workbench, select Network and the Installation (.exe) option on the Distribution
Method dialog. If you distribute the installation to the share point directory and import it
into Software Manager, the installation and the SMS package definition file are copied to
the share point Available Packages directory when you change its status to Available.
Password
Use the Password page to specify a required password or serial number for an
installation. End users must enter the correct password or serial number to begin the
installation.
44
! Single password used for all installations
Mark this 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 to have the installation work with a range of serial numbers and to enable
the following fields. This does not produce multiple serialized copies of the
installation but a single installation that accepts any of the generated serial numbers.
• Serial Number Type
Choose whether to create incremental serial numbers (in sequence) or randomly
generated serial numbers.
• Starting Serial Number, 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 Export. 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.
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.
You can turn password protection on and off on a per-file basis by selecting a file on the
Files page and clicking Details. See Require Password in Specifying Installation File
Settings on page 38.
Product Details
Use the Product Details page to specify the title and the default directory for the
installation.
! Installation Title
Enter the name of the application. It appears on the background screen and on
wizard dialogs during the 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 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 the Progress Bar 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 Package Studio\WiseScript Editor\Progress. You
can specify to use an external .DLL for displaying the progress bar.
! Progress Dialog Placement
Select a screen position for the progress bar.
45
! Progress Bar Based On
Select how progress should be calculated: from the position in the compressed files
in the installation .EXE, from the position in the installation script, or from the
percentage of selected files.
! Custom Progress Bar .DLL
By default, this path points to an operating system-specific .DLL that displays a
custom progress bar provided by Wise Solutions. If you have a custom .DLL that
displays a progress bar, specify its path here. If you delete this path, the progress
bar defaults to a smaller, more generic progress bar.
! Center All Dialogs Over Progress Dialog
Mark this to center all dialogs in front of the progress bar, effectively hiding it
whenever end user input is required.
! Do Not Allow Installation to Be Cancelled
Mark this to disable the Cancel button on all dialogs that appear to the end user
during installation. Use this option for administrative installations.
! Do Not Allow Progress Dialog to Be Cancelled
Mark this to disable the Cancel button on the Progress dialog that appears on the
destination computer. Use this option for administrative installations.
In the Initialization Splash Screen section, you can modify the first splash screen that
appears when the end user runs the installation or uninstall.
! Initialization splash screen
Choose Custom to modify the splash screen.
! Initialization .BMP File
This is enabled when you select Custom from Initialization splash screen. Specify
the .BMP file for the splash screen that end users first see when they run the
installation.
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.
The left two list boxes display key structure, and the right two list boxes display values.
The upper two list boxes display 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.
Use the following buttons:
! Add Keys
Copy a registry key, including all its subkeys and values, from your computer to the
installation.
! Add Values
Copy values from your computer to the installation.
! New
Create a new key or 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
46
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.
! Delete Key, Delete Value
Remove a registry key or value from the installation. This does not delete the key or
value on the destination computer.
! Details
Edit registry key settings.
47
• Double-click a registry value in the lower right list.
The Registry Key Settings dialog appears.
3. Complete the dialog:
• Operation
Select the operation to apply to the key or its associated value.
" Create/update key and value
The value is updated if it already exists. 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
Select the parent key in which the new key is added.
• Key
Enter the name of the new key. You can create multiple hierarchical keys at once
by separating them with backslashes, as in directory pathnames. (Example:
Entering 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
Enter 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, press
Ctrl+Enter to begin a new line.
• Data Type
Select 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. To
embed a variable name, (such as %WIN%), enclose it with double percents
(%%WIN%%). If you 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. 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.
48
" 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 an 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 the application with self-repair turned on. See Configuring an
Application for Automatic Self-Repair on page 20.
• 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. 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 Multiple Strings is selected in the Data Type drop-
down list.
4. Click OK.
Screen
Use the Screen page to set the background color or gradient and font for the installation.
! Background Gradient
Select whether to display a full-screen gradient, a three-quarters screen gradient, or
no gradient behind the installation dialogs.
! Title Bar
Mark this to cause the installation’s title to be displayed at the top of the screen in a
title bar.
! Hide Program Manager
Mark this to hide the Program Manager during installation (Windows 3.x only).
! No Background Gradient
Mark this to display no gradient behind the installation dialogs.
! Top Color, Bottom Color
Click these buttons to choose the top and bottom colors for the background gradient.
The installation 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.
49
! Message Box Font
Specify 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 on 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 the installation is in Japanese. For a 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, or 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.
50
• Login Username, Password
Enter the user name and password under which the service should run.
• Error Control
Specify what happens if an error occurs while the service starts.
" Ignore Error
Logs the error and continues.
" Normal Error
Displays a message to the end user, logs the error, and continues.
" Severe Error
Logs the error. If the computer is booting the last known good configuration,
boot continues. Otherwise, it reboots to the last known good configuration.
" Critical Error
Logs the error if possible. If the computer is booting the last known good
configuration, boot fails. Otherwise, it reboots to the last known good
configuration.
• Group
Enter the name of the load ordering group to which this service belongs. Leave
this 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 empty if there are no
dependencies. If a service is dependent on a group, 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. Example: If
you enter this string, "ftpsvr;httpsvr;drc;+widget", you create dependencies on
the ftpsvr, httpsvr, and drc services and the widget group.
• Service Type
Select a service type.
• Start Service
Select the default setting for starting the service.
• Service Interacts With Desktop
Mark this to let the service display its user interface.
4. Click OK.
Shortcuts
Use the Shortcuts page to add shortcuts to Windows’ Program Manager or to the Start
menu and desktop of the destination computer.
If you added program files on the Files page, Installation Expert might have added the
default application shortcuts. The Shortcuts page shows the Name, Location, and Source
Path of the shortcuts that have been added so far.
51
3. Click Add.
The Select File from Installation dialog opens.
4. In the left list box, which shows the directory structure of the installation, select the
directory containing the program file to associate with this file type.
5. In the right list box, select the file to which to assign the shortcut.
6. Click OK.
The Shortcut Details dialog appears.
7. Complete the dialog and click OK. See Editing Shortcut Details.
The new shortcut appears on the Shortcuts page.
To remove a shortcut, select it and click Delete. To edit an existing shortcut, select it and
click Details.
If you create a shortcut to a file that is in an optional component of the installation, the
shortcut is created only if that component is installed.
52
• Check self-repair items when this shortcut is opened
Mark this to turn on self-repair functionality for this shortcut if you have
configured the installation for self-repair. See Configuring an Application for
Automatic Self-Repair on page 20.
4. Click OK.
SmartPatch
Use the SmartPatch page to turn an 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 the application for the installation to be
successful.
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 2 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.
Select one of the following:
! Do Not Create SmartPatch Updates
Mark this to create a full installation and not use the SmartPatch feature. You can
also leave this feature off while testing an installation, to produce faster compiles.
! Create SmartPatch Updates
Mark this to enable SmartPatch and the following fields:
• Error Checking
By default, SmartPatch expects the same file names to exist in both the old and
new copies of the software and displays errors when they don’t match. You can
change the default level of error checking.
" Do not display errors
Select this option if you expect a significantly different file set in the new
installation.
" Display error if all matching files not found
Select this option to prevent errors such as specifying an empty or incorrect
directory for the old software.
" Display error if any matching files not found
Select this option if the old and new installations should have all the same
file names, but different versions.
• Patch Threshold
Determines at what point SmartPatch simply includes the entire new file rather
than creating a patch. The default is 85%, meaning that when the patch file (for
all versions to be updated by SmartPatch) is at least 85% of the size of the
complete file, the complete file is included rather than the patches. However,
even though the entire file is included in the installation, it is not installed unless
the end user has a valid copy of an older version of the file.
• Maximum Memory
Determines how much memory the SmartPatch feature can use. SmartPatch is
very memory-intensive. Set this value to 2 MB less than the amount of RAM
installed in your computer.
53
• Maximum Patch Compression
Mark this to compress patch files as much as possible. This takes extra time, so
leave this unmarked during development and testing, and mark it only when
creating your final distribution build.
• Directory
This list displays directories on your computer that contain old versions of your
application that end users might have installed on their computers. SmartPatch
creates a patch file that updates any of these older versions to the most recent
version. The directory structures of each version must match exactly—only the
top-level directory name can be different.
" To add a path to an old version of the software, click Add and specify the
directory.
" To remove a path from this list, select it and click Delete.
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 the requirements. You can set
requirements for the Windows and Windows NT versions, the screen resolution, the
screen color depth, and sound support.
2. Click Details.
The Minimum System Requirements dialog opens. This dialog varies, depending on
the selected requirement.
3. Complete the dialog:
• Requirement drop-down list
Select the minimum system requirement for the application.
" Windows Version, Windows NT Version
Specify the minimum version of Windows required by the application.
Example: Choose Windows 98 if the application runs on Windows 98, but not
on Windows 95.
54
" Screen Resolution, Screen Colors, Sound Support
Specify the minimum screen resolution, color palette, or audio support
options the application requires.
• Type
" Recommended
Select this if this configuration item is not required by the program. The
message you enter in the Message Text field appears on the destination
computer if it does not meet the specified requirement, and the installation
continues once the message is acknowledged.
" Required
Select this 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 appears on the destination computer if it does not meet the specified
requirement, and the installation is aborted.
• Message Title
Enter a name to appear in the title bar of the warning message. This field is
disabled unless a specific requirement was selected.
• Message Text
Enter the message that appears if the destination computer does not meet the
specified requirement. This field is disabled unless a specific requirement was
selected.
Example: Your message can inform the end user why the installation cannot run:
“This application requires Windows Me to run. Please upgrade.”
4. 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.
Examples:
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. 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.
If you search for a registry value, make sure the registry value contains a valid directory
or pathname. If the search finds the registry Value Name, its Value Data is put into
%MAINDIR%. If you search for an .INI value, make sure the .INI Item Name contains a
valid pathname. If the search finds the .INI Item Name, its value is put into
%MAINDIR%. If you know the pathname ends with a file name, mark Remove File
Name when configuring the registry or .INI search.
55
• 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. 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. 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.
3. If searching for a file, complete the Search for File dialog:
• File Name
Enter the name of the file.
• Description
Enter the message to display on the progress dialog while searching.
• Drives to search
Select local hard drives only, network drives only, or both.
• 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.
4. If searching for an INI value, complete the Read INI Value dialog:
Select the directory that contains the .INI file from the directory tree. If the
directory is not displayed, select its parent directory and click New Folder to add it.
• INI File Name, INI Section Name, INI Item Name
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.
• Remove File Name
Mark this to return only the directory name if it ends with a file name.
5. If searching for an registry value, complete the Read Registry Value dialog:
• Root
Choose the root key that contains the named value to be read.
• Key, Value Name
Enter the name of the key and the value to be read from that key.
• Remove File Name
• Mark this to return only the directory name if it ends with a file name.
6. Click OK.
7. Repeat the preceding steps to create additional search items.
The items listed on the System Search page display the search methods for finding the
old version of the application. The installation performs the searches in the order listed
until one is successful. It then makes the directory of the previous installation the
default directory for the installation. If none are successful, the directory you enter in
Default Directory on the Product Details page is the default directory.
To remove a search item from the System Search page, select it and click Delete. To edit
the details of a search item, select the item and click Details.
56
Uninstall
Use the Uninstall page to specify whether the installation supports the uninstall
capability and to set options for controlling which files are removed by the uninstall
program. The uninstall program is named unwise.exe.
Note
Installations contain the Repair option 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.
57
• Select the registry keys to be deleted. If the key is not displayed, select the key
it should be added to and click New Key to add it.
• Click OK.
4. If you select Execute Program, complete the Select Program to Execute dialog.
• From the list on the left, select the directory containing the program to be
executed.
• From the list on the right, select the program to be executed (or enter its name
in 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.
• Click OK.
5. Mark Delete in-use files during uninstall to delete even those files that are in
use when the uninstall program is running.
WebDeploy
The WebDeploy page provides an efficient method for creating true Internet-based
installations for your application. It creates a small stub installation that downloads the
compressed files from a Web server as needed. For an example of a script that lets
WebDeploy work through a proxy server, see Sample Scripts That Perform Web and FTP
Transactions on page 183.
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.
58
everyone with a copy of the installation .EXE uses the same username and
password, this is not suitable for tracking individual user access to the Web site.
• Host Directory
Enter the path to the WebDeploy files stored on the server.
• File Transfer Via
Select how to transfer the files:
" FTP Protocol
This option is used within an intranet for companies who deploy their
software behind a firewall. It works through WinSock, so you must have a
valid WinSock layer for it to work. Using this protocol requires a name and a
password. WebDeploy fails if the server allows anonymous login without a
password.
To have the FTP protocol work through a proxy server, see the workaround
solution contained in the sample script PROXY.WSE, located in the Samples
directory within the WiseScript Editor application directory.
" HTTP Protocol
This option is more universal because it can be used both outside and behind
a firewall. The HTTP protocol attempts to read the information from the Web
browser, which makes your files more widely available to your clients. It also
allows for faster file transfers than the FTP protocol. Because of its flexibility
and proxy server support, using the HTTP protocol is recommended.
• Cluster Size
Enter a number in kilobytes. Files smaller than the cluster size are packed into
data files up to the cluster size. Files larger than the cluster size make up their
own data file. A smaller cluster size increases the transfer rate of data. It also
minimizes the amount of files that a given installation must download because
only the necessary files are downloaded.
Example:
An installation has four 5K files and one 50K file. You set the cluster size to 20K
and compile. You end up with a 20K file, packed with the four 5K files, and a 50K
file.
4. Save and close the installation.
5. In Wise Package Studio’s Workbench, select the Tools tab, and launch the Package
Distribution tool.
6. On the Specify File to Distribute dialog, specify the installation file to which you
added WebDeploy, and click Next.
7. On the Distribution Method dialog, mark FTP Server and click Next.
This recompiles your application and uploads the installation file, as well as a
WebDeploy configuration file, to an FTP server.
8. Enter the information about the server, and click Next.
File transfer commences.
Once the files are uploaded to the server, you can test your application by
connecting to the FTP server through an FTP client and downloading and running the
installation .EXE.
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
59
picks up where the installation was cut off when download resumes. See The
WebDeploy Process.
Note
Installations deployed through WebDeploy contain a Repair option in the uninstall wizard, but
the Repair option does not function.
60
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 mark the FTP Server option in the Package Distribution tool (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 because
the FTP Server feature in the WiseScript Editor fully automates the upload process, so
you do not have direct control over the directories to which you are installing.
61
Chapter 4
Setup Editor
Setup Editor provides a scripting environment where you can add advanced functionality
to your script. The script is just another way of looking at an installation.
You can use Setup Editor’s built-in debugger to help test and troubleshoot your script.
Topics Include:
! About Setup Editor.
! About User-Defined Actions.
! About Debug Commands.
! Basic Scripting Concepts.
62
About Setup Editor
Event and
Title field Language drop-
downs.
Actions Installation
list. Script list.
63
About Setup Editor
Title
This field contains the script’s name. By default, it is the name entered in the
Installation Title field on the Product Details page followed by “Installation.” If you
change the title of the script here, it does not change on the Product Details page. When
you run the installation, this name appears at the top of the splash dialog (the
Initializing Wise Installation Wizard dialog), and in the title bar of the installation screen.
Event
From this drop-down list, you select the script to edit. The Mainline script is the script
that typically contains installation instructions. For details, see Choosing a Script to Edit.
Language
From this drop-down list, you select a language for the script. This drop-down list
includes all the languages the installation supports, which you set on the Languages
page.
When you add a script line that presents text to the end user, select each language in
the Language drop-down list, and edit that script line so it contains the translated text.
(Example: You set an installation to support French and English on the Languages page.
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 should then select French from the
Language drop-down list and edit the script you just added with a French translation of
the message.) See Languages on page 43. The dialogs that ship with WiseScript Editor
are pre-translated, so you do not need to edit them.
Actions
The Standard tab of this list displays all the actions you can add to your script. The
Custom tab displays only your customized list of actions. See Customizing the List of
Actions on page 69.
Installation Script
This list contains the script that is executed when an end user runs the installation. To
edit a script line, double-click it. To copy and paste script lines, use 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 23. The default color code is as follows:
! Compiler Variable Items - gray
! Include Script Items - black
! Install/Copy File Items - black
! Logic items - blue
! New Variable Values - red
! Remarks - green
For information on working with scripts, see Choosing a Script to Edit on page 65. To
show tabs for Wise include scripts, mark the Show Tabs for Wise Include Scripts
checkbox in Preferences. See Setting Preferences on page 23.
Right-click Menu
Use the right-click menu of actions and script lines to perform common operations.
64
About Setup Editor
Event Scripts
Event scripts are scripts that handle events. (Example: The end user canceling the
script.) There are 3 event scripts you can select from the Event drop-down list and edit:
! Mainline
The primary script that’s executed during the normal installation process. It contains
placeholders for Cancel and Exit scripts. When you open a script using File menu >
Open, that script is considered the “main installation script,” and is on the first tab
below the installation script. Changes in the main installation script are reflected in
Installation Expert and vice versa.
! Exit
The script that’s executed when the installation is complete, or when an Exit
Installation script command is executed. If you create a user-defined action, you
store its custom dialog here. See Creating a User-Defined Action on page 70.
! Cancel
The script that’s executed when the end user cancels the installation. Because some
files might already be 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.
Include Scripts
Include scripts are scripts that are added to an installation by way of an Include Script
action. See Include Script on page 115. Scripts can be included either in your main
installation script or in other include scripts. During runtime, include scripts are run
when the Include Script action that references them is encountered. For each Include
Script action in your script, a new tab appears at the bottom of Setup Editor. To show
tabs for Wise include scripts, mark the Show Tabs for Wise Include Scripts checkbox
in Preferences. See Setting Preferences on page 23.
Include scripts can help save time in developing installations, because you can develop a
library of WiseScripts that perform very specific functions. You can re-use these
specialized scripts in future installations and easily share them with colleagues.
By default, all scripts based on the Empty Project template on the New Installation File
dialog contain 2 include scripts: rollback.wse and uninstal.wse. These are special Wise-
created scripts. The rollback.wse script is in the Cancel event script and is executed if
the end user cancels the installation after it starts. If the end user chooses to backup
replaced files, this script will roll the destination computer back to its pre-installation
state. The uninstal.wse script adds uninstall support to each new installation.
Note
Changes made to an include script are saved to that script when you save the installation.
When you do a text search, all event scripts are searched and you can mark an option to
search all include scripts.
65
About Setup Editor
Note
Changes made to an include script are saved to that script when you save the installation.
Note
To insert lines below the line you selected, mark the Append New Items checkbox in
Preferences. See Setting Preferences on page 23.
66
About Setup Editor
Note
To insert lines below the line you selected, mark the Append New Items checkbox in
Preferences. See Setting Preferences on page 23.
When you add an action, a dialog appears that lets you set the parameters for the action
unless it does not require parameters. If the new action is a Custom Dialog or Custom
Billboard action, the appropriate editing environment opens. For details, see WiseScript
Actions on page 83.
Some actions come in pairs. (Example: When you add an If action, you must also add an
End action at the end of the conditional block.) Setup Editor indents actions inside these
pairs.
67
About Setup Editor
68
About Setup Editor
69
About User-Defined Actions
Action Name
The file name of the script.
Dialog
Include a dialog only if your action has parameters that you need to change each time
you use the action. This dialog appears when your action is double-clicked. Example: For
an action that opens a URL in the end user’s browser, you might include a dialog that
asks for the URL. Then if the URL changes frequently, you can specify the new URL each
time you use the action.
Script Lines
The script lines that perform the action are the functional part of the action. Example:
For an action that opens a URL on the destination computer’s browser, the script lines
determine the default browser and launch the Web page.
70
About User-Defined Actions
4. Save the script file in the Actions directory, which is in the WiseScript Editor
application directory, or the shared directory specified in Preferences.
The file name you enter is the name that appears in the Actions list in Setup Editor
after you exit and re-open WiseScript Editor.
5. If your user-defined action includes a dialog where you can enter options for the
action, create the dialog.
• From the Event drop-down list in Setup Editor, select Exit.
• Add a Custom Dialog action to the Exit script, and create your dialog in Custom
Dialog Editor.
Note
To add a drop-down list on 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.
71
About User-Defined Actions
72
About User-Defined Actions
13. When you are done editing the dialog, select File menu > Save Changes and exit.
73
About User-Defined Actions
74
About Debug Commands
75
About Debug Commands
76
About Debug Commands
77
Basic Scripting Concepts
See:
Conditionals and Loops
Variables and Expressions on page 79
Compiler Variables vs. Runtime Variables on page 80
Anatomy of a Script on page 81
About Components on page 81
Setup Editor on page 62
Nesting
In WiseScript, one conditional or loop can contain another conditional or loop. This is
called nesting. You define a nested conditional or loop by adding a second If or While
action (or other start-of-conditional or start-of-loop marker) before the End action of the
first conditional or loop. The second block of script must be fully contained within the
first. When you add an End action, it always applies to the most recently begun If or
While action that does not already have an End action. You can nest conditionals and
loops as deep as you like, but in most circumstances you won’t find it necessary to nest
78
Basic Scripting Concepts
more than 3 or 4 deep. Setup Editor’s indentation, which increases for each nested
structure, helps you interpret deep nestings.
Expressions
If you are using a variable name as part of an expression, do not surround the variable
name with %. (Example: if you use an If, ElseIf, While, Set Variable, or a Wizard Loop
action to evaluate an expression, do not enclose the variables you reference in the
expression with %.) The exception to this rule is 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 195.
To read about scripts that evaluate expressions with an If statement, see Sample Scripts
That Use Expression Operators on page 178.
79
Basic Scripting Concepts
80
Basic Scripting Concepts
been debugged by changing the value of a compiler variable. The debugging actions are
not compiled into the final build. For details, see Building a Debug Version on page 76.
When to Use
! Variable substitution can use either type of variable.
! When a script action places a value into a variable, the variable must be a runtime
variable. Compiler variables can’t be changed by scripts, but only by the person who
builds the installer .EXE.
! In most other instances, the type of variable to use is implicit (example: the
Compiler If script action requires a compiler variable) or noted explicitly.
Anatomy of a Script
An installation script has four basic sections. Whether you are modifying the default
script generated by Installation Expert or writing your own script from scratch, an
understanding of these sections can help insure that your script works correctly.
Initialization
In this section, default values for an installation are set, including the default directory,
standard components, and Start menu. Information that is needed later in the
installation is read from .INI files or the registry. Files that display to the end user
(ReadMe.txt, License.txt, etc.) are installed. A search can also be performed for a
previous version of an application to 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. This section generally
uses a Wizard Loop action. It displays any ReadMe or License files installed in the
Initialization section.
File Copy
This is the longest section of the installation script. Files are copied from the installer
.EXE 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 application works correctly. The
end user might then be prompted to restart their computer.
About Components
When an end user selects to install one or more optional components, 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. The wizard dialogs created by Installation Expert take
care of placing the correct values in the COMPONENTS variable. You can also use the
Select Components script action or a custom dialog to accomplish the same result.
In the installation script, use conditional statements of the form “If COMPONENTS
contains ‘A’” to determine which files are installed when each component is selected.
Setup 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. For an example of a
81
Basic Scripting Concepts
components-based installation script, see Letting the End User Select Components and
Subcomponents on page 182.
82
Chapter 5
WiseScript Actions
The Wise scripting language, WiseScript, contains script actions that let you perform
various installation-related tasks. The script actions are fully coded; all you do is enter
parameters for the action. This section describes the function and usage of each action.
For information on how to insert actions or create user-defined actions, see Setup Editor
on page 62.
See:
83
Configure BDE
Install DirectX
Install WinCE Component
Install WiseUpdate Client
To edit a script that contains any of these script actions, use the Wise
Installation System.
Note
Always place deletions before additions in the script. If you delete an icon from a
nonexistent group, Program Manager might remove an icon with the same name from the
last-added group, if it exists. Deleting icons and groups first eliminates this problem.
! Group Name
You can prompt the user for this name and store the result in a variable. If you added
a default folder name on the Shortcuts page in Installation Expert, its name is stored
in %GROUP% in the standard script.
! Icon Name
! Command Line
Specify the command line to be applied to the icon’s target file.
! Icon PathName
Specify a pathname to a file where the icon is stored.
84
! Default Directory
Specify the default directory that should be set when launching the target file, if
different from the target file’s location.
! Icon Number
Enter the resource number of the icon (from the pathname specified above).
! Run Minimized
Mark this to cause the application to start in a minimized state.
! Separate Space
Mark this to cause a Win16 .EXE to run in its own address space under Windows NT
3.51. If you mark this checkbox, use a Check Configuration action to make sure this
action only runs on Windows NT 3.51. Leave this unmarked if this action will run on
Windows 3.1.
! Personal Group
Mark this to cause the icon to be added to a personal Program Manager group.
Examples
By default, uninstall does not remove files that were installed to Windows,
Windows\System, or Windows\System32. To remove these files, 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. Type the following as the Log Text (exactly as shown because it is
case-sensitive):
Non-System File:
Note
Also specify uninstall actions in Installation Expert > Uninstall page.
You can add a line to the Install.log that pauses the uninstall, executes an application
until it finishes, then resumes the uninstall. To do this, type the following as Log Text,
substituting your own path to the .EXE (case-sensitive):
Execute path: %MAINDIR%\Remove.exe
If you want the uninstall to remove not only files that were installed, but also files that
were added later, you can remove all the files and sub-directories within a specified
85
directory. Use this option with caution because end users might have stored their own
files in the directory. You can use Windows standard wildcard notation (example: *.* for
all files). Type the following as Log Text, substituting your own directory path (case-
sensitive):
File Tree: %MAINDIR%\Data\Temp\*.*
If you want the uninstall to remove not only the registry keys that were installed, but
also keys that were added later, you can remove an entire registry key, including all its
sub-keys and values. Type the following as Log Text, substituting your own registry
tree (case-sensitive):
RegDB TREE: SOFTWARE\Wise Solutions
RegDB Root: 2
where RegDB Root is one of the following:
0 - HKEY_CLASSES_ROOT
1 - HKEY_CURRENT_USER
2 - HKEY_LOCAL_MACHINE
3 - HKEY_USERS
Add to AUTOEXEC.BAT
This action edits Autoexec.bat, which is executed during boot, allowing you to add
commands that are executed before Windows loads.
Insert commands at a particular line number, or search the file for specific text and
insert the new line before, after, or in place of the existing line. The destination
computer is restarted after installation to force the new commands to take effect.
! Text to Insert
Enter the line to add to Autoexec.bat. If the line refers to an application file, use a
pathname (example: %MAINDIR%\Application\Application.exe). The PATH variable
might not be set when the command is executed, so always use a pathname.
! Line Number
Enter the line number at which the new line should be inserted. Enter 0 (zero) to
append the command to the end of the file. The Search for Existing Text area in this
dialog overrides the 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 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. The line is inserted at the first found match.
! Comment Text
Enter text to insert at the beginning of the line that is found. Insert “REM ” (with the
trailing space but without the quotation marks) to comment out the line, which lets
you replace an existing command with a new command while leaving the existing
command in place but inactive. If this is the case, set Insert Action to insert before
the existing line so that a subsequent installation finds and edits the active
command, not the commented line.
! Insert Action
Select where to insert the new line in relation to the found line.
! Match Criteria
Select how the found line matches the Search for Text.
! Ignore White Space
Mark this to ignore spaces and tab characters.
86
! Case Sensitive
Mark this to match case.
! Make Backup File
Mark this to make a copy of Autoexec.bat before editing it.
Add to CONFIG.SYS
This action edits the Config.sys file to add new commands. Insert commands at a
particular line number, or search the file for specific text and insert the new line before,
after, or in place of the existing line. The destination computer is restarted automatically
to force the new commands to take effect.
! Text to Insert
Enter the line to add to Config.sys. If the line refers to a file, use a pathname.
Example: %SYS%\Application.DLL. %SYS% refers to the active system folder.
! Line Number
Enter the line number at which the new line should be inserted. Enter 0 (zero) to
append the command to the end of the file. The Search for Existing Text area in this
dialog overrides the 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 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. The line is inserted at the first found match.
! Comment Text
Enter text to insert at the beginning of the line that is found. Insert “REM ” (with the
trailing space but without the quotation marks) to comment out the line, which lets
you replace an existing command with a new command while leaving the existing
command in place but inactive. If this is the case, set Insert Action to insert before
the existing line so that a subsequent installation finds and edits the active
command, not the commented line.
! Insert Action
Select where to insert the new line in relation to the found line.
! Match Criteria
Select how the found line matches the Search for Text.
! Ignore White Space
Mark this to ignore spaces and tab characters.
! Case Sensitive
Mark this to match case.
! Make Backup File
Mark this to make a copy of Config.sys before editing it.
Add to SYSTEM.INI
(Windows 3.1x or Windows 9x only.) This action adds a device entry to the 386Enh
section of the System.ini file. The destination computer is restarted automatically to
force the new device driver to be loaded.
Do not use this action to modify the display driver (display=xxx) or any other non-
device entry. Instead, use the Edit INI action. See Edit INI File on page 105.
87
! Device Name
Enter the full command line for the device (example: device=vshare.386). The
referenced files need a pathname unless they are in the System directory.
If you precede the command line with a semicolon (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 and the new entry is added.
88
Note
You cannot test an installation that installs and immediately calls a .DLL unless you install
the .DLL to the Temp directory. Testing installs files, then immediately deletes them,
unless they are installed to the Temp directory.
! Function Name
Enter the name of the function to call. The function should be exported when
creating the .DLL. The function’s parameters and return value must exactly match
those specified below (case-sensitive).
! Call a function written specifically for WiseScript
When calling functions developed specifically for WiseScript, mark this option and fill
in Variables Added, Parameter String, and Action below.
Each .DLL function takes a single parameter (lpDllParams) that points to a structure
containing information that can be passed back and forth between the .DLL function
and the running installation script. The Prompt.wse sample script contains an
example of this.
! Variables Added
Because WiseScript-specific .DLL functions have access to the variable list of the
running installation, you can add new variables. List the names of the variables to
add, separated by commas. Do not use variables enclosed in %.
! Parameter String
Use this to pass information to the .DLL function. Text you enter here is passed to
the .DLL in the IpszParam variable. This can include variables surrounded with %
signs.
! Action
Select the installation’s action when it returns from the .DLL call. The .DLL returns a
boolean value (zero equals false, non-zero equals true).
• Ignore return value
The script continues regardless of any value returned.
• Exit if function returns true
The installation exits if the .DLL function returns non-zero.
• Start block if function returns true
If the .DLL function returns non-zero, all actions between this action and its
matching End action are executed. Otherwise these actions are skipped.
• Loop while function returns true
The actions between this action and the matching End action (including the .DLL
call) are executed repeatedly until the .DLL function returns zero.
! Perform while loop at least once.
If you select Loop while function returns true, mark this to force the loop to
execute 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.
! Call a function with variable parameter list
(Enables the options below.) Mark this to call .DLLs not specifically written for
WiseScript. These .DLLs cannot access any of the installation’s internal variables, but
you can pass this information to them. Below, specify the required parameters and
Return Value Type.
! Return Value Type
Select the data type of the return value, which are described in DLL Parameter
Settings.
89
! Returned Variable
Select or enter a variable to store the returned value.
! Hide progress bar before calling function
If the .DLL has UI, you can us this to hide the progress bar.
If you write a .DLL, use CALLBACK or WINAPI in the declaration of the .DLL. To help with
.DLL development, review sample source code, such as GETCPU32.C, in the WiseScript
Editor\DLL directory. Also included is sample source code for C and Delphi .DLLs written
for WiseScript. Calling Visual Basic ActiveX controls is not supported. To read about
scripts that use this action, see Sample Scripts That Call .DLLs on page 184.
Corresponds to
Corresponds to Win32 SDK
WiseScript Visual Basic Description
type
type
90
Corresponds to
Corresponds to Win32 SDK
WiseScript Visual Basic Description
type
type
dword pointer Pointer to DWORD or Long 32-bit pointer to a DWORD data type
DWORD* (use for LPDWORD (see DWORD for the reference to this
or PDWORD) data type)
string buffer char [size] String Use to place a character buffer of the
given size (number of characters)
into a structure. Use only with
structures.
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 Parameter Type to string buffer, then this field is enabled. Enter the
number of string buffer characters. The limit is 446.
! Passing type
Leave this set to Normal unless you are passing a complex structure to the .DLL. In
that case, 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. See
Passing Complex Structures to a .DLL: An Example.
! Value Source
Select 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
If Value Source is set to Variable, select or enter a variable.
! Constant Value
If Value Source is set to Constant, enter a constant here. You can enter a variable
here (example: %NUMUSERS%).
Note
WiseScript Editor 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 WiseScript Editor. However, future versions of WiseScript Editor might not support
this API, and it is therefore not documented here. For new installations, 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. WiseScript 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.
91
For each parameter, you select a passing type. For non-structure parameters, select
Normal from Passing Type in the DLL Parameter Settings dialog. However, for
structure elements (also referred to as members), select First element of structure
for the first item in the structure, or Contained within structure for subsequent items.
A structure ends if there are no more parameters, or if the next parameter is set to
Normal or First element of a structure.
Note
The following code samples are in the C programming language.
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 3 parameters: a structure that contains 3 elements, an
integer, and another structure that contains 2 elements. The calling statement for the
.DLL is:
int NewEmployee (EMPLOYEE*, int, DEPARTMENT*);
where EMPLOYEE* is a pointer to a structure, int is a simple integer, and 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;
}
To call the function NewEmployee from an installation script, you add 6 parameters in
the Call DLL Function dialog: the 3 elements of the first structure, the integer, and the 2
elements of the second structure. To add parameters, see DLL Parameter Settings on
page 90.
92
Check Configuration
This action tests the hardware configuration, operating system, and other characteristics
of the destination computer. As a result of this check, the action can display a message,
halt the installation after displaying a message, or start a conditional block.
! If System
Use the drop-down lists to build a statement of what to check for.
Note
When you check for an operating system, this action looks for the minimum operating
system of the type for which you’re checking. Example: If you check for Windows 2000,
this action returns TRUE if Windows 2000 or Windows XP is running.
! Action
Occurs when the statement above is true. All options below display the message
described in Title and Message Text below, unless Message Text is blank.
• Display Message Only.
• Abort Installation.
• Start Block
Begins a conditional block. All actions between this action and the next Else or
End action are executed.
! Title
Enter the title for the dialog.
! Message Text
Appears in the body of the message dialog. Leave this blank to prevent a message
from appearing.
93
Note
Checking for “Share Loaded” opens a temporary file and attempts to lock a section of it.
It 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.
To read about scripts that use this action, see Sample Scripts That Check System
Configuration on page 184.
94
If the installation is not true 32-bit, specify both Win16 and Win32 error variables. Then,
the Win32 WinSock.dll is used, followed by the Win16 WinSock.dll. Otherwise, only the
32-bit version is used.
If the download is successful, the Win32 Error Number Variable or Win16 Error
Number Variable is set to 0, which indicates success. If an error occurs, the number
variable is set to another error code, and the text variable is set to a string that
describes the error return codes. The return codes and error strings come from the APIs
that attempt the download. A sample of the return string is:
ProxyServer=
ProxyIgnore=
ProxyPort=80
ProxyType=CERN
WinInetText=
WinInetError=0
WinSockError=11001
This indicates that no proxy server was used and that WinSock returned the error code
11001.
Note
If the Web server redirects invalid URLs to another internal Web page, no error is detected by
this action.
In the Check HTTP Connection dialog, specify the URL to check, then select or enter
variables to store returned error numbers and error text.
! URL to Check
Include “http://” in the URL.
! Win32 Error Text Variable
Select or enter a variable to store the error text returned by the 32-bit winsock.dll.
! Win32 Error Number Variable
Select or enter a variable to store the error code returned by the 32-bit winsock.dll.
! Win16 Error Text Variable
Select or enter a variable to store the error text returned by the 16-bit winsock.dll.
! Win16 Error Number Variable
Select or enter a variable to store the error code returned by the 16-bit winsock.dll.
95
! Message Text
Appears in the body of the message dialog. Leave this blank to prevent the message
from appearing.
! Action
Occurs when the If statement above is true. The message described in the Title and
Message Text fields appears unless Message Text is blank. In addition, select
from these options.
• Display Message Only
• Abort Installation
• Start Block
Begins a conditional block. All actions between this action and the next Else or
End action are executed.
• 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 Start While Loop, mark this to force the loop to execute 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.
To read about a script that uses this action, see Prompting the End User to Insert a
Floppy Disk on page 177.
Check Service
This action checks if a particular service is running. You can check services on Windows
3.51, NT 4.0, 2000, and XP. On other operating systems this action always returns a
result of Unknown.
! Variable
Select or enter a variable in which to put the status of the service. Possible return
results are: Unknown, Running, Stopped, Paused, StartPending, StopPending,
ContinuePending, or PausePending. Unknown means the service was not found or the
current user does not have privileges to query the service. If the status ends with the
word Pending, the service has received a request, but is still processing the request.
! Service Name
Enter the name of the service. This is not necessarily the same name you see in the
Services control panel. If you are unsure of the service name, consult its
documentation or manufacturer.
96
Compiler Variable If/Else/End
Compiler Variable If, Else, and End statements let you to compile different versions of
the installation program. Compiler variables are set at compile time, and Compiler
Variable If, Else, and End statements determine which parts of the script are included
based on a compiler variable value. You create compiler variables on the Compiler
Variables page in Installation Expert. The value of the compiler variable can be set by:
the default value you enter when creating the compiler variable, a dialog that prompts
you at compile time for the value, or on the command line.
With Compiler Variable If, Else, and End statements, the statements inside an If block
are added to the script according to the value of the compiler variable. Example: On the
Compiler Variable page, create a compiler variable named _DEBUG_, set to “N” by
default, and make sure the Compiling From Within Wise option is marked. Then in
the installation script, add a Compiler Variable If statement that checks if _DEBUG_
equals “Y”. In the If block, add a Display Message action that contains useful debug
information, such as the value of a variable. End the If block with a Compiler Variable
End statement. When you compile, you are prompted for the value of this compiler
variable. If you change it to “Y”, then the Display Message action within the Compiler
Variable If block is added to the final script.
Complete the Compiler Variable If Settings dialog:
! If Variable
Build an If statement by selecting a compiler variable and a comparison. The first list
shows compiler variables on the Compiler Variables page in Installation Expert. The
second list shows available comparisons. If you select File Exists from the second
list, the If statement checks to see if the file that you enter in The Value exists. If
you select File Version Equal or Greater, specify the file in The Value.
! The Value
(Case-sensitive) The value for the comparison operation. Do not use variables in this
field, because it is checking on your computer in real time, not runtime.
You can add a Compiler Variable Else action, and you must include a Compiler Variable
End action.
To read about a script that uses this action, see Sample Scripts That Perform Tasks on
page 177.
Also see:
Compiler Variables on page 30
Compiler Variables vs. Runtime Variables on page 80
Building a Debug Version on page 76
97
! Install Data Source for
Select Win16 or Win32 APIs.
! Data Source Attributes
Either enter attributes, or use the Import button to import them from an ODBC data
source installed on your computer.
! Display Configuration Dialogs
Mark this to display standard data source configuration dialogs to the end user.
Otherwise, the data source is configured with default settings.
! System DSN
Mark this checkbox to make the data source available to all user accounts on the
destination computer.
Note
Wildcards cannot be used if you are copying from an FTP or HTTP server.
! Destination
Specify the location on the destination computer. If a single file is being copied, this
should contain a full file path. If multiple files are being copied, this should contain a
full directory path. To copy files to the installation directory, start this path with
%MAINDIR%.
! Description
Enter text to display in the progress bar during file copy.
! Local Path
A hard-coded path that specifies the location of the files on your computer at compile
time. Specify this for the installation progress bar to update correctly based on file
size. See the description of the Source field above.
! Require Password
If you entered a password in Installation Expert > Password page, and you mark
this, the end user is prompted for the password before this file is installed.
98
The password prompt appears only once, for the first password-protected file in an
installation, regardless of the number of password-protected files. If no password-
protected files are slated for installation, the prompt does not appear.
! Include Sub-Directories
If you specify a directory in Source, mark this to include all subdirectories and their
contents.
! Shared DLL Counter
If this is marked, and the file is a .DLL or .VBX, Windows tracks the file to prevent its
removal if an application is still using it.
! No Progress Bar
Mark this to hide the progress bar while this file is being copied.
! Self-Register OCX/DLL/EXE/TLB
All .OCXs and .TLBs and some .DLLs and .EXEs support self-registration. Mark this so
the file registers itself in the Windows registry before it is used. This action does not
register the file, but specifies that it should be registered later. Include a Self-
Register OCX/DLL action to register the file. See Self-Register OCXs/DLLs on
page 127.
! Don’t Convert to Floppy
If Convert CD-ROM to Floppy is marked in Installation Expert > Build Settings
page, mark this to override that option for this file.
! Replace Existing File
Select when to replace existing files on the destination computer.
• Always
The new file always replaces the old file.
• Never
The file never overwrites an existing file. Select this for files that should be
installed if they are not present, but that might be customized by the end user
and should therefore not be replaced on re-installation (example: configuration
files).
• Check File
The existing file is replaced only if the requirements you set in File Version and
File Date/Time are true.
" Doesn’t Matter
Select this option if only one of the requirements, File Version or File
Date/Time, must be fulfilled to replace the existing file.
" Same or Older
For File Version, this replaces the existing file if it has a version resource
that is the same as or older than the new file. If the existing file lacks a
version resource, it is not replaced.
For File Date/Time, this replaces the existing file if its modification date
and time are the same as or older than the new file.
" Older
For File Version, this replaces the existing file if it has a version resource
that is older than the new file. If the existing file lacks a version resource, it
is not replaced.
For File Date/Time, this replaces the existing file if its modification date
and time are older than the new file.
! Retain Duplicates in Path
By default, version checking removes existing copies of .DLLs that are found in the
path list. To suppress this feature, mark this checkbox.
99
To read about a sample script that uses this action, see Downloading a File From a Web
Site During Installation on page 183.
Create Directory
Directories are created when files are installed to them. Use this action only to create an
empty directory on the destination computer.
! Pathname
Enter the directory path to create. Start the path with a variable (example:
%MAINDIR%).
Create Service
This action installs a Windows service on operating systems where they are supported.
! Service Name
Enter the internal service name, which is used in the registry.
! Display Name
Enter the name to appear in the Services control panel.
! Executable Path
Specify the complete path to the executable file as it will be on the destination
computer. Start the path with a variable (example: %MAINDIR%).
! Login Username, Login Password
Enter the user name and password under which the service should run.
! Error Control
Specify what happens if an error occurs while the service starts.
• Ignore Error
Logs the error and continues.
• Normal Error
Displays a message to the end user, logs the error, and continues.
• Severe Error
Logs the error. If the computer is booting the last known good configuration,
boot continues. Otherwise, it reboots to the last known good configuration.
• Critical Error
Logs the error if possible. If the computer is booting the last known good
configuration, boot fails. Otherwise, it reboots to the last known good
configuration.
! Group
Enter the name of the load ordering group to which this service belongs. Leave this
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 empty if there are no dependencies. If a
service is dependent on a group, 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. Example: If you enter this
string, "ftpsvr;httpsvr;drc;+sample", you create dependencies on the ftpsvr, httpsvr,
and drc services and the sample group.
! Service Type
Select a service type.
100
! Start Service
Select the default setting for starting the service.
! Service Interacts With Desktop
Mark this to let the service display its user interface.
Create Shortcut
This action creates a shortcut. Common locations include the Start menu
(%STARTMENUDIR%), the Startup directory (%STARTUPDIR%), the installation
directory (%MAINDIR%), and the desktop (%DESKTOPDIR%).
! Source Path
Specify the path of a file that will be installed on the destination computer. Start the
path with a variable (example: %MAINDIR%\application.EXE) and do not enclose it
in quotation marks.
! Destination Path
Enter the path to the shortcut to be created, which should end in .LNK (example:
%GROUP%\application.lnk). For the current user’s desktop, Start menu, or Startup
directory, use %DESKTOPDIR%, %STARTMENUDIR%, or %STARTUPDIR%. For the
All Users equivalents, use %CDESKTOPDIR%, %CSTARTMENUDIR%, or
%CSTARTUPDIR%.
! Command Options
(Optional) If the shortcut is for an .EXE, enter command line options.
! Default Directory
Specify the default directory that should be set when launching the target file, if
different from the target file’s location. In Windows Explorer, this field is referred to
as the Start in directory.
! Description
Enter text to appear in the Comment field of the shortcut’s properties dialog.
! Icon Pathname
(Optional) Specify the file that contains the icon to be used for the shortcut.
Otherwise, the target file’s icon is used.
! Window Size
Select window appearance.
! Icon Number
Enter the number of the icon to use from the file specified in Icon Pathname above.
! Shift State, Hot Key Letter
These fields together populate the Shortcut Key field in the shortcut’s Properties
dialog in Windows Explorer. For details, see Windows help.
! Support OSD software update checking
Open Software Description (OSD) is a Microsoft technology for describing and
distributing software. Mark this for the shortcut to work with OSD.
! Check self-repair items when this shortcut is opened
Mark this to turn on self-repair functionality for this shortcut if you have configured
the installation for self-repair. See Configuring an Application for Automatic Self-
Repair on page 20. Typically, use this for a shortcut that launches the application.
101
Custom Billboard
This action opens the Custom Billboard Editor, which lets you create scalable images to
display to end users during installation. For details, see Creating Custom Billboards on
page 162.
Custom Dialog
Use this action to create your own dialog or dialog set. For details, see Creating Custom
Dialogs on page 134. To add a new dialog within a wizard loop, see Adding a Dialog to
the Installation on page 135.
To read about scripts that use this action, see Sample Scripts That Use Complex Dialogs
on page 179. For details on the dialog Properties dialog, see Setting Dialog Properties on
page 137.
Delete File(s)
This action removes files from the destination computer.
You do not need to delete temp files if you use the Get Temporary Filename action to
create them because they get deleted automatically.
! Pathname
Specify the file or files to delete (examples: %TEMP%\Application.dll or
%MAINDIR%\*.htm). You cannot perform wildcard deletions in the Windows,
System, or root directories. Clicking Browse shows only files in the current
WiseScript that are installed into the %MAINDIR%, %SYS32%, %SYS%, OR
%FONTS% directories.
! Include Sub-Directories
If you entered the pathname to a directory or used a wildcard, mark this to delete
matching files in all subdirectories as well.
! Remove Directory Containing Files
If this is marked, and if the deletion leaves the directory empty, then the directory is
deleted also.
Display Billboard
This action displays a bitmap or .GRF file during installation if you have the background
set to display a gradient (in Installation Expert > Screen page). Create .GRF files
(scalable bitmaps) with the Custom Billboard Editor. See Creating Custom Billboards on
page 162. You can use up to 16 Display Billboard actions in the script.
! Pathname
Specify the full pathname to the image file on your computer. To use variables in this
field, you must mark the Local Graphic option below.
! X-Position, Y-Position
Indicate the location on a 640 x 480 screen to place images. On larger screens, the
billboard is placed proportionately based on the 640 x 480 location.
! Erase Num
Enter how many previously displayed graphics are erased before this image is
displayed. To display 1 image at a time, set this to 1. To display all images
simultaneously, set this to 0. The oldest image is removed first.
! Build Effect
Select a transition effect.
102
! Transparent
Mark this to have pure blue (R=0, G=0, B=255) parts of the image become
transparent.
! Center Horizontal
! Place at Right
! Scale to Screen
Mark this for the image to cover the same percentage of the screen regardless of
screen size.
! Hide Progress Bar
Mark this to hide the progress bar during image display.
! Center Vertical
! Place at Bottom
! 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 display a series of graphics at evenly-spaced intervals, which
is calculated by the number of files to be installed. Place all Display Billboard actions
before the first Install File(s) action if you are using Timed Display.
! Local Graphic
Normally, you specify image files on your computer, which are then compiled into the
installation. Mark this to specify a file from the destination computer. With this
option, you can use variables in the Pathname field above. Example: %INST% to
indicate the directory from which the installation .EXE is running. Use this to change
graphics without rebuilding the .EXE.
To read about a script that uses this action, see Creating an Installer That Can Be
Customized During Compile on page 177.
Display Message
This action displays a message dialog and can optionally branch the script based on the
end user response. Without the branching option, this dialog has an OK button, which
continues, and a Cancel button, which halts installation.
! Message Title
Enter the title for the dialog.
! Message Text
This is displayed in the dialog. Press Ctrl+Enter to add line breaks in the displayed
text. You can use variables in this text.
! Message Icon
Select an icon for the dialog.
! Start If Block
Mark this to display Yes, No, and Cancel buttons instead of OK and Cancel. This
action then acts like an If action. Statements between this action and its matching
End action are executed if the end user clicks Yes. If the user clicks No, execution
continues with the first action after the End action. Cancel halts the installation.
103
! No Cancel
Mark this to suppress the Cancel button. Use this in informational messages to
prevent the end user from canceling installation.
Note
The Display Message action can help you debug. Use this action anywhere in the script to
display the value of a variable by entering %VARIABLE_NAME% in Message Text. See
Building a Debug Version on page 76 for more information.
To read about a script that uses this action, see Checking Disk Space by Calling a
Windows .DLL on page 184.
104
Edit INI File
This action edits an .INI file on the destination computer. To edit SYSTEM.INI, use the
Add to SYSTEM.INI action instead.
! File
Enter the .INI file pathname, or select a path from the list and edit it.
! INI File Contents
Enter changes to make in the .INI file. Changes are interpreted as follows:
• To add to a section, type the section name in brackets, then type new lines for
that section. If the .INI file already contains a name-value pair that you type, the
existing line is replaced by the new one. Example:
[SECTIONNAME]
Color=Blue
• To delete a section and its contents, type a section name with no lines after it.
Example:
[SECTIONNAME]
• To delete a name-value pair, type the name with an equals sign followed by
nothing. Example:
Color=
• Comments (lines starting with ;) are not supported.
Edit Registry
This action adds, edits, or deletes registry keys or values. Create registry entries
manually or import a registry file (.REG).
To copy registry settings from your computer’s registry, use Installation Expert >
Registry page instead.
! Registry Keys
This field shows root registry keys and the keys added by this action. Select a root
before adding or importing a key.
! Value Names
This field shows values being added or changed that reside under the key selected on
the left.
! New Key
To add a new key, select the parent key in Registry Keys, click the New Key button,
and select Key from the drop-down. A dialog appears, where you enter information
about the new key. See Registry Key Settings Dialog on page 106.
To import from a .REG file, select the parent key in Registry Keys, click the New Key
button, and select Import.
When you add a key, you are not necessarily adding it to the registry on the
destination computer. If the key already exists, this action might add a value to it,
update it, or delete it and all its associated values.
! Delete Key
Removes the selected key from the current installation. This does not remove it from
the destination computer. To do that, you must change the Operation field in the
key’s details dialog.
! New Value
To add a new value, select the parent key in Registry Keys, then click the New
Value button. A dialog appears, where you enter information about the new value.
105
! Delete Value
Removes the selected value from the current installation. This does not remove it
from the destination computer. To do that, you must change the Operation field in
the value’s details dialog.
! Data Settings
These fields in this section of the dialog correspond to fields you set when creating
the value. See Registry Key Settings Dialog on page 106.
To read about a script that uses this action, see Running a Program Once After
Computer Restart on page 178.
106
• String
(REG_SZ prefix) Indicates that a value entry is an expandable string. To embed
a variable name, (such as %WIN%), enclose it with double percents
(%%WIN%%). If you 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.
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 an 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 the application with self-
repair turned on. For information on how to set up self-repair, see Configuring an
Application for Automatic Self-Repair on page 20.
! 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. 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 Multiple Strings is selected in the Data Type drop-down list.
Else Statement
This 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, and
selecting it from the Action list inserts it directly into the script with no further dialogs or
prompts.
ElseIf Statement
This action is put 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
Statement 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.
107
! If Variable
Build an If statement by selecting or entering a variable and by selecting a
comparison. The first list shows variables defined in this installation. The second list
shows available comparisons.
Expression True means the expression in the Value field below is evaluated
according to the rules outlined in Variables and Expressions on page 79. The variable
is ignored and can be left blank. The result is considered true if it evaluates to a non-
zero result. Valid Password and Invalid Password evaluate according to 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 comparison is
set to Expression True. If you enter variable names in this field, do not surround
them with percent signs (%). If you enter compiler variables, then you must
surround them with percent signs.
End Statement
This 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.
Also see:
Get Windows Installer Property on page 114
Set Windows Installer Property on page 130
Execute Program
This action runs another .EXE. The .EXE can be a file already installed on the destination
computer, a file you installed as part of the installation, or a file you provide on a
separate disk.
If the .EXE you plan to execute is coded to pass back a return value, the resulting return
value is put into the variables %INSTALL_RESULT% and %PROCEXITCODE%. If the
.EXE passes back a return value, mark the Wait for Program to Exit checkbox.
! .EXE Path
Specify the full pathname to the .EXE to be executed (example:
%MAINDIR%\Application.exe).
108
! Command Line
Enter the command line options for the .EXE you are calling, as if you were typing
them in the Run dialog.
! Default Directory
Specify the directory that should be current when the .EXE file is executed. The
installation does the equivalent of a Change Directory command (cd) before
launching the .EXE. Click Browse and select a directory from your installation. You
can select from directories that you created on the Files page in Installation Expert.
! Variables Added
List any variables created in the .EXE that are not present in the calling script.
! Window Size
You can force the .EXE file to run in a maximized or a minimized window, or you can
let it run in its default window. Select Hidden to run the .EXE silently, which means it
runs minimized and its task is not shown on the task bar.
! Wait for Program to Exit
If this checkbox is marked, the installation does not continue until the .EXE has
exited. Make sure you mark this checkbox if the .EXE returns a value to the script. If
the installation does not wait for the .EXE to exit, add the command line parameter
-sms.
Note
This action uses the Windows ShellExecute call, which means that you can open documents as
well as applications. When the script opens a document, the associated application is
launched.
In Windows 95, the Write.EXE application calls WordPad.EXE. If you instruct the script to wait
until the application exits, call WordPad.EXE directly. Otherwise, the script continues without
showing WordPad.EXE because Write.EXE exits.
To read about scripts that use this action, see Downloading a File From a Web Site
During Installation on page 183 or Prompting the End User to Insert a Floppy Disk on
page 177.
Exit Installation
This action calls the Exit script and exits the installation. The Exit script is accessible in
the Event drop-down list in Setup Editor. No message appears unless you also set the
RESTART variable. See Automatic Runtime Variables on page 190.
! Application Exit Code
If this installation is called by another application, this is the return code to the
calling application. If the WISE_ERROR_RTN variable is already set, the value in
WISE_ERROR_RTN does not override the Application Exit Code but is written to the
installation log. See Runtime Variables on page 192.
! Install Status MIF
This section is disabled unless you enter Status MIF information on the Microsoft SMS
page in Installation Expert.
• MIF Text
This text is added to the Status MIF file when this action is executed.
• Success/Failure
A status for the installation is added to the Status MIF file.
109
Find File in Path
This action searches for a file on the destination computer. If more than one match
exists, only the first match is returned.
! File Name
Enter just the file name, not a full path. Wildcard characters (*, ?) are not allowed.
! Variable Name
Enter a variable to store the path of the file if it is found. If it is not found, this
variable stores the Default Value specified below.
! Default Value
This value is put into the variable if the file is not found. To use an If statement that
tests the variable, leave this blank so it evaluates to false.
To install a new version of the file, specify the file’s typical location here. Then, if the
file is located, the location replaces the default value, but if it is not, this default
value is used to install the file.
! Description
Enter text to display if the find operation takes more than 1.5 seconds to complete.
This happens only if the list of directories in the PATH is very long or a directory is on
a slow device (example: CD-ROM).
! Search Directories
Enter a semicolon-delimited list of directories to search. You can use variables in this
field. If this field is blank, only directories in the PATH environment variable are
searched.
! Remove File Name
Mark this to remove a file name from the end of a returned pathname, leaving only
the directory name. This operation is not performed on the Default Value.
To read about a script that uses this action, see Sample Script That Searches for Files or
Applications on page 178.
110
Get Name/Serial Number
This action displays a dialog that requests the end user’s name, company name, and a
product serial number. It provides backward compatibility with older WiseScripts. In new
scripts, use the Branding / Registration dialog in Installation Expert > Dialogs page.
! Title
Enter the title for the dialog.
! Description
Enter text to explain the dialog to the end user.
! Name Prompt
Enter text to appear next to the Name field.
! Company
Enter text to appear next to the Company field.
! Serial Number
Enter text to appear next to the Serial Number field.
! Variable
In the 3 Variable fields, enter the variables to store the Name, Company, and Serial
Number.
! Confirm Text
(Optional) Enter text to be displayed in a separate dialog to confirm registration. If
this is blank, no confirmation dialog appears.
111
! Value Name
Enter the value name. (If you are reading the Win16 registry, leave this field blank.)
! Root
Select the root that contains the registry key. (If you are reading the Win16 registry,
leave HKEY_CLASSES_ROOT selected.)
! Remove File Name
Mark this to remove a file name from the end of a returned pathname, leaving only
the directory name. This operation is not performed on the Default Value.
! Expand Environment Variables
If you read a REG_EXPAND_SZ value, mark this to have all environment variables in
the registry value replaced with their actual values.
To read about a script that uses this action, see Launching a Web Page From an Installer
on page 183.
112
• 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 UNC Pathname of the destination computer.
• Installer EXE Pathname
The pathname, including the file name, of the installation currently executing.
• File Size (Bytes)
The size of the file specified in Pathname.
• 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 Pathname.
• Windows Logon Name
The Windows network logon name of the user logged onto the destination
computer.
• Service Pack Number
Service pack number of the current operating system, if one exists.
• Current Date/Time (4-digit year)
Same as Current Date/Time above except a different format. Example: 07/14/
2004 11:18:10
• File Date/Time Modified (4-digit year)
Same as File Date/Time Modified above except a different format. Example:
07/14/2004 11:18:10
• Disk Free Space (KBytes)
Free disk space of the drive specified in Pathname. In Pathname, enter a drive
(C:\) or a pathname (%MAINDIR%\ReadMe.txt). If you enter a pathname, it
returns the free space on the drive the pathname refers to. You can enter a UNC
path such as \\SERVER\Apps\CAT.EXE. Windows 95/98 does not return the disk
space for UNC paths.
• Current Date/Time (Regional settings)
Gets the date and time specified by the destination computer’s regional settings.
! Pathname
Specify the full pathname of the file or directory to retrieve information from
(example: %MAINDIR%\readme.txt). Use this field only for operations that retrieve
information on files or directories.
To read about a script that uses this action, see AutoPlay on page 174.
113
finishes. Example: Use this to install a .DLL that is called during installation, and is then
no longer needed.
! Variable
Select or enter a variable to store the temporary file name. Only a file name is
generated. To refer to this file, prefix it with the %TEMP% variable extension.
Example: If the variable is %HELPFILE%, the full path of the file would be
%TEMP%\%HELPFILE%.
Also see:
Set Windows Installer Property on page 130
Evaluate Windows Installer Condition on page 108
Halt Compilation
This action immediately halts compilation of the script. It must be placed between
Compiler Variable If and Compiler Variable End statements or the script will never
compile. Use this to make sure conditions are met before compiling.
! Message Text
Enter the message the end user sees if the compilation is terminated.
Example: You develop a script that uses runtime files. On your own computer, you have
the correct runtime files to pull into the installation. However, you want to prevent
compilation on other computers if they lack correct runtime files because the resulting
installation could damage runtime installations on destination computers.
You do this by adding a Compiler Variable If/Else/End block. You get the file version of a
key runtime file using the file version option of a Compiler If statement. Then, if the file
version is not the one the script requires, use the Halt Compilation action to prevent
compilation.
If Statement
This action marks the beginning of a conditional block of script, an If block. If the
condition specified in the If Statement is true, the lines inside the If block are executed.
The If block can also contain an Else or several ElseIf actions.
! If Variable
Build an If statement by selecting or entering a variable and by selecting a
comparison. The first list shows variables defined in this installation. The second list
shows available comparisons.
Expression True means the expression in the Value field below is evaluated
according to the rules outlined in Variables and Expressions on page 79. The variable
is ignored and can be left blank. The result is considered true if it evaluates to a non-
114
zero result. Valid Password and Invalid Password evaluate according to 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 comparison is
set to Expression True. If you enter variable names in this field, do not surround
them with percent signs (%). If you enter compiler variables, then you must
surround them with percent signs.
To read about a script that uses this action see Sample Script That Searches for Files or
Applications on page 178. For scripts that evaluation expressions within an If statement,
see Performing Calculations on Integer Values on page 178 and Parsing Strings on
page 179. For a script that uses nested If, Else, and End statements, see Checking an
FTP Site for Newer Files on page 183.
Include Script
This action adds an additional script to the current installation script. During compile,
the include script is copied into the calling script at the location of the Include Script
action, resulting in a combination of the scripts. Include scripts can save time because
you can develop a library of WiseScripts that perform specific functions, like subroutines.
You can re-use include scripts and share them with colleagues. They typically contain
just a few lines of code, such as calling an .EXE or displaying a particular dialog. Include
scripts can be any size with the limitation that the calling script plus include scripts
cannot be more than 32,000 lines.
Include scripts are displayed in tabs at the bottom of Setup Editor view. To determine if
files are duplicated in an installation because of an include script, select Edit menu > the
Duplicate Files Report.
To make an include script, create a new file and select Blank Script. Otherwise the
include script contains the default script, which is designed to perform an installation.
The combined script would then have 2 wizard loops, 2 of every dialog, and so on. Only
the script is inserted into the calling script. Any configuration in Installation Expert is
ignored, including compiler variables on the Compiler Variables page.
! Pathname
Specify the pathname of the script. It should be a .WSE file on your computer, not
the destination computer. Because the main script and include scripts are combined
during compile, not runtime, do not use a runtime variable in Pathname. You can,
however, use a compiler variable.
Example of a line in the script that includes a script:
Include Script C:\Scripts\OpensWord.wse
Example of what a short include script might look like:
Execute %PROGRAM_FILES%\winword.exe
115
! File to Edit
Specify the pathname of the text file to edit (example: %SYS32%\file.txt).
! Text to Insert
Enter the line to add to the file. If the line refers to a directory or file, start the path
with a variable (example: %MAINDIR%\application.exe).
! Line Number
Enter the line number at which to insert the new line. Enter zero to append to the
end of the file. The Search for Existing Text area overrides any line number
specified here unless the text is not found.
! Search for Text
Enter the text to search for. If more than one line in the file matches, only the first is
edited.
! Comment Text
Enter text to insert at the beginning of the found line. When replacing an existing
line, use Comment Text to leave the existing line in place but inactive. Set Insert
Action to insert before the existing line so subsequent installations find and edit the
active command, not the commented line.
! Insert Action
Select the action to be taken when a line is found.
! Match Criteria
Select how the line is matched with text in Search for Text.
! Ignore White Space
Mark this to ignore spaces and tab characters.
! Case Sensitive
Mark this to make the match case-sensitive.
! Make Backup File
Mark this to make a copy of the file before editing it. The backup has the same file
name except with a number appended to the end.
To read about a script that uses this action, see Creating a Connection Between a
Database Client and Oracle Server on page 177 or Manipulating a Text File on page 177.
Install File(s)
This action installs files on the destination computer. Each file or directory to be installed
must have a separate Install File(s) action. It easiest to use Installation Expert to add
most files, and to use Setup Editor to add or edit a few Install File(s) lines.
When you’re installing files permanently on the destination computer using the Install
File(s) script action, you might also want to make sure that the destination computer
has enough disk space available for these files. Do this using the Check Disk Space
script action. See Check Disk Space on page 94.
The results from an Install File(s) action are put into a variable, INSTALL_RESULT. See
its description in Automatic Runtime Variables on page 190.
! Source Pathname
Specify the pathname of the file on your computer. You can use wildcards in this field
to indicate that all the files in a directory that match a certain pattern should be
installed (example: C:\Dev\*.exe). You can also use compiler variables, but you
should not use runtime variables, because this field is used at compile time.
116
! Destination Pathname
Specify the pathname the file will have on the destination computer. Use variables to
start the pathname (example: %MAINDIR%\Dev\file.txt). This field has a drop-down
list with common variables. Do not include wildcards in this field.
! Description
Enter text to appear in the progress bar while this file is installed.
! Require Password
If you entered a password in Installation Expert > Password page, and you mark
this, the end user is prompted for the password before this file is installed.
The password prompt appears only once, for the first password-protected file in an
installation, regardless of the number of password-protected files. If no password-
protected files are slated for installation, the prompt does not appear.
! Include Sub-Directories
If you specify a directory in Source Pathname, mark this to include all
subdirectories and their contents.
! Shared DLL Counter
If this is marked, and the file is a .DLL or .VBX, Windows tracks the file to prevent its
removal if an installed application is still using it.
! No Progress Bar
To hide the progress bar, mark this for every file in the installation. If you mark it for
some files, but not others, the progress bar seems to display continuously because
the screen does not refresh between files.
! Self-Register OCX/DLL/EXE/TLB
All .OCXs and .TLBs and some .DLLs and .EXEs support self-registration. Mark this so
the file registers itself in the Windows registry before it is used. This action does not
register the file, but specifies that it should be registered later. Include a Self-
Register OCX/DLL action to register the file. See Self-Register OCXs/DLLs on
page 127.
! Do Not Download With WebDeploy
This checkbox is available if you click Complete support for Internet-based
installation 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.
Mark this checkbox to put the file in the installation .EXE rather than storing it as a
separate file.
! Repair application if this file is missing
Mark this checkbox to initiate self-repair if this file is missing during application
launch. This prevents your application from failing if this file is accidently deleted. For
information on setting up self-repair, see Configuring an Application for Automatic
Self-Repair on page 20.
! Replace Existing File
Select when to replace existing files on the destination computer.
• Always
The new file always replaces the old file.
• Never
The file never overwrites an existing file. Select this for files that 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 (example: configuration
files).
117
• Check File
The existing file is only replaced if the requirements you set in File Version and
File Date/Time are true.
" Doesn’t Matter
Select this option if only one of the requirements, File Version or File
Date/Time, must be fulfilled to replace the existing file.
" Same or Older
For File Version, this replaces the existing file if it has a version resource
that is the same as or older than the new file. If the existing file lacks a
version resource, it is not replaced.
For File Date/Time, this replaces the existing file if its modification date
and time are the same or older than the new file.
" Older
For File Version, this replaces the existing file if it has a version resource
that is older than the new file. If the existing file lacks a version resource, it
is not replaced.
For File Date/Time, this replaces the existing file if its modification date
and time are older than the new file.
! Retain Duplicates in Path
By default, version checking removes existing copies of .DLLs that are found in the
path list. To suppress this feature, mark this checkbox.
! Existing File Pathname
SmartPatch creates a patch file that contains only the differences between the older
installation and the new installation.
If you are using Smartpatch, specify the pathname where the installation can expect
to find one of the files listed in Previous File Versions. If a wildcard was used in
Source Pathname, this field should contain a directory. Start the path with a
variable.
! Previous File Versions
Use the Browse button to create a list of files that are older versions of the file or files
being installed.
118
! Driver Pathname Variable
Select or enter a variable to store the directory where the driver files should be
installed.
! Install Drivers For
Select 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 in ENTRY=VALUE format. This is
added to the ODBCINST.INI file.
Open/Close Install.log
Normally, every file that is installed is recorded in the install.log. The uninstall works by
reading Install.log from bottom to top and reversing each recorded action.
The Open/Close Install.log action lets you customize the uninstall, by turning logging off
and on at key points to prevent some actions from being recorded in the log. If you use
this action to stop logging, you must also use it to resume logging after, or no log file is
created.
Select one of the following options for each Open/Close Install.log action that you add to
the script.
! Resume/Start writing entries into installation log
! Pause writing entries into installation log
This must be followed, at some point, by another Open/Close Install.log action that
resumes writing, or no log file is created.
! Open new installation log
Mark this to create a new installation log. Then enter the complete path or just the
file name of the new log to the right (examples: %MAINDIR%\Speciallog.log or
Speciallog.log). If just a file name is entered, the log is written to the same directory
as the first installed file. The log’s default location and name are set on the
Installation Log page of Installation Expert. See Installation Log on page 42.
119
Also see Add Text to INSTALL.LOG on page 85.
Parse String
This action splits a text string and places the results in 2 variables.
You can split the string at a character or substring that you specify, which discards the
character or substring you specified. Example: If you split the string “ONE,TWO” at the
first occurrence of a comma, “ONE” is put into destination variable 1 and “TWO” is put
into the destination variable 2. If the character or substring is not found, the entire
string is put into destination variable 1, and nothing is put into destination variable 2.
The find is case-sensitive.
You can also split a string at any arbitrary character position, which discards no
characters. Example: If you split the string “ONE,TWO” at character position 4 from left,
then “ONE,” is put into the destination variable 1 and “TWO” is put into the destination
variable 2.
! Source Value
Enter the text to be parsed. You enter text and variables (examples: %MAINDIR% or
%MAINDIR%\%PICTDIR%). To include a literal percent (%) symbol, use %%.
! Pattern/Position
Enter the character pattern or the character position at which to split. Character
patterns are case-sensitive unless you mark Ignore Case. To split at a pattern,
enter any number of characters, including numbers, and select one of the pattern
options in Operation. To split a string based on character position, enter the
character position, where 1 is the first character, and select one of the position
options in Operation.
! Destination Variable 1,2
Select or enter variables to store the 2 strings resulting from this operation.
Operation, below, determines how each variable is populated.
! Operation
Select how to split the text string.
! Trim Spaces
Mark this to remove leading and trailing spaces from both destination variables.
! Ignore Case
Mark to make pattern matching case-insensitive.
To read about scripts that use this action, see Creating a Connection Between a
Database Client and Oracle Server on page 177, Launching a Web Page From an
Installer on page 183, or Manipulating a Text File on page 177.
Pause
This action temporarily stops a script from executing. After the specified number of
milliseconds, the script continues. Example: Use this action to display a billboard for
several seconds.
! Milliseconds to pause
Enter the number of milliseconds to pause the script. A millisecond is 1/1000 of a
second. To pause for 1 second, enter 1000.
120
continues. The multimedia file must be installed on the destination computer before this
action is called. It must be small enough to fit into the destination computer’s RAM for it
to play correctly, because the disk is heavily accessed by the installation process. To
produce sound, the destination computer must be properly equipped and configured.
! File Type
Select either .WAV or .AVI.
! Pathname
Specify the pathname to the .WAV or .AVI file. Start this field with a variable
(example: %MAINDIR%\Movie.avi). If the multimedia file is used only during
installation, you can use the Get Temporary Filename action to obtain a random
filename, then install the file to %TEMP%\%TEMPFILENAME%.
! X Position, Y Position
Indicate the location on a 640 x 480 screen at which an .AVI file should be played
back. Coordinates are adjusted proportionately for the display resolution on the
destination computer.
! Loop Continuously
121
Prompt for Filename
This action prompts the end user to select a file using a standard Open or Save dialog.
The complete pathname of the file or directory is returned in a variable. (Example: Use
the returned directory to set the installation directory for a subset of files.) No file is
actually opened or saved by this action. This action is included to provide backward
compatibility for older WiseScripts. In new scripts, use custom dialogs or dialog controls
to perform the same function. This action requires an End Statement, because it begins
a block of statements, similar to an If Statement.
! Dialog Type
Select Open File or Save As.
! Dialog Title
Enter the title for the dialog.
! Dest. Variable
Select or enter a variable to store the pathname of the file or directory the end user
selects.
! Default Extension
Enter the extension to append to the file name if the end user does not enter one.
! Filter List
Enter the file types to appear in the Files of Type drop-down list in the Open or
Save dialog. Use Shift+Enter to enter a carriage return in this field. Example: to
show text, .JPGs and bitmaps, enter:
Text Files (*.txt);*.txt;
Pictures (*.jpg);*.jpg;
Bitmaps (*.bmp);*.bmp
! Allow selection of multiple files
Mark this to let end users select multiple files with Ctrl or Shift.
! Prompt if file does not exist
Mark this to displays a confirmation dialog if the specified file does not exist.
! File must exist
Mark this to halt the installation until an existing file has been specified.
! Pathname must exist
Mark this to halt the installation until an existing pathname has been specified.
! Skip write permissions test
If you selected Save As for Dialog Type, and you clear this checkbox, the
installation attempts to create the file that the end user specified in the Save As
dialog to verify write permissions. If you mark this checkbox, the installation skips
the file creation attempt.
! Do not validate the pathname
Mark this to accept any pathname without any validation.
! Display prompt if overwriting existing file
Mark this to display a message if a file selected by the end user already exists.
122
! Window Name
Enter the title for the dialog.
! Description
Enter brief instructions here.
! Prompt Name
Enter the label to be displayed next to the text input field.
! Default Value
Enter the text to be displayed in the text input field by default.
! Variable Name
Enter a variable to store the text entered by the end user.
! Directory
Mark this to delete trailing backslashes from the text, 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 an existing file
or directory, a dialog asks whether to overwrite.
To read about scripts that uses this action, see Performing Calculations on Integer
Values on page 178 or Parsing Strings on page 179.
123
! Default Value
Enter the value to store in the variable below if the specified entry is not found.
! Variable Name
Enter a variable to store the value of the INI item.
! Remove File Name
Mark this to remove a file name from the end of a returned pathname, leaving only
the directory name. This operation is not performed on the Default Value.
Note
This action does not support reading or writing non-ASCII characters (characters with codes
above 127).
! File Pathname
Specify the pathname of the file to be read (example: %MAINDIR%\file.exe).
! Variable Name
Select or enter the variable that is to be read into or written from.
! File Offset
Enter the number of bytes into the file to start writing or reading. Bytes are
numbered starting with zero.
124
! Max. Length
Enter the maximum number of bytes to be written to or read from the file. When
writing, if the length of the variable exceeds this value, the string is truncated. When
reading, any trailing spaces are trimmed.
! Transfer Direction
Select whether to write to or read from the file.
! Null Terminated
If this checkbox is marked, a zero byte is written to the binary file after the string.
Reboot System
This action reboots the destination computer.
! Reboot Operating System
On Windows 9x or 3.1, this restarts Windows at the end of installation. On Windows
NT4/2000/XP, this option logs the end user out of Windows.
! Reboot Computer System
Performs a full system reboot on the destination computer at the end of installation
on all operating systems, if the end user has administrator privileges. On Windows
NT4/2000/XP, if the end user does not have administrator privileges, this option only
logs the end user out.
Register Font
This action registers a new TrueType font (.TTF file) that has been copied into the
Windows font directory.
! Font File Name
Specify the file name of the .TTF font file (not the pathname) to be registered. The
drop-down list contains font files that you have added to this installation. The file
must already have been installed in the font directory on your computer, 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
This action puts comments or blank lines in the script. Remarks are green by default.
You can change the color Preferences.
! Comment
Enter the comment. To insert a blank line, leave this field blank.
Rename File/Directory
This action renames a file or directory on the destination computer. This can be an
existing file or directory, or a file or directory that your installation installed. The file
must not be busy.
! Old Pathname
Specify the full path to the existing file or directory (examples:
%MAINDIR%\PICTURES\picture.jpg or %MAINDIR%\PICTURES\). If you click
Browse, you can select only a file.
125
! New File Name
Enter the new file name or directory name (examples: picture2.jpg or PHOTOS).
Select Components
This action displays up to 10 checkboxes for optional installation components to end
users. 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 action is included to provide
backward compatibility for older WiseScripts. In new scripts, a wizard dialog performs
the same function.
! Title
Enter the title for the dialog.
126
! Dest. Variable
Enter a variable to store the letters returned from the end user choice
(COMPONENTS is used in the standard script). If the script sets this variable to a
series of letters before displaying the dialog, the buttons that correspond to those
letters are selected by default.
! Disk Variable
(Optional) Select or enter a variable to store the pathname where your application
will be installed (MAINDIR is used in the standard script). If this field is filled in, the
free space on this drive is displayed on the dialog.
! Sub-Components
Enter a list of sub-components. These sub-components are incorporated in the disk
space calculations if the main component is selected.
! Description
Enter explanatory text to be displayed above the radio buttons. Press Shift-Enter for
a carriage return.
! Component List
Enter the choices, one on each line, pressing Enter after each.
Self-Register OCXs/DLLs
Use this action to self-register all queued .OCX, .DLL, and .EXE files or to add an existing
file to the queue.
! Description/Pathname
• If you mark Register all pending OCXs/DLLs/EXEs below, enter a message
to display to the end user during registration. The Browse button is disabled if
you mark this option.
• If you mark Queue existing file for self-registration below, specify a full
pathname of the file to register.
! Register all pending OCXs/DLLs/EXEs
Mark this to register all queued .OCX, .DLL, and .EXE files. In the Install File(s) and
Copy Local Files(s) actions, there is an option to queue files for self-registration. See
Install File(s) on page 116 and Copy Local File(s) on page 98.
! Queue existing file for self-registration
Mark this to queue the file listed in Pathname for later self-registration.
127
• Operation
Select how to manipulate the control.
To read about a script that uses this action, see Configuring a Dialog to Handle Mouse
Events on page 179.
128
! Read Only / Hidden / System
Mark the attributes to set.
! Scan Directory Tree
Mark this to apply the changes to all files in the specified directory, along with all files
in its subdirectories and their subdirectories.
! Archive
Mark this to set the archive attribute, which is used by some backup programs.
Set Files/Buffers
This action sets the FILES= and BUFFERS= lines in Config.sys. 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 the minimum specified in this action, it is not changed.
! Minimum Files
The minimum number of files to be specified by FILES= in Config.sys. Set this 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 this
to zero or leave blank to leave BUFFERS= unchanged.
Set Variable
This action sets the value of a variable by providing a literal value, by modifying the
variable’s existing value, or by evaluating an expression.
! Variable
Select or enter a variable. Variable names must begin with a letter, must contain only
numbers, letters, and underscore characters, and must be 28 characters or less. It
should not be enclosed in % signs.
! New Value
Enter the new value of the variable. If you enter a variable, enclose it in % signs. The
value of a variable can be up to 32K in size.
The new value is also affected by the option set in Operation.
! Operation
Select the operation to be performed on the value in New Value.
• Nothing
No additional changes are made.
• Increment, Decrement
If the value is a number, it is increased or decreased by one. To do this
operation, you must specify the variable’s existing value in the New Value field.
Example: To increment the variable VAR, enter VAR in the Variable field and
%VAR% in the New Value field.
• Remove trailing backslashes
Trailing \ characters are removed, converting the variable to a valid directory
name.
• Convert to long or short filename
Converts an existing pathname to its equivalent long or short pathname if the
installation runs on 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 the case you select.
129
• Evaluate Expression
The expression in New Value is evaluated according to the rules outlined in
Variables and Expressions on page 79.
! Append to Existing Value
Mark this to add the variable’s new value to the end of its original value instead of
replacing it.
! Remove File Name
Mark this to remove a file name from the end of a returned pathname, leaving only
the directory name.
! Read Variable From Values File
Mark this to read the variable from the values file specified on a command line to the
installation .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.
To read about a script that uses this action, see Performing Calculations on Integer
Values on page 178.
Also see:
Get Windows Installer Property on page 114
Evaluate Windows Installer Condition on page 108
Start/Stop Service
This action lets you start or stop a service on the destination computer. It only applies to
operating systems that support services.
After you attempt to stop a service, the script pauses to give the service time to stop.
The currently logged-in end user must have the appropriate privileges to start and stop
services.
! Service Name
Enter the name of the service. This is not necessarily the same name you see in the
Services control panel, but is the services internal name. If you used the Create
Service action to create the service, this is the same name you entered in the Create
Service Settings dialog.
! Operation
Select to start or stop the service.
130
Example: Suppose a service must be stopped before it can be updated. Use this action
to first stop the service, then update its files.
While Statement
This action begins a loop. An End statement must end the loop. As long as the condition
specified in the While Statement Settings dialog is true, the script lines inside the loop
execute repeatedly. If the condition specified is not true, then the While loop is exited,
and the next script line is executed.
! While Variable
Build a condition by selecting or entering a variable and by selecting a comparison.
The first list shows variables defined in this installation. The second list shows
available comparisons.
Expression True means the expression in the Value field below is evaluated
according to the rules outlined in Variables and Expressions on page 79. The variable
is ignored and can be left blank. The result is considered true if it evaluates to a non-
zero result. Valid Password and Invalid Password evaluate according to 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 comparison is
set to Expression True. If you enter variable names in this field, do not surround
them with percent signs (%). If you enter compiler variables, then you must
surround them with percent signs.
! Perform While loop at least once
Mark this so the loop executes 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.
To read about a script that uses this action, see Error Checking User Input on page 178
or Killing an Application Using Windows .DLL Calls on page 184.
Wizard Loop
This action precedes dialogs that make up the majority of the installation’s end user
interface. End users can move forward and backward through these dialogs. The script
continues executing inside the wizard loop until the last dialog has been filled out and
accepted. Installation Expert creates default Wizard Loop and Custom Dialog actions for
you.You can also build them yourself, or use Setup Editor to customize the existing
structure.
! Dialog Boxes
Displays a list of the Custom Dialog actions inside the wizard loop structure. Select a
dialog to edit its setting in the bottom part of the Wizard Loop Settings dialog.
131
! Skip Dialog
This lets you set a condition under which a dialog is skipped. You can set different
Skip settings for each dialog.
Example: If one dialog asks whether to back up configuration files before installing,
and the next asks where to store the backup files, you could 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.”
• If Variable
Build a condition by selecting or entering a variable and by selecting a
comparison. The first list shows variables defined in this installation. The second
list shows available comparisons.
Expression True means the expression in the Value field below is evaluated
according to the rules outlined in Variables and Expressions on page 79. The
variable is ignored and can be left blank. The result is considered true if it
evaluates to a non-zero result. Valid Password and Invalid Password
evaluate according to 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 comparison
is set to Expression True. If you enter variable names in this field, do not
surround them with percent signs (%). If you enter compiler variables, then you
must surround them with percent signs.
! Direction Variable
Select or enter the variable to store the direction the Wizard is currently heading.
When Next is clicked, the value N is stored in the direction variable. When Back is
clicked, B is stored. If you create custom Wizard dialogs, follow this convention. By
default, DIRECTION is used for this variable, which you can use in Skip Dialog
conditions to set dialogs to be displayed when the direction is forward but skipped
when going backward.
! Display Variable
Select or enter the variable to store the name of the dialog that is being displayed
this time through the loop. This variable is used in the Dialog Set Properties dialog in
Custom Dialog Editor. By default, DISPLAY is used for this variable.
! Pathname
Specify the full pathname to a bitmap file on your computer to be displayed in the
wizard dialogs. Do not use variables (except compiler variables) in the pathname.
The file is copied 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 137.
! X-Pos, Y-Pos
Determines the relative placement of the graphic in the dialog, using X and Y
coordinates.
! Do not resize bitmap
Mark this to ensure the image is displayed at the same size at all resolutions.
Normally, bitmaps are automatically resized 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.
! 3D Border
Mark this to add a 3-dimensional border to the image.
132
! Bitmap Filler Color
This color is displayed around the edges of the bitmap if it does not fill the image
area in the dialog. When the destination computer is set to display large fonts, the
dialog automatically increases in size, and the bitmap might not fill the image area.
Note
The dimensions of the first Wizard dialog set the dimensions for all the dialogs in the wizard
loop.
To read about a script that uses this action, see Showing or Skipping Dialogs Based on
End User Input on page 181.
133
Chapter 6
Creating Custom Dialogs
Use the Custom Dialog Editor to change the appearance of installation dialogs and to
create new dialogs. You can also edit and create default dialog templates, add
interactivity to dialogs, and work with dialog sets.
Topics include:
! About the Custom Dialog Editor.
! About Dialog Controls.
! Solutions for Dialog Problems.
! About Custom Dialog Sets.
! About the Dialog Script Editor.
134
About the Custom Dialog Editor
Use it to:
! Create new dialogs. See Adding a Dialog to the Installation on page 135.
! Edit dialogs. See Editing Dialogs on page 136.
! Create and edit default dialog templates. See Editing Dialog Templates on page 136.
! Set dialog properties. See Setting Dialog Properties on page 137.
! Create a dialog set. See About Custom Dialog Sets on page 157.
! Add interactivity to dialogs. See About the Dialog Script Editor on page 159.
Access it from:
! Installation Expert by clicking the Edit or Add button on the Dialogs page.
! Setup Editor by double-clicking the Custom Dialog script action or a Custom Dialog
script line.
! The Edit Menu by selecting Dialog Templates, and then selecting a dialog name and
clicking OK.
135
About the Custom Dialog Editor
Note
To use this dialog in other installation scripts, select File menu > Save As and save the dialog
as a .DLG file in the \Dialogs\Template directory in the WiseScript Editor application directory.
This does not affect the current installation. You can add a saved dialog to another installation
by selecting File menu > Open in Custom Dialog Editor.
Editing Dialogs
Whenever you edit a dialog from the Dialogs Page in Installation Expert or by double-
clicking the Custom Dialog script line in Setup Editor, you are editing the dialog for the
current installation only. However, if you save the dialog and overwrite the .DLG
template file, then the dialog is changed for all future installations.
1. To open the dialog, do one of the following:
• Select Installation Expert > Dialogs page.
" Select the dialog and mark its corresponding checkbox.
" Click Edit.
• In Setup Editor, locate and double-click the Custom Dialog script line that calls
the dialog.
136
About the Custom Dialog Editor
4. Save the changes by selecting File menu > Save Changes and Exit.
A dialog asks you to confirm your choice, because the dialog will be used in all
future installations.
Note
You can also resize the dialog by clicking its edges and dragging. Use the Width and
Height fields for more precise sizing.
137
About Dialog Controls
138
About Dialog Controls
Note
When you place a combo box field, you must resize the bounding box so that it is taller than
the visible combo box. Otherwise, the drop-down list fails to drop down when you run the
installation.
For information about scripting dialogs to handle mouse events, see Configuring a Dialog
to Handle Mouse Events on page 179.
139
About Dialog Controls
• Calculated Value
The Calculated Value section is used primarily for component installations to
display the space requirements for the selected components. Example: When a
component installation is run, the Select Component Dialog screen shows the
Disk Space Required and the Disk Space Remaining fields. That information is
provided by the following fields:
" Components
This variable represents the Disk Space Required by the selected component
set. Select the COMPONENTS variable, as it calculates the total space
requirements for the currently-selected component set.
" Disk
This variable represents the Disk Space Remaining on the installation drive.
Select the MAINDIR variable, as it keeps track of free space in the
installation directory.
• X-Position / Y-Position
Specify the exact location of the control on the dialog in dialog units. You can
also use the alignment commands to precisely arrange controls on the dialog.
See Aligning and Spacing Dialog Controls on page 152.
• Width / Height
Specify the exact dimensions of the control in dialog units. You can also resize
controls by dragging their handles, though this is not as precise.
4. Click OK.
140
About Dialog Controls
• Password
Mark this if entered text should display as asterisks (*), providing password
security.
• No Hide Sel
Normally, text highlighting is hidden when the dialog loses focus. Mark this
checkbox to suppress the hiding of highlighting.
• Want Return
Mark this to let the end user advance to the next line with the Enter key. This
option must be used with the Multi-line option.
• Border
Mark this to include a border around the edit field.
• Uppercase / Lowercase
Mark this to convert all entered characters to a different case.
• Read Only
Mark this to prevent end users from entering data into the field.
• Tab Stop
Mark this to let end users use the Tab key to give focus to this field. Make sure
this is marked for input fields.
• RichEdit
Mark to enable the text box to support rich text objects (example: formatted
text, bold, italic, font size variations, and colors). This causes rich text files to
display properly.
• Read Default Text from File
Enter the pathname of a text file. The file contents are displayed in this field.
This path should be relative. Use variable substitution (example: %MAINDIR%
to refer to the destination directory) to begin the path.
• Min. Length / Max. Length
Enter the minimum or maximum allowed number of characters for text entered
in this field. To make the field optional, set the minimum length to zero.
• Directory
Mark this to remove trailing backslashes from the text before it is placed in the
variable.
• Confirm If Exists
Mark this 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.
• X-Position / Y-Position
Specify the exact location of the control on the dialog in dialog units. You can
also use the alignment commands to precisely arrange controls on the dialog.
See Aligning and Spacing Dialog Controls on page 152.
• Width / Height
Specify the exact dimensions of the control in dialog units. You can also resize
controls by dragging their handles, though this is not as precise.
4. Click OK.
141
About Dialog Controls
next dialog. Each dialog must have at least one button that allows the end user to get
out of the dialog.
1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.
2. Select Add menu > Push Button.
The Push Button Control Settings dialog appears.
3. Complete the dialog:
• Label
Enter the name of the push button. To create a keyboard shortcut 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
Enter or select the name of the script variable that stores the return value of this
dialog control.
• Value
Enter the value that gets assigned to the 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.
• 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. (Exception: The
Back buttons on 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
Launches another application or links to a Web page. Click Edit to specify
and configure the application to be launched. See Specifying Execute
Program Settings on page 152.
" Execute Named Event
Passes a named event to the dialog script. The DLG_EVENT_TYPE variable is
set to the entered text. See About the Dialog Script Editor on page 159.
• X-Position / Y-Position
Specify the exact location of the control on the dialog in dialog units. You can
also use the alignment commands to precisely arrange controls on the dialog.
See Aligning and Spacing Dialog Controls on page 152.
142
About Dialog Controls
• Width / Height
Specify the exact dimensions of the control in dialog units. You can also resize
controls by dragging their handles, though this is not as precise.
• Default Button
Mark this 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 to suppress directory confirmation and field validity checking (useful
for Browse buttons).
4. Click OK.
For information about scripting buttons to handle mouse events, see Configuring a
Dialog to Handle Mouse Events on page 179.
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. Example: 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.
143
About Dialog Controls
• X-Position / Y-Position
Specify the exact location of the control on the dialog in dialog units. You can
also use the alignment commands to precisely arrange controls on the dialog.
See Aligning and Spacing Dialog Controls on page 152.
• Width / Height
Specify the exact dimensions of the control in dialog units. You can also resize
controls by dragging their handles, though this is not as precise.
4. Click OK.
For information about scripting radio buttons to handle mouse events, see Configuring a
Dialog to Handle Mouse Events on page 179.
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. Example: A checkbox with four options whose variable is set to “ABcd”
would have the last two options disabled.
• Sub-Components
If the checkbox control is being used to specify the components to be installed,
and if the components have sub-components, enter the names of sub-
component variables separated by commas.
• 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
Specify the exact location of the control on the dialog in dialog units. You can
also use the alignment commands to precisely arrange controls on the dialog.
See Aligning and Spacing Dialog Controls on page 152.
144
About Dialog Controls
• Width / Height
Specify the exact dimensions of the control in dialog units. You can also resize
controls by dragging their handles, though this is not as precise.
• Components
If this is marked, the sizes of the components that correspond to the variable
specified are displayed to the right of the checkboxes. Normally, you mark this
checkbox only if you are selecting components and have specified the
COMPONENTS variable.
• Retain Disabled
If you set the checkbox variable so that some of its options are disabled, those
options become enabled if the end user proceeds to the next dialog and uses the
Back button to backtrack. Mark this checkbox to make disabled radio button
options retain their disabled state, even if end users go backward and forward on
dialogs. This checkbox causes any lowercase letters in the variable to stay in the
variable, even after the end user navigates between dialogs. If this checkbox is
cleared, the variable takes on the value of the option that was selected, and the
lowercase information is lost.
4. Click OK.
For information about scripting checkboxes to handle mouse events, see Enabling,
Disabling, and Marking Controls in a Dialog on page 181.
Note
When you place a combo box, you must resize the bounding box so that it is taller than the
visible combo box. Otherwise, the drop-down list fails to drop down when you run the
installation.
1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.
2. Select Add menu > Combo Box.
The Combo Box Control Settings dialog appears.
3. Complete the dialog:
• Combo Box Text
Enter the text to be displayed in the list. Enter one item per line.
• Sort
Mark this to sort the combo box items into ascending order.
• Vert. Scroll
Mark this to let the end user scroll vertically if there are more items than fit into
the allocated space.
• Auto HScroll
Mark this to scroll the text entry field horizontally if more text is entered than
fits.
145
About Dialog Controls
• ProgMan Groups
Mark this to have 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 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 to remove trailing backslashes from the text before it is placed in the
variable.
• Confirm If Exists
Mark this 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.
• Variable
Enter or select the name of the script variable that stores the return value of this
dialog control.
Note
To cause an option in the list to be pre-selected, 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.
Note
When setting the width for a combo box field, make sure it is at least as wide as the
longest option in the list.
146
About Dialog Controls
1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.
2. Select Add menu > List Box.
The List Box Control Settings dialog appears.
3. Complete the dialog:
• 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 return value 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
Select the list box type:
" Normal. A simple list.
" Program Manager Groups. A list of the items in the Programs group of the
Start menu. If the installer runs on Windows 3.1, the Program Manager
groups appear in the list box.
" Directory Tree Browse. A directory tree browser including an edit field,
directory tree, and disk drive list.
" List Box with Checkboxes. A list containing a checkbox for each item,
allowing multiple items to be selected simultaneously.
• Components
If this list box control is being used to specify the components to be installed,
and if the components have sub-components, enter the names of sub-
component variables separated by commas.
• Sort
Mark this to sort the list box items in ascending order.
• Vert. Scroll / Horiz. Scroll
Mark this to add a vertical or horizontal scroll bar to the field.
• Disable No Scroll
Mark this to display a vertical scrollbar even if one is not needed.
• Multi-Select
Mark this to allow the end user to select multiple items from the list.
• Return Letters
Mark this 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 to not append the “Program Files” directory name onto the Destination
Directory selected by the end user.
147
About Dialog Controls
• Confirm If Exists
Mark this 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.
• Components
Populate the Components field above and mark this checkbox to create named
components.
• Store Position
Mark this 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.
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
Specify the exact location of the control on the dialog in dialog units. You can
also use the alignment commands to precisely arrange controls on the dialog.
See Aligning and Spacing Dialog Controls on page 152.
• Width / Height
Specify the exact dimensions of the control in dialog units. You can also resize
controls by dragging their handles, though this is not as precise.
4. Click OK.
148
About Dialog Controls
1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.
2. Select Add menu > Graphic in Custom Dialog Editor.
The Graphic Control Settings dialog appears.
3. Complete the dialog:
• Graphic Pathname
Specify the pathname for the bitmap graphic to add to the dialog.
• 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.
• Do not resize bitmap graphic
Normally, graphics are resized if the dialog needs to be made larger (example: if
the destination computer uses a larger font size). Mark this checkbox to keep the
graphic at the same size, regardless of the system settings. Because this option
may cause the graphic to appear in a different place on the dialog, test the
installation thoroughly.
• X-Position / Y-Position
Specify the exact location of the control on the dialog in dialog units. You can
also use the alignment commands to precisely arrange controls on the dialog.
See Aligning and Spacing Dialog Controls on page 152.
• Width / Height
Specify the exact dimensions of the control in dialog units. You can also resize
controls by dragging their handles, though this is not as precise.
4. Click OK.
149
About Dialog Controls
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
Launches another application or links to a Web page. Click Edit to specify
and configure the application to be launched. See Specifying Execute
Program Settings on page 152.
" Execute Named Event
Passes a named event to the dialog script. The DLG_EVENT_TYPE variable is
set to the entered text. See About the Dialog Script Editor on page 159.
• Set Font
Normally, all controls use the default font, which you set on the Dialog Box
Properties dialog. Click this to override the default font for this control. If the
font you choose is not available on this computer, the system font is used.
• Default Font
Click this to use the font specified on the Dialog Box Properties dialog.
• Disabled Color / Enabled Color
Click Color to choose from the palette or to define custom colors. Enabled Color
is the color in which the hot text appears when the end user moves the mouse
pointer moves over the text.
• Underline Enabled Text
Mark this to underline the hot text when the end user moves the mouse pointer
over the text.
• X-Position / Y-Position
Specify the exact location of the control on the dialog in dialog units. You can
also use the alignment commands to precisely arrange controls on the dialog.
See Aligning and Spacing Dialog Controls on page 152.
• Width / Height
Specify the exact dimensions of the control in dialog units. You can also resize
controls by dragging their handles, though this is not as precise.
• Do Not Check Fields
Mark this to suppress directory confirmation and field validity checking.
4. Click OK.
150
About Dialog Controls
151
About Dialog Controls
Note
Variables Added retained for backward compatibility only.
• Window Size
You can force the application to run in a maximized or minimized window, or
allow it to run in its default (normal) window.
• Wait for Program to Exit
If this is marked, the installation does not continue until the application has
exited.
4. Click OK.
152
About Dialog Controls
3. Specify the new tab order by clicking the controls in the desired order.
• As you click each control, its number turns black.
• When you have clicked the last control, the numbers disappear and the new tab
order is applied.
153
About Dialog Controls
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.
154
Solutions for Dialog Problems
155
Solutions for Dialog Problems
156
About Custom Dialog Sets
Note
Generally dialog sets are comprised of one dialog and the other dialogs that it calls. Example:
A dialog might have an Options and Browse buttons, each of which brings up a dialog. The
three dialogs together comprise a dialog set. The main dialogs that you see during installation
are not a dialog set, but are controlled by a Wizard Loop action in the script.
157
About Custom Dialog Sets
• 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 to have
called dialogs appear over the calling dialog. (Example: 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.
4. Click OK.
158
About the Dialog Script Editor
1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.
2. Select View menu > Dialog Script Editor.
The Dialog Script Editor opens.
3. Create the script as you would in Setup Editor.
For information about scripting a dialog to handle mouse events, see Configuring a
Dialog to Handle Mouse Events on page 179.
159
About the Dialog Script Editor
160
About the Dialog Script Editor
161
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.
Topics include:
! Accessing the Custom Billboard Editor.
! About the Custom Billboard Editor.
! Opening and Saving Custom Billboards.
! Adding Objects to a Billboard.
162
Accessing the Custom Billboard Editor
The tools you need to work in the Custom Billboard Editor are accessible from its menu
bar or the icons on the toolbar.
163
About the Custom Billboard Editor
164
Opening and Saving Custom Billboards
165
Adding Objects to a Billboard
166
Adding Objects to a Billboard
• Text Color
Click Pick to choose a color for the text 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.
4. Click OK.
167
Adding Objects to a Billboard
• 3D
(Rectangle only) Each option from this list gives the rectangle a different 3D
effect.
• Line Width
The width of the object’s outline in pixels.
• Line Color / Fill Color
Click Pick to choose a color for the line and fill 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.
4. Click OK.
When you double-click the mouse button, the Polygon Settings dialog opens.
3. Complete the dialog:
• Line Style
Choose the texture for the line that outlines the polygon.
• Fill Style
Choose from No Fill (line only), Solid Color, or a variety of crosshatch styles.
• Line Width
The width of the object’s outline in pixels.
• Polygon Points
The list of points that define the polygon’s vertices. Click Delete to delete a
selected point, or use the X and Y fields to move the selected point to new
coordinates.
• Line Color / Fill Color
Click Pick to choose a color for the line and fill using the standard Windows color
picker.
4. Click OK.
168
Adding Objects to a Billboard
content to the graphics, rather than making the text part of the bitmap. You can then
easily change the text if you need to translate it into a different language or update it.
The Custom Billboard Editor supports 256-color and true-color bitmap (.BMP) files.
When using multiple bitmaps, it is important that they all be created using the same
graphics editor so the files share a common color palette. Otherwise, the colors can shift
when the bitmaps display on-screen.
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.
1. Access the Custom Billboard Editor. See Accessing the Custom Billboard Editor on
page 163.
2. Select Add menu > Bitmap and drag the dimensions of the bitmap frame in the
billboard editor.
When you release the mouse button, the Bitmap Settings dialog opens.
3. Complete the dialog:
• Pathname
Enter the pathname to the graphic on your computer.
• Transparent
Mark this to make the color chosen below transparent.
• Transparent Color
Click Pick to choose the transparent color using the standard Windows color
picker. Every pixel in the image with this color becomes invisible on the billboard,
meaning you can see everything behind it.
• 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.
169
Adding Objects to a Billboard
• Align Left
Lines up the left edge of the selected object with the left edge of the leftmost
object.
• Align Right
Lines up the right edge of the selected object with the right edge of the
rightmost object.
• Align Top
Lines up the top edge of the selected object with the top edge of the topmost
object.
• Align Bottom
Lines up the bottom edge of the selected object with the bottom edge of the
bottommost object.
• Space Evenly Down
Distributes the selected objects vertically between the topmost and bottommost
objects. Their horizontal position is not changed. Use Align Left or Align Right
to move them into a column.
• Space Evenly Across
Distributes the selected objects horizontally between the topmost and
bottommost objects. Their vertical position is not changed. Use Align Top or
Align Bottom to move them into a row.
170
Adding Objects to a Billboard
• Center Vertical
• Place at Bottom
• 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 display a series of graphics at evenly-spaced intervals,
which is calculated by the number of files to be installed. Place all Display
Billboard actions before the first Install File(s) action if you are using Timed
Display.
4. Click OK.
171
Chapter 8
Advanced Scripting
Use the advanced scripting topics to automate the build process, create an installation
that uses AutoPlay, and acquire an advanced understanding of Setup Editor scripts.
Topics include:
! Automating the Build Process.
! AutoPlay.
! About Sample Scripts.
! Using Sample Scripts.
! Sample Scripts That Perform Tasks.
! Sample Scripts That Restart the Destination Computer.
! Sample Scripts That Use Expression Operators.
! Sample Scripts That Use Complex Dialogs.
! Sample Scripts That Perform Web and FTP Transactions.
! Sample Scripts That Call .DLLs
! Sample Scripts That Check System Configuration
172
Automating the Build Process
Note
To test the options without the scheduling program, open a command line window and type a
command line statement. Select Windows Start menu > Run, type command (Windows 9x) or
cmd (Windows 2000 or NT), and click OK.
173
AutoPlay
AutoPlay
The Windows operating system has the ability to automatically open a file on a compact
disc (CD) when it is inserted into the computer. This feature is referred to as AutoPlay.
When Windows detects that a CD drive has been accessed, it scans the root directory of
the CD drive for a text file called AutoRun.inf. You can create this file in any text editor.
The AutoRun.inf file must have an [autorun] section, which identifies the lines that
follow as AutoPlay commands. The [autorun] section contains an open statement that
specifies the path of the file that should start when the CD is inserted. The icon
statement specifies the file name that contains the icon. If the files are in the same
directory as the AutoRun.inf file, enter just the file names. If the files are located inside
a directory on the CD, enter a relative pathname. For more information about AutoPlay,
go to msdn.microsoft.com and search for “AutoRun” or “AutoPlay”.
Following is an example of an AutoRun.inf File:
[autorun]
open=Program.exe
icon=filename.ico
Where Program.exe is any Windows program.
The sample script AutoPlay.wse, which presents the end user with choices, is the type of
dialog you might display using the AutoPlay feature. For information on AutoPlay.wse,
see Handling Mouse Events Without Scripting on page 180.
174
About Sample Scripts
175
About Sample Scripts
176
About Sample Scripts
177
About Sample Scripts
178
About Sample Scripts
Parsing Strings
The following sample scripts demonstrate how to manipulate text strings using
expression operators. See Expression Operators on page 195 for a complete list and
usage.
! Before$.wse
To return the characters in a string that occur before another string.
! After$.wse
To returns the characters in a string that occur after another string.
! Concat$.wse
To concatenate one string with another string.
! Instr.wse
To determine if one string is present inside another string.
! Lcase$.wse
To change all characters in a string to lowercase.
! Left$.wse
To get the left portion of a string.
! Rtrim$.wse
To remove all spaces at the end of a string.
! Ltrim$.wse
To remove all spaces at the beginning of a string.
! Len.wse
To determine the length of a string.
179
About Sample Scripts
dialogs, but you can also handle mouse events without scripting. The script
AutoPlay.wse handles mouse events without scripting.
Sample scripts are in the Samples directory in the WiseScript Editor application
directory.
180
About Sample Scripts
181
About Sample Scripts
The Radio Button Control Settings dialog appears. Note that the variable in the
Variable drop-down list is COMPONENTS. When the end user marks a radio button,
the following is put into the variable COMPONENTS:
• A capital “A” if the end user marks the first radio button.
• A capital “B” if the end user marks the second radio button.
• A capital “C” if the end user marks the third radio button.
4. Click Cancel in the Radio Button Control Settings dialog, then select File menu > Exit
Without Saving.
5. In the installation script, double-click the script line:
Wizard Loop
The Wizard Loop Settings dialog opens.
6. In the dialogs list, click “Install2” and note its Skip Dialog settings.
The dialog “Install2” is skipped if COMPONENTS is not set to “B,” that is, if the end
user didn’t mark the second radio button. Likewise, the dialog “Install1” is skipped if
COMPONENTS is not set to “A.”
182
About Sample Scripts
results are put into the variable SAMPLE_SUB. A capital “A” is added to
SAMPLE_SUB if the end user marks the first checkbox and a capital “B” if the end
user marks the second checkbox.
7. Click Cancel in the Checkbox Control Settings dialog and select File menu > Exit
Without Saving.
This returns you to Setup Editor.
8. Scroll down in the script until you see the script lines:
If COMPONENTS Contains Any Letters in “A” then
If SAMPLE_SUB Contains Any Letters in “A” then
The first If statement checks if “A” is in COMPONENTS, which would be true if the
end user marked the Sample Files checkbox in the Select Components dialog. The
second checks if “A” is in SAMPLE_SUB, which would be true if the end user marked
the DLL Samples checkbox in the Sample Files Components dialog. If the end user
marked both, then both variables contain the letter “A,” and the Install File(s) script
lines after the second If statement are executed.
For information on how the Subcomp.wse script sets checkboxes to be initially marked
or unmarked, see Enabling, Disabling, and Marking Controls in a Dialog on page 181.
183
About Sample Scripts
Note
The Display control panel Settings tab indicates what color palette is set on the computer.
184
About Sample Scripts
185
Chapter 9
Troubleshooting Installations
You have several options for debugging an installation. You can use:
! The installation log to determine what is happening during the installation, including
what fails.
! The built-in debugger, as described in Using the Debug Commands on page 75.
! 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. See Compiler Variables on page 30.
Topics include:
! Using the Installation Log.
! File Replacement Problems in System32.
186
Using the Installation Log
187
File Replacement Problems in System32
188
Chapter 10
Quick Reference
189
Standard Variables
Standard Variables
The following variables are set by WiseScript Editor 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
Variable Description
BACKUPDIR If this is set to a path, any files that are replaced during
installation are backed up. This variable is set by the end
user on the Backup Replaced Files dialog.
CMDLINE The command line options passed to the installation .EXE.
CRLF Holds a carriage return/linefeed character for use in
making lists and separating items in lists.
DISK_NUMBER (read- The number of the disk currently being used by the
only) installation. We recommend that you do not change this
variable.
DLG_EVENT_TYPE Used for custom dialog scripts. Built-in dialog events are
INIT, UPDATE, VERIFY (see About the Dialog Script Editor
on page 159).
FONTS Pathname to directory where fonts should be installed.
HELPFILE Used by custom dialogs to display a help context. Set to
full pathname of help file. We recommend that you do not
modify this variable.
INST Pathname to directory containing installation .EXE. We
recommend that you do not change this variable.
190
Standard Variables
Variable Description
Edit INI File returns: “E” if the file could not be written, or
null if the edit was successful.
191
Standard Variables
Variable Description
Runtime Variables
The following runtime variables might be set 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
192
Standard Variables
Variable Description
CGROUPDIR Path to the directory where shortcuts for all end 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.
EXPLORER If set to 1, the end user has a Windows 95-style user
interface on the destination computer (95/98, NT 4 or
later).
GROUP Default group (or Start menu Programs group) for
application shortcuts.
GROUPDIR Path to directory where application shortcuts should be
created (corresponds to GROUP variable).
MAINDIR Directory for application files.
NAME Used for branding and registration.
PROCEXITCODE Lets you add your own error codes to the built-in error
codes that are returned from an installation. Check for an
error condition and, if the error condition is true, put your
own error text into PROCEXITCODE. If, at the end of the
installation, PROCEXITCODE is not blank, the return code
from the installation is set to the contents of
PROCEXITCODE. This lets you write conditional code
based on the results of an external program.
Be sure to:
! Mark the Wait for Program to Exit checkbox on the
Execute Program Settings dialog for the Execute
Program action.
! Select True Win32 from the Destination Platforms
drop-down list on the Build Settings page. (This
variable is the same as WISE_ERROR_RTN.)
PROGRAM_FILES Windows Program Files directory.
STARTMENUDIR Directory of the Start menu for adding shortcuts.
193
Standard Variables
Variable Description
194
Expression Operators
Expression Operators
In conditionals, loops, and Set Variable commands, you can use symbols (examples: +
and –) for addition and subtraction, functions (example: Left$) to work with bits of text,
and logical (Boolean) operators (examples: AND, OR) to combine several conditions into
one.
Operators can operate on a variable or a constant. There are 2 types of constants:
numeric and string. Numeric constants must be a positive or negative integer (example:
234 or -100). Strings must be enclosed in quotation marks.
If you enter a variable name instead of a number or string in any of the functions below,
do not enter % around the variable name. Variables must follow the standard naming
conventions, described in Variables and Expressions on page 79.
To read about scripts that demonstrate using expression operators, see Sample Scripts
That Use Expression Operators on page 178.
Operator Description
+ Addition
– Subtraction
* Multiplication
/ Division
Left$(str, position) Returns left portion of string, where str is the string, and
position is number of characters from the left to return.
Example: Left$(“windows”,3) returns “win.”
Right$(str,position) Returns right portion of string, where str is the string, and
position is the number of characters from the right to
return. Example: Right$(“windows”,3) returns “ows.”
Mid$(str,position, Returns middle portion of string, where str is the string,
length) position is the number of characters from the left to start,
and length is the number of characters to return.
Example: Mid$(“windows”,2,3) returns “ind.”
Concat$(str1,str2) For appending 2 strings together.
Instr(str1,str2) Determines if a substring (str2) is present within an
original string (str1). Do not include the $ character
because this operator does not return a string.
Before$(str1,str2) Returns the portion of a string (str1) before the indicated
substring (str2). Example: Before$(“windows”,“d”) returns
“win.”
After$(str1,str2) Returns the portion of a string (str1) after the indicated
substring (str2). Example: After$(“windows”,“d”) returns
“ows.”
Len(str) Returns the length of a given string. Do not include the $
character because this operator does not return a string.
Lcase$(str) Converts all characters in a string to lowercase.
Ucase$(str) Converts all characters in a string to uppercase.
195
Expression Operators
Operator Description
Logical
Example Description
Operator
196
Windows Language Codes
197
Windows Language Codes
198
Command Line Options
See:
WiseScript Editor (Wise32.EXE) on page 199
WiseScript Installations (Setup.EXE) on page 199
Uninstall (Unwise.EXE, Unwise32.EXE) on page 200
Option Function
Examples:
! Compiling a .WSE file while defining a compiler variable named _PATH_:
"C:\Program Files\Wise Package Studio\WiseScript Editor\Wise32.exe" /
d_PATH_=C:\TEST /c "C:\Development\Application.wse"
! Compiling a .WSE file while setting compiler variables defined in a text file named
Compile.txt:
“C:\Program Files\Wise Package Studio\WiseScript Editor\Wise32.exe” /c /
d=C:\Development\Compile.txt “C:\Development\Application.wse”
199
Command Line Options
Option Function
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:
200
Command Line Options
201
Index
202
Index
203
Index
examples for 161 Also see dialog, adding checkbox, See checkbox
custom dialog set Also see dialog, displaying combo box, See combo box
See dialog set appearance 137 control 138
custom installation template 21 calling dialogs 157 control, See control
changing control text 128 drop-down 145
custom script code, incompatible 13
common problems 155 frame 150
custom splash screen 46 creating 102, 135 graphic control 148
Custom tab 64, 69 default image, changing 155 group box control 148
customizing disabling control 159, 181 hot text control, See hot text
development environment 21, 69 dismissing 141 list box 146
page group 22 display to user 103 movie 151
displaying text file 104 radio button, See radio button
CUT/PASTE 176
editing, See dialog, editing rectangle
cyclic redundancy check 29 enabling control 159, 181 control 150
Czech language code 197 event, built-in 159 text 140
executing program from 152 text control 139
D floating 158 to script 135
Danish language code 197 font problems 43 dialog, displaying
database client, connecting 177 handling mouse event 156, 179 rich text 140
installation wizard 33
date/time file modified dialog, editing
license agreement 183
getting 112 about 136
list box 140 control 138
getting 4-digit year 113
listing Program groups 147
date/time, current from Dialogs page 136
manipulating control 181
getting 112 from Setup Editor 136
movie 151
getting 4-digit year 113 template 136
properties 137
debug version, building 76 push button 141 Dialogs page 33
debugging saving 136 Digital Signature page 34
commenting out script lines 66 script 159 DIRECTION 193
script 75, 75 scripting 127, 128, 156, 180 directory
default directory 45, 155 selecting 136 appended 155
settings 137 changing 18
default script
showing 181 check if exists 95
changing 21
size 137 contents, adding 38
Delete File(s) 102 skipping 181 creating empty 100
dependency, service 51, 100 spacing 152 default, setting 45
Desktop icon 51 stop "dir exists" message 156 in installation 18
DESKTOPDIR 193 stop appending to path 155 renaming 125
tab order, setting 153
destination computer disabling
text box 140
searching for file on 178 checkbox 156, 179
text field, editing 140 control 159, 181
destination directory title 137
append directory problem 155 radio button 179
to get filename 122
default, setting 45 script lines 66
to get text input 122
dir exists message 156 to let user browse 88 disk space
user-select 34 checking 94
toolbar 138
destination platform 30 checking with .DLL 184
Web link 150
wizard loop dialogs 131 getting 113
Detect QuickTime Version.wse 185
dialog set DISK_NUMBER 190
DetectIE4or5.wse 184
creating 157, 157 DISPLAY 193
development environment 21, 69
custom 157 Display Billboard 102
development process,
defined 157 Display Message
streamlining 21, 70
editing 157 example 76
device 87 example 157 script action 103
device driver floating dialog 158
Display Progress Message 104
adding to System.ini 33 master dialog 157
defining 33 Display Text File 104
naming 157
Devices page 33 properties 157 dividing numbers 178
dialog sample script for 179 Division.wse 178, 178
adding 34 dialog template, editing 136 DLG 136
aligning 152 dialog, adding DLG_EVENT_TYPE 190
Also see dialog set button 141 DLL
204
Index
call function 88, 184 evaluate expression 130 converting short to long 129
check if loaded 95 Evaluate Windows Installer copying from CD-ROM 29
excluding with Condition 108 copying to destination
ApplicationWatch 25 Event Handler.wse 179, 181 computer 116
excluding with Import VB date/time modified 112
event script
Project 25 deleting 102
area 65
self-registering 99, 117, 127 downloading from Web 98, 183
sending parameters 90 cancel 65 duplicate file 36
choosing 65
shared 39 error during compile 18
exit script 65
using to find color 184 extension, See file association
using to kill application 184 mainline 65 finding on destination
DOBACKUP 193 EXE computer 178
compiling 17 FTP from Web 98, 183
DOBRAND 193
getting pathname 113 in use 96
document type 35 location after compile 30 installation settings 38
documentation, Wise 9 naming 30 long filename 129
DOS version, getting 112 running silently 109 not opening 18
double-byte language 43 self-registering 99, 117, 127 open automatically 174
version resource 41 removing from installation 37
download installation 58, 183
execute installation 17 renaming 125
drive
execute program replacing in System32 188
CD-ROM, getting 113
from dialog 152 replacing on destination
getting first network drive 113 computer 39, 99, 117
type, getting 112 script action 108
requiring password 39
driver exit code 109
searching for 126, 178
defining device driver 33 Exit Installation 109
searching in PATH variable 178
ODBC 118 exit script 65 self-repairing 20, 39, 53, 101,
DRV 33 Exit Without Saving 165 117, 117
duplicate files in script 68 EXPLORER 193 short filename 129
size, getting 113
Dutch language code 197 expression
troubleshooting replacement 188
dword 90 about 79
evaluating 130 version checking 39, 99, 117
dword pointer 91 version, getting 112
example 178
file association
E expression operator
creating 35
about 195
Edit INI File 105 editing 36
example 179
Edit Registry 105 list of 195 File Associations page 35
ellipse in billboard 167 Expression True 108, 114, 131, 132 file extensions
Else Statement 107 See the first letter
extension, finding application for 178
ElseIf Statement 107 file name
extensions
empty project 14, 14, 21, 63 prompting for 122
See the first letter
empty registry key 47 see the first letter file type
Also see file association
enabling
checkbox 156, 179 F associating with program 35
control 159, 181 fast create 24 Files page 36
radio button 156, 179 feature Find File in Path 110
End Statement 108 See component 31 Finished dialog 34
English language code 197 file Finnish language code 197
environment variable 4-digit modified date 113 firewall 183
getting 110 adding particular type 38 First element of structure 92
reading 112 adding to installation 36
floppy disk
associating file type with
error checking user input 178 allowing change 88
program 35
error message configuring installation for 29, 43
association, See file association
about missing file 176 prompting user to insert 177
attributes 128
Also refer to online FON 40
auto-addition of associated 36
Knowledgebase font 40, 125
backing up replaced file on
changing text for 23 destination computer 34 Fonts page 40
compiler variable 23
check if exists 95 FONTS variable 190
for script sample 176
converting path 18, 19
version error 24 free disk space, getting 113
205
Index
206
Index
207
Index
exluding with Import VB previous version, searching for 55, 55 message, turning off 29
Project 25 processor, checking 93 running program after 178
self-registering 99, 117, 127 Reboot System 125
PROCEXITCODE 108, 193
ODBC rebuild installation after changes 24
Product Details page 45
data source, installing 97 rectangle
driver, installing 118 ProgMan 51, 84
control 150
Open Software Description 101 ProgMan group, getting 111
in billboard 167
Open/Close Install.log 119 program
executing 108, 152 reference manual
operating system See manual
running silently 109
checking 93 REG file
Program Files directory 155
requirements 54 adding 46
Program Manager
operators 195 importing 46, 47, 105
adding icon 84
optional installation item adding shortcut 51 REG_EXPAND_SZ 112
See component register .OCX/.DLL/.EXE/.TLB 39
hiding 49
options for command line 199 register files 99, 117
PROGRAM_FILES 193
Oracle Server 177 Register Font 125
progress bar
OSD 101 calculation 45 registry
owner name, getting 112 placement 45 adding automatically 24
suppressing 39 Also see REG file
P Progress Bar page 45 Also see registry key
Package Definition File (PDF) 44 editing 105
progress message 104
importing file 47
page group, customizing 22 Prompt for Filename 122
keys 47
page, resetting 15 Prompt for Text 122 specifying entries on destination
Pages menu 21 prompt, changing text for 23 computer 46
paging 93 Prompt.wse 184 registry file
Parameter Type 90 prompting user for See REG file
parameters information 179 registry key
passing to function 91 installation directory selection 34 adding 47
Parse String 120 properties appending to 49, 107
getting 114 creating 47
parsing text 178, 179
setting 130 editing 47, 47
passive FTP transfer 58 getting value 111, 160
Properties view 21
PASSWORD 191 removing from destination
Proxy.wse 183
Password page 44 computer 48, 106
push button control 141 removing from installation 47,
password, requiring 39, 39, 44, 44,
98, 117 105, 106
Q self-repair 49, 101, 107
patch installation 39, 40, 53, 118
QuickTime, checking version 185 settings 47, 106
PATH variable 27, 84, 110
Registry page 46
pathname R registry value
changing directory 18
radio button See registry key
relative path 19
about 143 relative path 19
UNC path 18
adding 143
Pause 120 release notes 9
control 143
PDF (Package Definition File) 44 disabling 179 REM statement
enabling 179 about 175
percent sign with compiler variable 80
Also see header remark
play AVI control 151 Radio Button Dialog 123
Remark 125
Play Multimedia File 120 Read INI Value 123
remark header, See header remark
Polish language code 197 Read/Update Text File 124
removable media 43
polygon in billboard 168 Read/Write Binary File 124
Rename File/Directory 125
Portuguese language code 197 ReadMe
for application 33 repair
Post to HTTP Server 121 about 19
preferences, setting 23 readme
Also see self-repair
See release notes
preprocessor variable 80 application 49, 53, 101, 107, 117
reboot during uninstall 19, 57, 60
Previous Version page
at script completion 125, 192 turning on 53, 101
See System Search page
forcing 178
require password 98, 117
208
Index
209
Index
210
Index
211