You are on page 1of 444

Wise Installation System

Reference Manual

Copyright

1994-2002 Wise Solutions, Inc. All Rights Reserved. This documentation and the accompanying software are copyrighted materials. Making unauthorized copies is prohibited by law. No part of the software or documentation may be reproduced, transmitted, transcribed, stored in a retrieval system or translated into any human or computer language without prior written permission of Wise Solutions, Inc. Wise Solutions, Inc. asserts its Moral Right to be identified as the author of this work, in all jurisdictions which recognize the Moral Right.

Notice

UNLESS OTHERWISE PROVIDED BY WRITTEN AGREEMENT WITH WISE SOLUTIONS, INC., THIS PUBLICATION, AND THE SOFTWARE SOLD WITH THIS PUBLICATION, ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK ARISING OUT OF THE USE OR PERFORMANCE OF THIS PUBLICATION AND SOFTWARE REMAINS WITH YOU. IN NO EVENT WILL WISE SOLUTIONS, INC., OR ANY OF ITS SUPPLIERS, BE LIABLE FOR ANY LOST PROFITS, LOST SAVINGS, DIRECT, INCIDENTAL OR INDIRECT DAMAGES OR OTHER ECONOMIC OR CONSEQUENTIAL DAMAGES, EVEN IF WISE SOLUTIONS, INC., OR ITS SUPPLIERS, HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. WISE SOLUTIONS, INC. RESERVES THE RIGHT TO MODIFY THIS DOCUMENT AT ANY TIME WITHOUT OBLIGATION TO NOTIFY ANYONE. IN NO EVENT SHALL WISE SOLUTIONS, INC.S OR ITS SUPPLIERS LIABILITY UNDER THIS AGREEMENT EXCEED THE SUM OF ANY AMOUNTS PAID HEREUNDER BY THE CUSTOMER TO WISE OR THE SUPPLIER.

Trademarks

Wise Solutions, Inc. owns a number of registered and unregistered Trademarks and Service Marks (the Marks). These Marks are extremely valuable to Wise Solutions, Inc. and shall not be used by you, or any other person, without Wise Solutions, Inc.s express written permission. The Marks include, but are not necessarily limited to the following: APPLICATION ISOLATION WIZARD; APPLICATIONWATCH; CONFLICTMANAGER; INSTALLATION DEVELOPMENT LIFE CYCLE; INSTALLBUILDER; INSTALLMAKER; INSTALLMANAGER; INSTALLTAILOR; MSI DEBUGGER; MSI SCRIPT; PACKAGEMANAGER; SETUPCAPTURE; SMARTMONITOR; SMARTPATCH; SOFTWARE DISTRIBUTION MADE EASY; SOFTWARE INSTALLATIONS MADE EASY; VISUAL MSIDIFF; WEBDEPLOY; WISE INSTALLATION SYSTEM; WISE PACKAGE STUDIO; WISE SOLUTIONS; WISESCRIPT; WISESCRIPT EXPRESS; WISEUPDATE; WISEUSER; and the Wise Solutions logo. In addition to Wise Solutions, Inc.s Marks, some Wise Products may include Trademarks or Service Marks owned by other corporations. These other Marks include, but are not necessarily limited to MICROSOFT WINDOWS and MICROSOFT VISUAL STUDIO .NET, which are registered Trademarks of Microsoft Corporation. You shall not use any of the Trademarks or Service Marks of Wise Solutions, Inc., Microsoft Corporation, or any other entity, without the express written permission of such Trademark or Service Mark owner.

Wise Solutions, Inc.

47911 Halyard Drive Plymouth, Michigan 48170 USA Phone: 734-456-2100 Fax: 734-456-2456 E-mail: info@wise.com Web: www.wise.com
9.02

CONTENTS

Contents
1 Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Documentation Roadmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Getting Help and Product Support . . Using Online Help . . . . . . . . . . . Getting Support at Our Web Site Asking Our Support Team . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 . 13 . 13 . 14

Getting Updates Over the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Downloading Application Runtimes Over the Web . . . . . . . . . . . . . . . . . . . . 16

2 Wise Installation System Basics . . . . . . . . . . . . . . . . 19


Wise Installation System Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Navigating Between Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Before You Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Steps for Building Your First Installation . . . . . . . . . . . . . . . Creating a New Installation . . . . . . . . . . . . . . . . . . . . . . . . Using Installation Expert . . . . . . . . . . . . . . . . . . . . . . . . . . Using Script Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compiling, Testing, and Running Your Installation . . . . . . . . Managing Installations . . . . . . . . . . . . . . . . . . Changing Source Directories . . . . . . . . . . . Converting to UNC-Based Source File Paths . Converting to Relative Source File Paths . . . Using Self-Repair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 . 23 . 24 . 26 . 27 . 28 . 29 . 29 . 30 . 32 . 34 . 37 . 37 . 38 . 39 . 41 . 43 . 46 . 46 . 48 . 50

Customizing Your Development Environment . . . . . . Creating and Editing Installation Templates . . . . . Showing Different Installation Expert Page Groups Customizing Installation Expert Page Groups . . . . Changing Installer Messages . . . . . . . . . . . . . . . Setting Preferences . . . . . . . . . . . . . . . . . . . . . . Distributing Copying Copying Copying

Your Installation . . . . . . . . . . . . . . . . . . . . a Setup Program to Removable Media. . . . . a Compiled Setup Program to the Network . a Compiled Setup Program to an FTP Server

CONTENTS

3 Installation Expert Pages . . . . . . . . . . . . . . . . . . . . . . 53


Add/Remove Programs . . Autoexec.bat . . . . . . . . . BDE Runtime . . . . . . . . . Billboards. . . . . . . . . . . . Build Settings . . . . . . . . . CAB Files . . . . . . . . . . . . Compiler Variables . . . . . Components. . . . . . . . . . Config.sys . . . . . . . . . . . Devices . . . . . . . . . . . . . Dialogs . . . . . . . . . . . . . Digital Signature. . . . . . . File Associations . . . . . . . Files . . . . . . . . . . . . . . . Fonts. . . . . . . . . . . . . . . General Information . . . . INI Files. . . . . . . . . . . . . Installation Log. . . . . . . . Languages . . . . . . . . . . . Media . . . . . . . . . . . . . . Microsoft SMS . . . . . . . . ODBC . . . . . . . . . . . . . . Online Registration . . . . . Password . . . . . . . . . . . . Product Details . . . . . . . . Progress Bar . . . . . . . . . Registry. . . . . . . . . . . . . Runtimes . . . . . . . . . . . . Screen. . . . . . . . . . . . . . Services . . . . . . . . . . . . Shortcuts . . . . . . . . . . . . SmartPatch . . . . . . . . . . System Requirements . . . System Search . . . . . . . . Uninstall . . . . . . . . . . . . WebDeploy . . . . . . . . . . WinCE Installation Pages . WinCE Components. . . . . WinCE Files . . . . . . . . . . WinCE Platform . . . . . . . WinCE Registry. . . . . . . . WinCE Shortcuts . . . . . . . WiseUpdate . . . . . . . . . . WiseUser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . 53 . . 54 . . 57 . . 59 . . 62 . . 64 . . 64 . . 66 . . 67 . . 69 . . 70 . . 71 . . 72 . . 74 . . 81 . . 81 . . 82 . . 84 . . 85 . . 87 . . 87 . . 88 . . 89 . . 90 . . 91 . . 91 . . 92 . . 97 . 102 . 103 . 105 . 108 . 110 . 112 . 115 . 117 . 121 . 124 . 130 . 133 . 135 . 137 . 138 . 138

CONTENTS

4 Script Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139


Working in Script Editor . . . . . . . . . . . . . . . . . . The Script Editor Window. . . . . . . . . . . . . . . Choosing a Script to Edit . . . . . . . . . . . . . . . Editing the Script . . . . . . . . . . . . . . . . . . . . Adding New Actions to a Script . . . . . . . . . . . Commenting Out Script Lines . . . . . . . . . . . . Finding Text in a Script . . . . . . . . . . . . . . . . Replacing Text in a Script . . . . . . . . . . . . . . Checking for Duplicate Files in Include Scripts Customizing the List of Actions . . . . . . . . . . . Creating User-Defined Actions . . . . About User-Defined Actions . . . Creating a User-Defined Action: Creating a User-Defined Action: ........ ........ Procedure Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 . 141 . 143 . 144 . 146 . 147 . 147 . 149 . 150 . 151 . 153 . 153 . 154 . 156

Debugging Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Using the Script Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Building a Debug Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Scripting Guidelines . . . . . . . . . . . . . . . . . . Conditionals and Loops . . . . . . . . . . . . . Variables and Expressions . . . . . . . . . . . Compiler Variables vs. Runtime Variables Anatomy of a Script . . . . . . . . . . . . . . . About Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 . 166 . 167 . 168 . 170 . 171

5 WiseScript Actions . . . . . . . . . . . . . . . . . . . . . . . . . . 173


Add BDE Alias . . . . . . . . . . . Add Directory to Path . . . . . . Add ProgMan Icons . . . . . . . . Add Text to Install.log . . . . . . Add to Autoexec.bat . . . . . . . Add to Config.sys . . . . . . . . . Add to System.ini . . . . . . . . . Allow Floppy Disk Change . . . Browse for Directory . . . . . . . Call DLL Function . . . . . . . . . Check Configuration . . . . . . . Check Disk Space . . . . . . . . . Check HTTP Connection . . . . . Check If File/Dir Exists . . . . . Check In-use File . . . . . . . . . Check Service . . . . . . . . . . . Compiler Variable If/Else/End. Config ODBC Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 174 . 175 . 176 . 178 . 180 . 182 . 184 . 185 . 185 . 186 . 194 . 196 . 198 . 199 . 201 . 202 . 203 . 204

CONTENTS

Configure BDE . . . . . . . . . . . . . . . . Copy Local File(s) . . . . . . . . . . . . . . Create Directory . . . . . . . . . . . . . . . Create Service . . . . . . . . . . . . . . . . Create Shortcut . . . . . . . . . . . . . . . Custom Billboard . . . . . . . . . . . . . . Custom Dialog . . . . . . . . . . . . . . . . Delete File(s) . . . . . . . . . . . . . . . . . Display Billboard . . . . . . . . . . . . . . . Display Message . . . . . . . . . . . . . . . Display Progress Message . . . . . . . . Display Text File . . . . . . . . . . . . . . . Edit INI File . . . . . . . . . . . . . . . . . . Edit Registry . . . . . . . . . . . . . . . . . Else Statement . . . . . . . . . . . . . . . . ElseIf Statement. . . . . . . . . . . . . . . End Statement . . . . . . . . . . . . . . . . Evaluate Windows Installer Condition Execute Program . . . . . . . . . . . . . . Exit Installation . . . . . . . . . . . . . . . Find File in Path . . . . . . . . . . . . . . . Get Environment Variable . . . . . . . . Get Name/Serial Number . . . . . . . . . Get ProgMan Group. . . . . . . . . . . . . Get Registry Key Value . . . . . . . . . . Get System Information . . . . . . . . . Get Temporary Filename . . . . . . . . . Get Windows Installer Property . . . . Halt Compilation . . . . . . . . . . . . . . . If Statement . . . . . . . . . . . . . . . . . Include Script. . . . . . . . . . . . . . . . . Insert Line Into Text File . . . . . . . . . Install DirectX . . . . . . . . . . . . . . . . Install File(s) . . . . . . . . . . . . . . . . . Install ODBC Driver. . . . . . . . . . . . . Install WinCE Component . . . . . . . . Install WiseUpdate Client . . . . . . . . . Modify Component Size . . . . . . . . . . Open/Close Install.log . . . . . . . . . . . Parse String . . . . . . . . . . . . . . . . . . Pause . . . . . . . . . . . . . . . . . . . . . . Play Multimedia File . . . . . . . . . . . . Post to HTTP Server . . . . . . . . . . . . Prompt for Filename . . . . . . . . . . . . Prompt for Text . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 206 . 208 . 211 . 212 . 215 . 217 . 217 . 218 . 219 . 221 . 222 . 224 . 225 . 227 . 231 . 231 . 232 . 232 . 233 . 235 . 235 . 237 . 238 . 240 . 241 . 242 . 244 . 245 . 246 . 247 . 248 . 249 . 251 . 253 . 256 . 258 . 258 . 262 . 262 . 263 . 265 . 265 . 266 . 268 . 269

CONTENTS

Radio Button Dialog . . . . . . . . Read INI Value . . . . . . . . . . . . Read/Update Text File . . . . . . . Read/Write Binary File. . . . . . . Reboot System . . . . . . . . . . . . Register Font . . . . . . . . . . . . . Remark . . . . . . . . . . . . . . . . . Rename File/Directory . . . . . . . Search for File . . . . . . . . . . . . Select Components . . . . . . . . . Self-Register OCXs/DLLs . . . . . Set Control Attributes . . . . . . . Set Control Text . . . . . . . . . . . Set Current Control. . . . . . . . . Set File Attributes . . . . . . . . . . Set Files/Buffers . . . . . . . . . . . Set Variable . . . . . . . . . . . . . . Set Windows Installer Property. Start/Stop Service . . . . . . . . . While Statement. . . . . . . . . . . Win32 System Directory . . . . . Wizard Loop . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. 271 . 272 . 273 . 274 . 275 . 276 . 276 . 277 . 277 . 279 . 281 . 281 . 282 . 283 . 284 . 284 . 285 . 286 . 287 . 288 . 289 . 290

6 Creating Custom Dialogs . . . . . . . . . . . . . . . . . . . . . 293


Adding and Editing Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 Adding a Dialog to Your Installation . . . . . . . . . . . . . . . . . . . . . . . . . . 294 Editing Existing Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 Working With Dialogs . . . . . . . . . . . . . . . . Setting Dialog Properties . . . . . . . . . . . Using the Right-Click Menu in the Dialog Introduction to Dialog Controls . . . . . . . Adding and Editing Dialog Controls . . . . Aligning and Spacing Dialog Controls . . Setting Tab Order of Dialog Controls . . . Configuring Dialog Control Properties . Text Controls . . . . . . . . . . . . . . . Hot Text Controls . . . . . . . . . . . . Edit Text Controls . . . . . . . . . . . . Push Button Controls. . . . . . . . . . Radio Button Controls . . . . . . . . . Checkbox Controls . . . . . . . . . . . Combo Box Controls . . . . . . . . . . List Box Controls . . . . . . . . . . . . Group Box Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..... ..... Editor ..... ..... ..... ..... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 . 299 . 300 . 300 . 301 . 302 . 302 . 304 . 304 . 306 . 309 . 312 . 314 . 315 . 317 . 319 . 322

CONTENTS

Graphic Controls . . . . . . . . . . . . . . . Rectangle Control . . . . . . . . . . . . . . Play AVI Control . . . . . . . . . . . . . . . Specifying Execute Program Settings

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. 322 . 323 . 324 . 326 . 327 . 327 . 328 . 329 . 329 . 330

Solving Problems in Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Changing the Default Graphic on Wizard Dialogs . . . . . . . . . . . . Removing Program Files From the End of Destination Directory . Disabling the Directory Already Exists Message . . . . . . . . . . . . Keeping Disabled Buttons from Reactivating . . . . . . . . . . . . . . . Handling Mouse Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Working With Custom Dialog Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 Creating a Dialog Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 Configuring Dialog Set Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 Creating a Custom Dialog Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333

7 Creating Custom Billboards . . . . . . . . . . . . . . . . . . . 337


Accessing the Custom Billboard Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 Working with the Custom Billboard Editor . . . . . . . . About Billboard Files . . . . . . . . . . . . . . . . . . . . Opening and Saving Custom Billboards . . . . . . . Adding Objects to a Billboard . . . . . . . . . . . . . . Editing Billboard Text Objects. . . . . . . . . . . . . . Editing Billboard Line Objects . . . . . . . . . . . . . . Editing Billboard Rectangles and Ellipses . . . . . . Editing Billboard Polygon Objects . . . . . . . . . . . Editing Billboard Bitmap Objects . . . . . . . . . . . . Resizing, Moving, and Aligning Billboard Objects. Setting Billboard Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 . 339 . 339 . 340 . 340 . 342 . 343 . 344 . 345 . 346 . 347

8 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
About Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350 SetupCapture . . . . . . . . . . . . . . . . . . . . Guidelines for Capturing an Application Running SetupCapture . . . . . . . . . . . Setting General Settings . . . . . . . . . . Setting Directories to Watch. . . . . . . . Setting File and Folder Exclusions . . . . Setting Registry Exclusions . . . . . . . . Executing Installations to Be Captured Files Ignored by SetupCapture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 . 351 . 352 . 355 . 356 . 358 . 361 . 362 . 364

ApplicationWatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Import Visual Basic Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368

CONTENTS

9 Using WiseUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . 373


The WiseUpdate Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 Using WiseUpdate in Your Installation . . . . . . . . . . . . . . . . Configuring the WiseUpdate Page . . . . . . . . . . . . . . . . . Using the Distribution Wizard to Upload WiseUpdate Files Using WiseUpdate Without the Distribution Wizard . . . . . Testing WiseUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 . 376 . 379 . 380 . 381

Using the WiseUpdate Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 Configuring WiseUpdate for Subsequent Versions . . . . . . . . . . . . . . . . . . . 385 Using WiseUpdate with WebDeploy and SmartPatch . . . . . . . . . . . . . . . . . . 386 WiseUpdate Tips and Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . 387

10 Advanced Scripting . . . . . . . . . . . . . . . . . . . . . . . . 389


Automating the Build Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 Using Script Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 Learning About Script Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 Troubleshooting Script Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 Messages About Converting the Script. . . . . . . . . . . . . . . . . . . . . . . . . 393 Messages About Missing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 Solving Problems by Using Sample Scripts . . . . . . . . . . . . . . . . . . . . . Creating an Installer That Can Be Customized During Compile . . . . . Finding a File on the Destination Computer . . . . . . . . . . . . . . . . . . Finding a File in the PATH Environment Variable . . . . . . . . . . . . . . . Finding an Application That Is Associated With an Extension . . . . . . Running a Program Once After Computer Restart . . . . . . . . . . . . . . Forcing the Destination Computer to Restart . . . . . . . . . . . . . . . . . Manipulating a Text File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Placing Shortcuts in Subfolders . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a Connection Between a Database Client and Oracle Server Manipulating Strings and Performing Calculations Performing Calculations on Integer Values . . . Parsing Strings Using Expression Operators . . Putting User Input into Variables . . . . . . . . . Error Checking User Input . . . . . . . . . . . . . . Converting a String to Upper- or Lowercase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 . 395 . 395 . 396 . 396 . 396 . 396 . 396 . 397 . 397 . 398 . 398 . 398 . 399 . 399 . 399 . 400 . 400 . 400 . 402 . 403 . 403 . 404 . 405 . 406

Using Custom Dialog Examples . . . . . . . . . . . . . . . . . . . Prompting the User to Insert a Floppy Disk . . . . . . . . Configuring a Dialog to Handle Mouse Events . . . . . . . Enabling, Disabling, and Marking Controls in a Dialog . Displaying a License Agreement Dialog . . . . . . . . . . . Making an Installer Open Automatically (AutoPlay) . . . Showing or Skipping Dialogs Based on End User Input Building a Components-Based Installation . . . . . . . . . Showing the Details of Optional Features to Users . . .

CONTENTS

Letting the User Choose Subcomponents During Installation . . . . . . . . . 406 Verifying User Input in a Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 Performing Web and FTP Transactions . . . . . . Checking an FTP Site for Newer Files. . . . . Downloading a File from a Web Site During Launching a Web Page from an Installer . . Using WebDeploy Through a Proxy Server . ......... ......... Installation . ......... ......... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 . 408 . 408 . 408 . 409 . 410 . 410 . 410 . 410 . 411 . 411 . 411 . 411 . 412 . 412

Using Sample Scripts that Call .DLLs . . . . . . . . . . . . . . Branching a Script Based on the .DLL Return Value. . Killing an Application Using Windows .DLL Calls . . . . Using .DLL Calls to Determine System Configuration .

Checking System Configuration With Sample Scripts . . . . Checking for 256 Color Display . . . . . . . . . . . . . . . . . Determining the Destination Computers Color Palette. Checking Disk Space by Calling a Windows .DLL . . . . . Detecting the Presence of Internet Explorer . . . . . . . . Detecting QuickTime Version . . . . . . . . . . . . . . . . . .

11 Troubleshooting Installations . . . . . . . . . . . . . . . . 413


Using the Installation Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 File Replacement Problems in System32 . . . . . . . . . . . . . . . . . . . . . . . . . . 415

12 Quick Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 417


Standard Variables. . . . . . . . . . . Automatic Compiler Variables. Automatic Runtime Variables . Runtime Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 . 418 . 419 . 422

Expression Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 Windows Language Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 Command Line Options. . . . . . . . . . . . . . . Wise Installation System (Wise32.EXE) . WiseScript Installations (Setup.EXE) . . . Uninstall (Unwise.EXE, Unwise32.EXE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 . 428 . 429 . 429

13 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431

10

Chapter 1

Welcome
Congratulations on selecting the Wise Installation System! Youve chosen a powerful, easy-to-use, rapid development environment for creating Windows-based installation packages. With Wise Installation Systems Installation Expert, you can point-and-click your way to an installation script quickly, without any programming knowledge or skill. In Installation Expert, you specify common installation tasks by filling out dialogs, not by writing code. Wise Installation System uses the installation options you define and generates the script that is run when an end user installs your product. For advanced customization, you can edit the generated installation script in Wise Installation Systems scripting environment, called Script Editor. The Wise scripting language, WiseScript, is powerful, yet easy to learn. With Script Editor, you create and edit lines in the script by setting options in dialogs, which decreases the chances of syntax or other errors. You can call .DLLs and .EXEs during installation, edit the registry, update .INI files, configure ODBC drivers and data sources, and more. Changes you make in Installation Expert are automatically reflected in Script Editor, and vice versa. Topics in this section cover: Documentation Roadmap. Using Online Help (including context-sensitive help). Getting Help and Product Support. Getting Updates Over the Web. Downloading Application Runtimes Over the Web.

11

1: WELCOME

Documentation Roadmap
The Wise Installation System Reference Manual, the online help, and the Getting Started Guide assume that you are proficient in the use of the Windows operating system. If you need help using the operating system, consult its user documentation. The Wise Installation System often provides multiple ways to accomplish a task. In some cases, you can use the main menu, the right-click menu, or a toolbar, or you can press a key combination for a certain task, but instructions in this documentation generally include only the most convenient method. If you are most comfortable with a particular method, check the right-click menu, the main menu, and the toolbar to learn the different options available to you. The following sources of information help you learn the Wise Installation System. Reference Manual. The reference manual is available from the Help menu; select Online Reference. It contains detailed technical information and step-by-step instructions for performing common tasks. It is also available from Wise Solutions as a printed manual for a fee. Contact Wise Solutions Sales at 1-800-554-8565 or 734-456-2100 (international). Online Help. All the material in the reference manual is also available in the online help system. To access the contents, index, and search functions, select Help Topics from the Help menu. To access contextsensitive help, press the F1 key from any place in the product, and you will see help that describes the part of the product that you are in. Also see Using Online Help on page 13. Getting Started Guide. The printed Getting Started Guide contains system requirements, installation instructions, and a walkthrough. You can also access a .PDF copy of the Getting Started Guide from the Help menu. Release Notes. You can access a product release notes document, in .HTM format, by selecting Release Notes from the Help menu. The release notes document covers new features, enhancements, bug fixes, and known issues for the current version. It also contains links to release notes for other versions of the product.

12

GETTING HELP AND PRODUCT SUPPORT

Getting Help and Product Support


Wise Solutions offers many resources to help you use our products. You can search the product help or reference manual .PDF for answers, or you can use one of the many support resources available to you as a Wise Solutions customer.

Using Online Help


Press the F1 key to display a help window for the active page or dialog. You can get help on most windows and dialogs in the Wise Installation System. Select Help Topics from the Help menu to see all the information in the reference manual presented on-screen. Select other commands from the Help menu to view information on using help, to view the .PDF-format reference manual or Getting Started Guide, to view resources on the Web, or to upgrade to the latest point release. If you need help and cannot find the answer in this manual or the online help, read about our technical support options in Getting Support at Our Web Site and Asking Our Support Team.

Getting Support at Our Web Site


To help you get the most out of our products, we offer world-class professional services that include technical support, training, consulting, and Web-based resources. Just visit our support page at www.wise.com/ support.asp. Our support page contains a variety of resources such as a searchable Knowledgebase, Newsgroups, and technical support options, as well as a place for you to submit feature or enhancement requests. Check Our Knowledgebase Access the Knowledgebase by visiting www.wise.com/knowbase.asp or by clicking the Knowledgebase link on our Web sites support page. The searchable Knowledgebase contains how-to procedures, answers to common support questions, and workarounds. It also contains highly technical material on a variety of subjects. Visit Our Newsgroups Visit Wise Newsgroups by visiting www.wise.com/newsgroups.asp or by clicking the Newsgroups link on our Web sites support page. Newsgroup postings by fellow developers contain answers, tips, analysis, and other comments. Contribute your own expertise to help others.

13

1: WELCOME

Subscribe to TechInfo TechInfo is a free monthly technical newsletter that contains technical tips, product updates, and other important technical information. To subscribe to TechInfo or to read back issues, visit www.wise.com/techinfo.asp or click the TechInfo link on our Web sites support page.

Asking Our Support Team


If you cant find an answer in our online resources, Wise Solutions offers flexible options to meet your support needs. For additional details about our support services, visit our Web site at www.wise.com/support.asp or call 1-734-456-2600 to talk with a technical support representative. Before you contact technical support, make sure you have the following information: Serial number and product version, which you can find by selecting About... from the Help menu. Operating system version and service pack version if applicable. A description of what you do before the problem occurs. The exact wording of any error messages you see. Your name, company name, and how to contact you. Payment information, if applicable.

14

GETTING UPDATES OVER THE WEB

Getting Updates Over the Web


The Check for Updates command on the Help menu provides an easy way to get the latest version of your Wise product using your active Internet connection. Minor point releases (x.01, x.02, and so on) are generally free, while major number releases generally incur an upgrade fee. Point releases generally contain maintenance updates such as bug fixes and minor feature additions. To check for updates: 1. Connect to the Internet. 2. In your Wise product, select Check for Updates from the Help menu. You are connected to the Product Updates page of the Wise Solutions Web site. If you have not registered this product, follow the screen prompts to register. After you complete the registration, go to the Support page, click the link to the Download Center, and click the link to the Updates page. If you have registered this product, you are connected to the Updates page. 3. Follow the instructions on the Web page to download the appropriate update. Note:
Your Wise product can remind you to check for updates. In the Preferences dialog, select an option in the Check for Updates drop-down list. This sets the frequency at which you want to be reminded to check for updates.

15

1: WELCOME

Downloading Application Runtimes Over the Web


The Download Runtimes Wizard provides an easy way to get runtime files or runtime installations that you plan to deploy with your application. You can also use this wizard to download updates to runtimes you currently have. The runtime versions are free, and you can download as few or as many as you need. To download runtimes: 1. Make sure you are connected to the Internet. 2. Select Download Runtimes from the Help menu. The Download Runtimes Wizard dialog appears.

3. Click the Advanced button to set proxy server and reminder options. The Advanced Settings dialog appears.

16

DOWNLOADING APPLICATION RUNTIMES OVER THE WEB

4. In the Advanced Settings dialog, set the following if you need to go through a firewall or proxy server to get to the Internet: mark the Specify proxy server information radio button, then specify the host name, port number and proxy type of your proxy server. Check with your network administrator for help with these options. When you finish in the Advanced Settings dialog, click OK. 5. Click Next in the Download Runtimes Wizard dialog. The Select Runtime to Update dialog appears. This lists the runtimes you currently have installed, and lists all the runtimes that are available for downloading. 6. In the Select Runtime to Update dialog, mark the checkbox for each runtime you want to download. You can click the Select All button to select all the runtimes, or click the Clear All button to clear your selections. As you mark checkboxes, the Download Size field displays the total size of the files you selected. When you finish in the Select Runtime to Update dialog, click Next. The Start Update Download dialog appears. 7. To proceed with the download, click Next in the Start Update Download dialog. The Download Runtimes wizard downloads the selected runtime updates from the Internet and installs each update in the appropriate Wise runtime directory. When the download is finished, the Update Complete dialog appears. Click Finish to close the dialog.

17

1: WELCOME

18

Chapter 2

Wise Installation System Basics


Before you create an installation, you should be familiar with how to create and maintain an installation. This section discusses the process of creating and maintaining installations, including: Wise Installation System Views. Navigating Between Views. What information you should gather Before You Start. Getting Started with creating installations. Managing Installations and source file paths. Customizing Your Development Environment. Distributing Your Installation. For a step-by-step walkthrough of the creation of a typical installation, refer to the Getting Started Guide.

19

2: WISE INSTALLATION SYSTEM BASICS

Wise Installation System Views


The Wise Installation System has two major views, each of which provides you with different development environments. Installation Expert view lets you build an installation by pointing and clicking to fill out options. Script Editor view offers WiseScript, an easy-to-learn scripting language you can use to develop more complex installations. It is important to understand that Installation Expert and Script Editor are interrelated. As you build an installation using Installation Expert, a script is actually being built for you in Script Editor. For instance, when you add a new file to the installation using Installation Expert, a line appears in your script with installation instructions for that file. When an end user runs your installer, it is the script that copies files, makes system changes, and so on. In addition to the two major views, the Tools menu offers specialized tools with which you can jump start an installation script. For instance, with SetupCapture, you can repackage an existing installation to provide the basis of a new WiseScript installation. Custom Dialog Editor, accessible in Script Editor or from the Dialogs page, lets you create and edit dialogs. Custom Billboard Editor, accessible only from Script Editor, lets you create and edit billboards, which are graphics that display in the background while files are being installed on the destination computer. Professional Edition only
SetupCapture is available only in Professional Edition.

20

NAVIGATING BETWEEN VIEWS

Navigating Between Views


When you first open the Wise Installation System, it opens to Installation Expert view by default. To navigate between Installation Expert and Script Editor, click the navigation buttons at the bottom of the window.

Sometimes when you navigate from Script Editor to Installation Expert, you see an alert message telling you that this installation has custom script code, which is incompatible with Installation Expert. You see this alert message if you create a custom script from scratch in Script Editor, then attempt to switch to Installation Expert. You see a similar message if you open a custom script while in Installation Expert view. If you see an error message that mentions incompatibility with Installation Expert, click No to preserve the custom script. Some error messages you might see are: This installation has custom script code, which is incompatible with Installation Expert. Click Yes to delete your custom code, or No to preserve it. If you click No, you have access to a limited set of pages in Installation Expert. You are attempting to open an installation in Installation Expert, which is not compatible with some custom scripts, so the script will be opened in Script Editor instead. To safely view Installation Expert without converting your script, select Installation Properties from the Edit menu while in Script Editor, or press CTRL-Z. This takes you to Installation Expert, but only shows you pages that do not affect the installation script. The navigation bar includes buttons for Compile, Test, Run, and Distribute functions. You can use the first three buttons, Compile, Test, and Run, to help test and debug your installation. When your installation is finished, use the Distribute button to move your installation to the network, an FTP server, or floppy disks. Compile, Test, and Run are described in Compiling, Testing, and Running Your Installation on page 28. Distribute is described in Distributing Your Installation on page 46.

21

2: WISE INSTALLATION SYSTEM BASICS

Before You Start


To avoid frustration later in the installation development cycle, assemble all the information you need before you begin building your installation. Having this information on hand lets you focus on the actual installation process, instead of constantly having to gather more information. Heres the kind of information you might need. All the files youll be installing on the destination computer, including program files, files necessary for optional features, related .DLLs, drivers, and other support files. Youll need any third-party installations, for example, the Adobe Acrobat installation, that your installation will provide. If your product consists of a large number of files, it is a good idea to maintain a list of them along with their locations. A list of which files comprise which components. If your installer will let end users choose optional components, such as spell checker, youll have to organize files into components when you build the installation. A list of the changes that must be made to system information files .INI files, the registry, and so forthfor your software to run properly. A list of the softwares system requirements, in as much detail as possible. Consider not just memory and disk requirements, but also the minimum screen depth and resolution, and the minimum required version of the operating system. A list of the differences between the way the software should be installed on the various versions of Windows. A specification for how the software will be distributed. Determine if it will be distributed on floppy disks, on CD-ROM, over the Internet, or in some other way. Any custom graphicscalled billboards in the Wise Installation System you want to display during the installation. Any changes you want to make to the dialogs to be displayed during installation. See Dialogs on page 70 for a list of dialogs. A Readme file and copy of the license agreement that applies to the software being installed. A list of any unusual installation requirements that might require customized scripting in Script Editor. It might be difficult to make this determination until youre more familiar with the Wise Installation Systems capabilities.

22

GETTING STARTED

Getting Started
After you review the various parts of the Wise Installation System and gather the information you need to start, youre ready to build your installation. This section provides a broad outline of steps you might take to build and distribute your first installation. It also shows you how to create, open, save, close, test, and compile installations.

Steps for Building Your First Installation


To build your first installation, follow the general outline of steps below. You can find details on each step in other parts of documentation. 1. Read Before You Start on page 22 and gather all the information youll need for your installation. 2. Create a new installation as described in Creating a New Installation on page 24. 3. To set up basic installation functionality, click through each page in Installation Expert and set the options you want. See Using Installation Expert on page 26 to learn how to configure pages. For details of each page, see Installation Expert Pages on page 53. 4. To set up advanced installation functionality, go to Script Editor and edit your script by adding actions. See Script Editor on page 139 for details on Script Editor. See WiseScript Actions on page 173 for descriptions of script actions. 5. To customize dialogs, create dialog sets, and add interactivity to dialogs, see Creating Custom Dialogs on page 293. 6. To test and debug your installation, use the Compile, Test, and Run buttons in the lower right corner of the window, or use the debugging features described in Debugging Scripts on page 162. 7. To get your installation ready for distribution, explore all the options available to you for outputting your installer .EXE file. On the Media page, the WebDeploy page, the WiseUpdate page, and the CAB Files page, you can: Specify settings for a particular type and size of media, described in Media on page 87. Specify options for deploying your installer over the Web, described in WebDeploy on page 117.

23

2: WISE INSTALLATION SYSTEM BASICS

Specify whether or not to include WiseUpdate, described in Using WiseUpdate on page 373 Set archive options, described in CAB Files on page 64. 8. When you feel that your installation is ready to go to customers, you have two choices: If you simply want a single installation .EXE file, click the Compile button. The .EXE file is generated with the same name and location as the installation (.WSE) file. If you want the Wise Installation System to automatically output your installer for removable media, a network directory, or an FTP server, run the Distribution Wizard, described in Distributing Your Installation on page 46.

Creating a New Installation


Follow the steps below to open the Wise Installation System and to create your first installation project file. When you create a new installation, you can choose what kind of installation you want to create. You can choose to start with an installation template, which already has the basics of an installation configured for you. If you are comfortable writing scripts using the Wise scripting language (WiseScript), you can start with a blank script and build your installation entirely in Script Editor by adding script actions. You can also start with SetupCapture, ApplicationWatch, or Import Visual Basic Project, three tools available from the Tools menu. To create a new installation based on a tool, select a tool icon in the New Installation File dialog. See Tools on page 349. To start a new installation: 1. From the Windows Start menu, select Programs -> Wise Solutions -> Wise Installation System. The Wise Installation System launches. 2. From the File menu, select New. The New Installation File dialog appears.

24

GETTING STARTED

3. Select the Empty Project icon. The Empty Project icon lets you create a project file with a predefined script, which has most of the elements of an installation already scripted for you. Project files do not store the files you add to an installation; they store the paths to the files instead, so if you move files, be aware that the pathnames will break. See Changing Source Directories on page 29 for information on how to fix broken pathnames. Note:
The Blank Script icon creates a blank script, which you can code from scratch. If you select Blank Script to create a new empty script, you cannot see all pages in Installation Expert; see Navigating Between Views on page 21.

4. Click OK. The installation opens, and you can begin editing it by filling out the pages in Installation Expert or by adding script actions in Script Editor.

25

2: WISE INSTALLATION SYSTEM BASICS

Using Installation Expert


To display Installation Expert, click the Installation Expert button at the bottom of the Wise Installation System main window. Each page of Installation Expert lets you determine a specific aspect of your installation. For example, on the Files page, you determine what files are included in your installation, and on the Registry page, you determine what registry keys and values are created on the destination computer. To see help for a page, press the F1 key while the page is displayed. Installation Expert Pages are organized into logical groups, listed in the order in which youll usually fill them out. However, you do not have to work with the pages in this particular order, and you do not need to fill out every available page. Instead, you can fill out just the pages that are pertinent to your particular installation, in any order. You can create your own customized view of page groups and pages as described in Customizing Installation Expert Page Groups on page 39. Use the arrows ( ) in the toolbar to navigate from page to page, or just click the page name along the left side of the window. To expand or collapse a page group, click its name. To return a page to its last saved state, select Reset Page from the Edit menu.

Page groups with pages. Click the group name to hide or view the page names. Click the page name to go to the page.

Page area. As you click different page names, this area changes to display the pages options.

Navigation. Click these buttons to change views.

Testing and distribution. Compile, Test, and Run let you compile and test your installation. The Distribute button copies the installation package to removable disks, an FTP server, or a network directory.

26

GETTING STARTED

Using Script Editor


As you specify settings in Installation Expert, the Wise Installation System automatically generates a WiseScript with the exact steps to be performed by the installation. While Installation Expert is powerful, it might not provide every function you need in your installation. When this happens, you can simply switch to Script Editor and add WiseScript instructions to perform the required task. Installation Expert and Script Editor are simply different views of the same installation, each providing you with a different development environment. You can use Script Editor to tweak the installation you built in Installation Expert, or you can use it to build an entire installation from scratch. Script Editor can even be used to build a simple utility program. It is also useful for troubleshooting your installations using built-in debugging tools like breakpoints and single-stepping. A set of tabs at the bottom of the script shows include scripts referenced by the installation script, letting you quickly switch between scripts.

Toolbar. Title, Event, and Language dropdown lists.

List of available script actions. To insert an action, doubleclick it, or place your cursor in the script and type its name.

Installation Script. Contains all the commands to be executed when you run your installer.

Standard tab shows all actions. Set the Custom tab to show only those actions you use frequently.

Include script tabs. Click tabs to switch between scripts.

Navigation. Click these buttons to change views.

Testing and distribution. These buttons let you test and compile your installation, as well as prepare it for distribution.

You add script lines by adding a WiseScript action, then choosing options for the action in a dialog. Because the script is displayed in English-like terminology, you can easily read and interpret it to help with testing and troubleshooting. Script Editor is described in more detail in Script Editor on page 139, and each script action is described in WiseScript Actions on page 173.

27

2: WISE INSTALLATION SYSTEM BASICS

Also see: The Script Editor Window Customizing the List of Actions Choosing a Script to Edit

Compiling, Testing, and Running Your Installation


Once you have created or modified an installation, you are ready to test it. You can do this by using the Compile, Test and Run buttons on the navigation bar at the bottom of the main window. You can compile your installation, which creates the installer .EXE file, you can run the installer, or you can test the installer, which appears to run but does not make any modifications on your system. Note:
You can also use Script Editors debugging functions to test your script. See Debugging Scripts on page 162.

Click the Compile button to build a single executable file that contains the installation script as well as all the files needed for your installation. This is the installer .EXE that you distribute to end users. If any files are absent or not readable, the compilation process displays error messages. Your installation is saved automatically each time you compile unless you set the Prompt to Save option in Preferences; see Setting Preferences on page 43. Click the Test button to perform a compile and run your installation in test mode. In test mode, the installation performs all necessary tasks without actually installing or modifying files. However, if there are any script lines that are dependent on files being installed by previous script lines, then test mode might fail. For instance, if an Install File(s) line copies a ReadMe to the Temp directory and a second script line attempts to launch that ReadMe, the second script line fails because the ReadMe is not really in the Temp directory. Click the Run button to execute your installation. The entire installation is executed just as it would be on the destination computer. This means that files are installed on your computer and your system is modified.

28

MANAGING INSTALLATIONS

Managing Installations
After you create new installations, you can use Wise Installation Systems management tools to help you maintain them. Use the Source Directories menu command to manipulate directories from which files are pulled. To change the directories where source files are located, see Changing Source Directories on page 29. To change the format of pathnames, see Converting to Relative Source File Paths on page 32 and Converting to UNC-Based Source File Paths on page 30. If you are using the Professional Edition, you can take advantage of application repair and self-repair functionality. Self-repair enables your application to initiate repair of itself when its launched if key files or registry entries are missing. Repair is available as an option in the uninstall wizard for installations created with the Professional Edition. See Using Self-Repair on page 34.

Changing Source Directories


During the course of creating an installation, you might change the directory structure on your machine, which can cause the paths to source files to become invalid. This can happen in several instances: if you move files that are part of the installation to a new directory on your computer or network; if you move the installation file itself from your computer to another computer; if you use relative pathnames and move the installation (.WSE) file. In any case, the paths to files listed on the Files page become invalid. If the paths are invalid, you see messages during compile that files could not be opened. Rather than re-adding the files from their new location, you can simply specify new source directories for the files to reflect their new locations. To specify new locations for files: 1. Select Source Directories from the Edit menu. The Change Source Directories dialog appears with a list of all the directories you have referenced in your installation.

29

2: WISE INSTALLATION SYSTEM BASICS

2. Click a directory in the list. It appears in the New Pathname field. 3. Edit the path so it points to the new location of the files. As you edit, the new path appears to the right of the original path in the list box; use the scroll bar to view it. If you have simply moved the entire directory tree containing your installation files to another location, you might only need to edit the root directory entry to change all the references. 4. Mark the Change Sub-Directories checkbox if you also want to update the paths of all the files in the sub-directories of all the directories youre changing. 5. Click OK when youve edited all the directories you want to change. All parts of the installation that reference these directories are automatically updated.

Converting to UNC-Based Source File Paths


You can convert the paths of source files to UNC-based (Uniform Naming Convention) paths. If you keep all the installation source files on a central file server, this feature helps you by converting mapped drive paths to standard UNC-based paths.

30

MANAGING INSTALLATIONS

For instance, if you have your Y:\ drive mapped to a file server, and you add files to your installation from your Y:\ drive, the paths in Script Editor appear starting with Y:\. If a co-worker opens and compiles your script on another computer that doesnt have its Y:\ drive mapped to the same file server, the compilation fails because the script cannot find the source files on the Y:\ drive. However, if you first convert all network paths to UNCbased paths, co-workers on the same network can open and compile your script without encountering errors. To change the source file paths listed in Script Editor to UNC-based paths: 1. Select Source Directories from the Edit menu. The Change Source Directories dialog appears with a list of all the directories you have referenced in your installation.

2. Select Change source paths to UNC paths from the Type drop-down list and click OK. An alert message appears informing you that existing source paths will be converted to UNC-based pathnames. 3. Click Yes in the alert message.

31

2: WISE INSTALLATION SYSTEM BASICS

Converting paths to UNC-based paths does a one-time conversion of all the network paths in your script. Paths to files that are located on local drives are not converted. If you leave the conversion option set to Change source paths to UNC paths, all network files you add subsequently are converted to UNC-based paths. If you change the conversion option back to Do not modify source paths, the converted pathnames stay converted, but new files you add do not have UNC-based paths.

Converting to Relative Source File Paths


You can convert the paths of source files to relative paths. You might do this if you want to keep all your source files in a central version and source control system, such as Microsoft Visual SourceSafe. In Microsoft Visual SourceSafe, if you copy your installation files to a different directory each time you perform a Get, you can use this feature to ensure that the paths are always valid, even though the directory structure changes. A relative pathname uses a period and a backslash (.\) in the path to indicate the current directory, and it uses two periods and a backslash (..\) to indicate one directory up. All paths are relative to where the installation (.WSE) file is located. To change the source file paths listed in Script Editor to relative paths: 1. Select Source Directories from the Edit menu. The Change Source Directories dialog appears with a list of all the directories you have referenced in your installation.

32

MANAGING INSTALLATIONS

2. Select Change source paths to relative paths from the Type dropdown list and click OK. An alert message appears informing you that existing source paths will be converted to relative pathnames. 3. Click Yes in the alert message. Converting paths to relative paths does a one-time conversion of all the relative paths in your script. Paths to files that are not on the same drive as the installation file are not converted, because if they are on another drive, they cannot be written as relative paths. If you leave the conversion option set to Change source paths to relative paths, all files you add subsequently are converted to relative paths. If you change the conversion option back to Do not modify source paths, the converted pathnames stay converted, but new files you add do not have relative paths.

33

2: WISE INSTALLATION SYSTEM BASICS

Using Self-Repair
Professional Edition Only
Application self-repair and repair are available only in the Professional Edition.

The Wise Installation System contains functionality that enables an application to repair itself. There are two main ways you can implement repair. One way is passive, and is automatically included in any installation you create. The other way is proactive, and requires you to define files and registry entries that are crucial to your application, the absence of which initiates a self-repair process during launch of your application. The files and registry entries are only checked, however, if the application is launched via its shortcut. Both self-repair and uninstall can only be run under the same user account under which the application was originally installed. In other words, if the administrator account is logged on during installation, the administrator account must also be logged on during uninstall or repair.

Application Repair Initiated by the End User


Professional Edition Only
Application self-repair and repair are available only in the Professional Edition.

Installations you create in the Professional Edition contain a repair option, which is available for the end user to use. You dont need to set any options to include repair capabilityit is added to the uninstall wizard for installations created with Professional Edition. However, it must be initiated by the end user. The end user simply chooses your application in the Add/Remove Programs Control Panel. One of the three options that appears in the uninstall wizard is Repair. If the end user chooses the Repair option, a reinstall is performed. If the installer determines that files need to be reinstalled, the end user is prompted for the installation media from which the application was originally installed or prompted to connect to a network location if the application was installed from the network. The installation re-edits the registry, re-edits or recreates .INI files, reinstalls all files, and re-selfregisters files. Self-repair works only if the destination computer is running a Win32 operating system.

34

MANAGING INSTALLATIONS

Automatic Self-Repair
Professional Edition Only
Application self-repair and repair are available only in the Professional Edition.

You can add automatic self-repair to any installation you create with the Professional Edition. To do so, you must explicitly configure your installation for self-repair. The advantage of this method is that it does not rely on the end user to initiate self-repair. Each time the end user launches your application via its shortcut, files and registry entries that you specify are checked. If they are missing, the end user is automatically prompted to repair the application. If files need to be reinstalled, the end user is prompted for the installation media from which the application was originally installed or prompted to connect to a network location if the installation was installed from the network. The installation re-edits the registry, re-edits or recreates .INI files, reinstalls all files, and re-selfregisters files. Self-repair works only if the destination computer is running a Win32 operating system. Technical Note:
You first mark the files and registry values that you want checked. Then you create a shortcut that launches your application, and you turn on self-repair for the shortcut. When the application is installed, the list of required items is put into a special registry key. When the end user launches the shortcut that runs your application, the shortcut actually runs unwise.exe (the uninstall program) with special command line options. Unwise.exe checks that the required items are present. If they are, unwise.exe then opens the application. The end user sees none of this, and if the number of required items is few, then the extra time to launch is negligible. If the required items are not present, then unwise.exe displays a message that the application is damaged, and asks whether to repair it, run it anyway, or stop checking it on launch.

To configure your application for self-repair: 1. First determine files and registry entries that are crucial for your application to run correctly. During your applications launch, all of these files and registry keys are checked, so limit the number of items to check to ensure your applications launch time doesnt increase. 2. In the details dialogs for each of these key files and registry entries, mark a checkbox that flags the item for self-repair. For a file, double-click the file on the Files page or double-click the Install File(s) script line that references the file. In the dialog that

35

2: WISE INSTALLATION SYSTEM BASICS

appears, mark the Repair application if this file is missing checkbox. For a registry entry, double-click the value in the lower right list box on the Registry page and mark the Repair application if this registry value is missing checkbox in the dialog that appears. In Script Editor, multiple registry values are contained in one Edit Registry script line. Double-click the Edit Registry script line, navigate to the required registry value and select it, then mark the Repair application if this file is missing checkbox. 3. Create a shortcut that runs your application, either on the Shortcuts page in Installation Expert or with the Create Shortcut script action in Script Editor. While filling out the Shortcut Details dialog, mark the Check self-repair items when this shortcut is opened checkbox. See Shortcuts on page 105 or Create Shortcut on page 215.

36

CUSTOMIZING YOUR DEVELOPMENT ENVIRONMENT

Customizing Your Development Environment


You can customize your development environment so that it fits the way you work. You can create your own installation templates so that each time you create a new installation, options you set frequently are already preconfigured for you. If you only use certain page groups in Installation Expert, you can change the page groups by either selecting a pre-defined view of page groups or creating your own view. In Script Editor, you can set the actions list to display only those actions that you use most frequently, and you can even add your own actions to the list. If you want to change the dialogs that display in your installer, you can edit the default dialogs, which changes the dialogs for each subsequent installation you develop. See Editing Dialog Templates on page 297. Also, you can set preferences for Script Editor, the compiler, and the ApplicationWatch Wizard.

Creating and Editing Installation Templates


By default, when you create a new installation, Script Editor already contains a basic installation script. This default script is based on an installation template that is located in your Template directory within the Wise Installation System application directory. You can edit the default installation script, and can even create your own template files. For example, suppose that all the installations you ever build have the same screen appearance, the same system configuration requirements, and the same document file extensions. You can create a new template that has all those changes pre-configured for you. To do this, you create a new installation, make the necessary changes in Installation Expert to the File Associations page, the System Requirements page, and the Screen page, then save the installation (.WSE) file in your Template directory. Thereafter, each time that you create a new installation, the installation file you saved is available in the New Installation File dialog, which appears when you select New from the File menu. To create a custom installation template: 1. Select New from the File menu. The New Installation File dialog appears. 2. Select Empty Project and click OK. 3. Make all desired changes to the installation. For instance, to have a red background for each subsequent installation you create, go to the Screen page in Installation Expert, click the Top

37

2: WISE INSTALLATION SYSTEM BASICS

Color button, and change the color to red. This makes the background screen red while your installer .EXE runs. 4. When you are finished editing the basic installation so that if fits your needs, select Save As from the File menu. 5. Navigate to the Template directory within the Wise Installation System application directory, type a file name, and click Save. 6. To test your new template, select New from the File menu. The New Installation File dialog appears, and it contains the name of the file you just saved. Note:
If the New Installation File dialog does not contain the new template, check to make sure you saved the installation file (.WSE) to the Wise Installation System\Template directory.

7. Select the template you just created and click OK. 8. Check that the changes you made in the installation template file are present in this new installation file. If you changed the screen color, go to the Screen page and verify that the screen preview shows you the new color screen instead of the default blue screen. If you made other changes besides the red screen, those changes should be present also. Because Empty Project and Blank Script are simply .WSE files, you can edit them just like you would any other WiseScript installation. You cannot, however, edit templates for Import VB Project, ApplicationWatch, or SetupCapture, because they are not templates. To edit the Empty Project or Blank Script templates, first make a backup copy, then open Empty Project.wse or Blank Script.wse from the Template directory, edit it, and save it.

Showing Different Installation Expert Page Groups


By default, Installation Expert displays all page groups and all pages within each group. You can change the page groups that appear by selecting one of the two views from the Pages menu or by creating a customized view. To use one of the two standard sets of page groups, go to the Pages menu. These are the two choices: All displays all page groups and all pages within each group. Properties displays only those pages that do not directly affect your installation script. The pages show items that do not add or change

38

CUSTOMIZING YOUR DEVELOPMENT ENVIRONMENT

script lines in your script. This set of page groups appears automatically when you select Installation Properties from Script Editors Edit menu. If the sets of page groups on the Pages menu arent suitable for the type of installations you are doing, you can create your own sets. A customized set of page groups for the type of software package you create frequently lets you focus on the steps necessary to create an installation script for that type of application. This helps you standardize installations with a consistent look and feel. See Customizing Installation Expert Page Groups.

Customizing Installation Expert Page Groups


You can add your own sets of page groups to the Pages menu. Doing so lets you customize your work environment so that you see only the pages that you use most frequently. When you add a customized set of page groups, you specify how many page groups appear, what the group names are, and what pages appear under each group. Page groups are listed along the side of Installation Expert; they can be expanded or collapsed to show or hide the associated pages. Once youve added a set of page groups, you can edit it any time, adding or removing page groups and pages, or changing the order in which they appear. To edit a set of page groups, select Customize from the Pages menu. The Customize Pages dialog appears. Choose the set from the Name drop-down list. For details on the Customize Pages dialog, see the procedure below for adding a set of page groups. Note:
You can only edit those sets of page groups youve added. Also, you cannot change page names, only the names of sets of page groups.

39

2: WISE INSTALLATION SYSTEM BASICS

Buttons to edit page groups are disabled when All or Properties is selected from the Name drop-down list. Buttons to edit pages are disabled when All or Properties is selected from the Name drop-down list.

All pages in this list box appear under the expanded page group name. Defined page groups; your customized page groups appear here and along the left side of Installation Expert.

To add a set of page groups to the Pages menu: 1. From the Pages menu, select Customize. The Customize Pages dialog appears. 2. From the Name drop-down list, select <new>. 3. In the dialog that appears, type a name for your new set of page groups. Include an ampersand (&) before a letter if you want to be able to select your set from the Pages menu using the keyboard. 4. Click OK. The Customize Pages dialog returns, with your new set of page groups selected in the Name drop-down list. 5. To add a new page group, click the Add button on the left and enter a name for the page group in the Enter Name dialog that appears. The name appears in the Page Groups list on the left. 6. To add a page to a page group, do the following: Click the page group. Click the Add button on the right. The Select Pages to Add dialog appears.

40

CUSTOMIZING YOUR DEVELOPMENT ENVIRONMENT

Select the page or pages you want to add to the group. Use CTRLclick or SHIFT-click to add multiple pages. 7. Click OK. The Customize Pages dialog returns, showing the selected pages in the Page Names box on the right. 8. Add more page groups and pages as appropriate. 9. Click OK. Your new set of page groups appears under the Pages menu. The name of your set has an underlined letter for keyboard selection, if you indicated a letter by an ampersand when you named your set of page groups.

Changing Installer Messages


You can edit prompts and error messages displayed by your installation. To edit error messages that appear during installation, use the Installer Messages menu command. Installer Messages only lets you change prompts and error messages. (To change wording in non-English dialogs, choose the language from the Languages drop-down list under the toolbar before double-clicking the Custom Dialog statement.) Editing the installation messages modifies the wise.ini file, which is located in the system directory. If you want to back up the text strings, back up the wise.ini file before editing installer messages. (The Language directory, located in the Wise Installation System application directory, contains text for the uninstaller dialogs.) To edit the installation messages, choose Installer Messages from the Edit menu. The Installer Messages dialog appears.

41

2: WISE INSTALLATION SYSTEM BASICS

Language Name. The name of the language as it appears in the Wise Installation System. Translated Name. The name of the language as it will appear in installations you create. Language Code. A three-letter code that matches the Windowsdefined language to the Wise Installation System. See Windows Language Codes on page 426. Messages. In this list, select the message you want to edit. Message Text. Enter or edit the message here. Select Language Dialog. When end users run an installer that supports multiple languages, the first dialog that appears is a Select Language dialog, where they choose the language they want. You can specify the title of this dialog and the text that appears in it. Dialog Title. This is the title of the Select Language dialog. Dialog Text. This is the text that appears in the Select Language dialog. If your installer supports multiple languages, you should enter instructions in all supported languages here.

42

CUSTOMIZING YOUR DEVELOPMENT ENVIRONMENT

Setting Preferences
In Preferences, customize options for script development and compiling. Also specify .DLLs to ignore for ApplicationWatch and the Import Visual Basic Project tool. To access Preferences, select Preferences from the Edit menu.

Prompt to Save. Mark this checkbox to have Script Editor prompt you to save your installation script each time you build a new installer .EXE. If you do not mark this checkbox, the script is always saved automatically before compiling. Prompt for Changed Compiler Variables. Mark this checkbox if you want to receive a warning if the compiler variables _WISE_ or _ODBC32_ have changed from the last time the installation script was opened. For instance, if you develop an installation script where the Wise Installation System application directory is C:\Wise, the compiler variable _WISE_ is automatically set to C:\Wise. If you then open the same script on a different computer, where the application directory is

43

2: WISE INSTALLATION SYSTEM BASICS

C:\Program Files\Wise, then you are prompted to redefine the compiler variable _WISE_ to the new Wise Installation System application location. Compiler variables are set on the Compiler Variables page. Add Associated Icons and Registry Keys. If you mark this checkbox, then any time you add a file on the Files page in Installation Expert, icons and registry keys that are associated with that file are automatically added also. Append New Script Lines. If you mark this checkbox, when you add a new script action in Script Editor, it is inserted after the currently selected script line, rather than before. Listbox Compatible Mode. If your computer has certain video drivers, you might have problems selecting items from list boxes within the Wise Installation System. If items you choose from list boxes are continually misinterpreted, mark this checkbox to eliminate list box problems. Create Backup Copy During Save. Mark this checkbox if you want a new backup file created every time you save. The names of the backups are the current file name plus a number. For example, if the current file name is Widget.wse, the backups are Widget1.wse, Widget2.wse, and so on. Use caution with this option because a new file is created with every save you perform. Show Tabs for Wise Include Scripts. Mark this checkbox to show tabs for Wise Solutions include scripts in Script Editor. Color Selection. This drop-down list lets you choose the colors for the various types of script actions recognized by Script Editor. Choose the type of script action, then click Set Color to display a standard Windows color picker, where you can choose the color. Suppress Version Error. Mark this checkbox to allow the use of version checking when installing or copying files that do not have version resources. When a file is detected without a version resource, version checking is suppressed and no error dialog is displayed. Background Processing. Mark this checkbox to allow other applications to run during the compilation process. This slows the compilation by about 50%. If this checkbox is cleared, the computer ignores end user input during compilation. Smart Create. Mark this checkbox to automatically rebuild the installer .EXE whenever any file incorporated in the installation has been changed. If this option is marked, the time you wait after clicking the Run or Distribute button increases slightly because the compiler checks the modified dates and sizes of all files in your installation to determine if they have changed. Use this only for testing purposes. When you are ready to actually distribute your installation, you should clear this checkbox and recompile.

44

CUSTOMIZING YOUR DEVELOPMENT ENVIRONMENT

Fast Create. Mark this checkbox to speed the compilation process by copying the compressed version of a file from the previous version of the installer .EXE to the new one. If the size or date of a file has changed, it is re-compressed. Use this only for testing purposes. When you are ready to actually distribute your installation, you should clear this checkbox and recompile. Run in Manual Mode. Mark this checkbox to have the installer .EXE prompt you for the locations of all the directories to be used for installations (Windows, System, and so on) whenever the installer is run from within the Wise Installation System. Shared Directory. Normally, user-defined actions are stored in the Wise Installation Systems Actions directory. Use this field to specify an additional directory to hold user-defined actions. This can be a local or shared network directory. The actions stored in this directory appear in the Actions list in Script 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 run the ApplicationWatch or Import VB Project tools. Enter one file name on each line with no other delimiter. ApplicationWatch watches the system to see what files a given application accesses so that you can rebuild the installer for that application. This feature lets you specify files that should be ignored. For example, if you are watching a Visual Basic application, you might want to ignore VBRUN300.DLL because that file is accessed by Visual Basic applications, but is not necessarily installed with the Visual Basic application. Similarly, if you are importing a VB Project, files listed here are ignored during the import. Check for Updates. Select an option from this drop-down list to set the frequency at which you want to be reminded to check for updates to the Wise Installation System. Note:
Update reminders occur only when the Wise Installation System is running. If you do not use the Wise Installation System regularly, you might not be notified of updates on a timely basis.

45

2: WISE INSTALLATION SYSTEM BASICS

Distributing Your Installation


Use the Distribution Wizard to share or deploy an installation. With the Distribution Wizard, you can copy an installation to removable media, such as floppy disks, to the network, or to an FTP server.

Copying a Setup Program to Removable Media


You can use the Distribution Wizard to move your compiled setup program to floppy disks. You do this when you are ready to deploy your installation to end users. If it spans more than one floppy disk, you will be prompted for each disk. You cannot copy your compiled setup program to a rewritable CD. To copy it to a CD, use a CD creation program. To copy an .EXE onto removable media: 1. Click the Distribute button in the lower right of the window. A Welcome dialog appears.

2. From the Distribution Method drop-down list, select Removable Media. 3. Click Next. The Removable Media dialog appears.

46

DISTRIBUTING YOUR INSTALLATION

4. Fill out the following options: Destination Disk. Choose the letter of the drive to which files will be copied. Only removable-media drives connected to the computer are displayed. Disk Label. Enter a name for the finished disk. The disk that contains the installation will have this name. Setup Filename. Enter the name for your final installation file here. You do not need to enter an extension. If you leave this blank, the final installer file is named after the currently-open Wise Installation System file. Reserve Space. Enter the amount of space to reserve on the first floppy disk. You can use this space, for example, to add a ReadMe file at a later time. Floppy Disk Size. Select the appropriate size for your floppy disk, in KB, from the drop-down list or enter the size. Erase Disk Before File Copy. Mark this checkbox if you want to erase the target disk before copying the installation onto it. 5. Click Finish. The installation is compiled if necessary, and is copied to the disks. You are prompted to insert new disks as necessary.

47

2: WISE INSTALLATION SYSTEM BASICS

Copying a Compiled Setup Program to the Network


You can use the Distribution Wizard to move your compiled setup program to a network directory. You do this when you are ready to deploy your installation to end users. To copy an .EXE onto a network directory: 1. Click the Distribute button in the lower right of the window. A Welcome dialog appears.

2. From the Distribution Method drop-down list, select Network (.EXE). The Network Directory dialog appears.

48

DISTRIBUTING YOUR INSTALLATION

3. Click Next. The Network Directory dialog appears. 4. In the Network Directory field, specify the directory on the network where you want to move the file. 5. Click Finish. The installation is compiled if necessary, and is copied to the network directory you specified.

49

2: WISE INSTALLATION SYSTEM BASICS

Copying a Compiled Setup Program to an FTP Server


You can use the Distribution Wizard to move your installation to an FTP server. You do this when you are ready to deploy your installation to end users. If you choose a .WSE file, it is compiled into an .EXE, which is then copied to the FTP server. The Distribution Wizard uses the FTP protocol to transfer the installation files to the server location you specify. End users can download the files from the FTP server using an FTP client. If the server is also configured to run a Web server, end users can download the files through their Web browser (HTTP protocol) also. The Distribution Wizard does not support passive FTP, which is required by some firewall and gateway configurations. You cannot FTP through a proxy server from the Distribution Wizard. To copy an .EXE onto an FTP server: 1. Click the Distribute button in the lower right of the window. A Welcome dialog appears.

2. From the Distribution Method drop-down list, select FTP Server. 3. Click Next. The FTP Server dialog appears.

50

DISTRIBUTING YOUR INSTALLATION

4. Enter the following information about your FTP server: FTP Server Address. Enter the address of the FTP server to which you want to transfer the installation files. FTP Logon Name. Enter a valid logon name for this FTP server. This logon name must have write access to the directory where you want to transfer files. FTP Logon Password. Enter a valid password. FTP Upload Directory. Enter the directory on the FTP server where you want to transfer the installation files. The first character must be a forward slash (/). For example, /pub/installs. 5. Click Next. The installation is compiled if necessary, and is uploaded to the FTP server. A dialog shows the status of the upload. 6. Click Finish. If this option does not work as you expect, open an FTP client (Windows contains a default FTP client) and make sure all the information you entered in the Distribution Wizard works when you enter it directly into the FTP client.

51

2: WISE INSTALLATION SYSTEM BASICS

52

Chapter 3

Installation Expert Pages


This section describes each page in Installation Expert. Pages are arranged alphabetically for quick reference. For instructions on how to use Installation Expert, see Using Installation Expert on page 26.

Add/Remove Programs
Note:
The Add/Remove programs page applies only when the application is installed on the Windows 2000 or XP platform.

Windows 2000 and Windows XP have an Add/Remove programs control panel that supports a rich display of application information. The Add/ Remove Programs page lets you enter the information necessary to support these capabilities. Change/Remove Page. This information affects the options for the Change or Remove Programs page in the Add/Remove Programs control panel. Display Icon. The icon you choose here is displayed next to the application name in the Add/Remove Programs control panel. Click Browse to choose a file containing icons, then enter an icon number from that file. Click Browse to select an icon file thats part of the current installation. Icon Number. Enter the resource index for the icon in the selected .EXE or .DLL file.

53

3: INSTALLATION EXPERT PAGES

Technical Note:
An executable or icon file can have multiple icons contained within the file. To see the icons in a file, go to Windows Explorer, right-click any shortcut file, and select Properties. Click the Shortcut tab, then click the Change Icon button. The Change Icon dialog appears. It contains a graphical list of icons for the shortcut file you right-clicked. The icon number of the first icon is 0, the icon number for the second is 1, and so on. To see the icons in a different file, click Browse and choose a different file.

Hide Change/Remove button. Mark this checkbox to disable the Change and Remove buttons in the Add/Remove Programs control panel. If these buttons are disabled, the end user cannot remove this program using the control panel. The following information appears on the Support Information page of the Add/Remove Programs control panel. Publisher. Enter the name of the company that publishes the application. Contact Person. Enter the name of a particular person, such as a support technician, that end users can contact if they have questions. It can also be the name of a department where end users can get assistance with the program, such as ABC Technical Support. Phone Number. Enter the phone number for the contact person (or department) listed above. Online Support URL. Enter a URL where end users can get online support for your application. Software Version. Enter the version number of your application. Help URL. Enter the path to either a standard help file or an HTML help file installed on the destination computer. Comments. Enter any additional comments that might be helpful to end users.

Autoexec.bat
Use this page to specify commands that are to be added to the Autoexec.bat file of the destination computer during installation. Whenever changes are made to the Autoexec.bat file, the end user is prompted to restart the system after installation so the changes can take effect. Add Directory to Path. The fields in this section of the page determine how the PATH variable should be set to add a directory (from your installation) to it. You have the following options:

54

Directory to add to PATH. Enter the pathname of the directory to be added. To build your directory path, use one of the built-in Wise Installation System runtime variables, such as %MAINDIR% for the Application directory or %SYS% for the Windows System directory. See Compiler Variables vs. Runtime Variables on page 168. Location of new directory. Specify whether the installation should place the new directory at the beginning or at the end of the PATH variable. Path selection. Specify whether the installation should edit just the first PATH statement in the Autoexec.bat file or all path statements. Commands to add to AUTOEXEC.BAT. This section lists any commands you have added to the Autoexec.bat file. To enter a new command line to the Autoexec.bat file, click the Add button and enter the new line in the dialog. To remove an existing line, select it from the list and click the Delete button. Click the Details button to display the Add Command to Autoexec.bat dialog. Use this dialog to specify exactly how to edit the file. See Add Command to AUTOEXEC.BAT on page 55.

Add Command to AUTOEXEC.BAT


This dialog lets you specify how a line should be added to the Autoexec.bat file, either at a specific line number or by searching for specific text. To access the Add Command to AUTOEXEC.BAT dialog, select a command line on the Autoexec.bat page and click the Details button. See Autoexec.bat on page 54.

55

3: INSTALLATION EXPERT PAGES

Text to Insert. Enter the command line you want to add to the Autoexec.bat file. If your command line refers to a program file, use one of the built-in Wise Installation System runtime variables, such as %SYS% for the Windows System directory, to specify your directory path. See Compiler Variables vs. Runtime Variables on page 168. The PATH variable cannot be set when your command is executed, so always use a full pathname. Line Number. Enter the line at which the new line should be inserted. To append the command to the end of the file, enter 0. The Search for Existing Text panel in this dialog overrides any line number you enter here; the line number applies only when the text is not found or when you do not specify any text. Search for Text. Enter the text you wish to search for here. The installation scans the Autoexec.bat file looking for a line that begins with, ends with, or contains this text (depending on the setting of the Match Criteria field). If more than one line in the file matches, only the first is selected. Comment Text. Enter the text to insert at the beginning of the line when it has been found. Inserting REM (without the quote marks and with the trailing space) causes the line to be commented out and ignored during startup. This is useful when you are replacing an existing command with a new command and wish to leave the existing command in place, but inactive. In this case, you should always set the Insert Action field to cause your new command to be inserted before the

56

existing line so that a subsequent installation finds and edits the active command, not the commented-out line. Insert Action. Select the action to be taken when a line containing the specified text is found. You can either insert your new command before the existing line, replace the existing line with your new command, or insert your new line after the existing one. Match Criteria. Choose whether the line must begin with, contain, or end with the text entered in the Search for Text field. Ignore White Space. If this checkbox is marked, the search operation ignores spaces and tab characters. Case Sensitive. If this checkbox is marked, the search operation distinguishes between uppercase and lowercase text. Make Backup File. If this checkbox is marked, the installation makes a copy of the Autoexec.bat file before editing it. The backup is retained after installation so that the end user can undo any changes made to the Autoexec.bat file that cause problems.

BDE Runtime
Use this page to determine whether the Borland Database Engine (BDE) is installed, and if so, what associated drivers are added. The Wise Installation System supports BDE version 5.2.0.2 (English only), 5.1.0.4 (English only), and 5.0.1.22 (international versions). You can set the BDE configuration to a language other than English. To do so, add BDE on this page, then go to the Compiler Variables page and change the value of the compiler variable named _BDEWIN32LANG_ to the appropriate language number. The language numbers are predefined by Borland and are listed under the Language Number field in the section Configure BDE on page 206. Warning:
You can damage destination computers by installing the wrong version of runtime support files. Installing runtime files incorrectly can cause the end user's applications to stop running properly and can even disable the operating system. Before deploying any installations that install runtimes, get the latest runtime updates by running the Download Runtimes wizard from the Wise Installation System Help menu.

BDE Installation Type. Choose to install complete 16 or 32-bit BDE support, partial 32-bit BDE support, only BDE alias support for 16 or 32bit systems, or none at all. Depending on the option you choose, the corresponding checkbox options are enabled.

57

3: INSTALLATION EXPERT PAGES

Note:
Partial installations are not recommended.

BDE 32 Subsets. If you chose a partial 32-bit BDE installation, choose the functionality you wish to install. Additional Drivers. If you want to install other BDE drivers besides the dBase and Paradox drivers, select them here. BDE Aliases List To add a new BDE alias to the installation, click the Add button. This opens the BDE Alias Settings dialog. To edit an existing alias, select it from the list and click the Details button to open the BDE Alias Settings dialog. To remove an existing item from the installation, select the item in the list and click the Delete button. See BDE Alias Settings on page 58.

BDE Alias Settings


This dialog appears when you click the Details button on the BDE Runtime page; see BDE Runtime on page 57. Use this dialog to configure settings for Borland Database Engine aliases.

Alias Driver. Choose the driver that should be used with this database by default. Alias Name. Enter the name of the alias to be added as it appears to the end user.

58

Alias Pathname. Enter the path of the new alias. Server Name / User Name. This login information is required if you are using a SQL database. Alias Parameters. Enter parameters for the alias, one per line, in the format PARAMETER NAME: VALUE. For example:

ENABLE BCD: TRUE


Preserve existing alias information. Mark this checkbox to add a new alias only when an alias of the same name does not already exist on the destination computer.

Billboards
This page lets you select a series of billboard graphics that are displayed during installation. You can use these graphics to inform end users of software features, to remind them to register your application, or to advertise related products. Here are a few guidelines for using billboard graphics: Billboard graphics must be .BMP (bitmap) files. All color palettes are supported, up to true color. However, if you add large color images, the installation speed decreases. The destination computer must be set to display true colors in order for true color billboards to display correctly. If you simultaneously display multiple color images that use different color palettes, the colors might not appear correctly. The window area of this dialog lists the bitmaps that are selected to appear during the installation. The graphics appear in the order listed in the window, from top to bottom. To add a new billboard image to the list, click the Add button and select the image file from the Open dialog. To remove a billboard image from the list, select that image from the list and click the Delete button. To change the order of a billboard image in the list, select the image you want to move and click the Move Up or Move Down button (as appropriate). To edit the settings of a billboard image, select the image and click the Details button. This opens the Billboard Settings dialog, where you can change the position and display options for the image. See Billboard Settings on page 60.

59

3: INSTALLATION EXPERT PAGES

Billboard Settings
This dialog appears when you click the Details button on the Billboards page; see Billboards on page 59. Use this dialog to set the options for a billboard image.

Pathname. Enter the path to the image files you wish to display. Images are compiled into the installations .EXE file. X Position / Y Position. These fields indicate the location on the screen at which the specified image is positioned. Specify the coordinates based on a 640 x 480 screen; the graphic is placed proportionally on higher resolution screens. Erase Num. This field determines how many of the graphics currently being displayed should be erased before a new image is displayed. To display only one image at a time, enter 1. The oldest image is removed first. Build Effect. The options in this field determine the transition effect used to display the image. You can cause the graphic to fade in or to move onto the screen from any edge of the screen. Transparent. Mark this checkbox to have the pure blue (R=0, G=0, B=255) parts of your image become transparent. Center Horizontal. Mark this checkbox to center the image horizontally on the screen. Place at Right. Mark this checkbox to display the image at the right edge of the screen. Due to rounding errors inherent in the Windows Metafile format, this option might be slightly inaccurate when used with custom graphics that have been scaled to the screen.

60

Scale to Screen. Mark this checkbox to scale the image to take up the same proportion of the screen regardless of screen resolution. It displays at actual size on a 640 x 480 screen. Hide Progress Bar. Mark this checkbox to hide the progress indicator while the graphic is being displayed. A series of graphics can be used as a progress indicator in their own right. Center Vertical. Mark this checkbox to center the image vertically. Place at Bottom. Mark this checkbox to place the image at the bottom of the screen. Due to rounding errors inherent in the Windows Metafile format, this option might be slightly inaccurate when used with custom graphics that have been scaled to the screen. Tile Background. Mark this checkbox to repeat the graphic edge-toedge to fill the entire screen. Erase All. Mark this checkbox to remove all previous graphics from the screen before displaying a new one. Timed Display. Mark this checkbox to display a series of graphics at evenly-spaced intervals during installation. This is marked by default and should remain marked for the billboard feature to work correctly. Note:
If the billboards display too quickly during installation, mark the Slow Installation Speed checkbox on the Build Settings page.

Local Graphic. Normally, graphics are copied to the installations .EXE. Enter a pathname here (typically beginning with the %INST% variable substitution to specify the directory containing the installations .EXE) to indicate that the graphic to be displayed is in a separate file. This lets you change graphics without having to rebuild the .EXE.

61

3: INSTALLATION EXPERT PAGES

Build Settings
Use this page to specify options for compiling the installation. Maximum Compression. If this checkbox is marked, the installation file is made as small as possible. You should mark this checkbox before compiling an installation for distribution. However, be aware that it takes longer to compile an installation when maximum compression is enabled, so it is a good idea to disable it during development and while testing your installation. Slow Installation Speed. Mark this checkbox to slow down the installation on the destination computer. Usually, you only do this when you have a short installation and want to ensure that your billboard graphics are displayed. Use Internal 3D Effects. This checkbox causes the installation to display stylish 3D-style dialogs and controls, even if the destination computer does not have the CTL3D.DLL file. This option is applicable only when installing to a 16-bit Operating System. If you enter TrueWin32 in the Destination Platform field, then this option is automatically disabled and cannot be edited. No Reboot Message During Silent Installs. Normally, when the installation is run in silent mode, it displays a message that the system must be restarted after installation. If this checkbox is marked, however, the compiled installation does not display the warning message but reboots the system without warning. You can run an installation in silent mode by running it from the command line and adding a /s option. Create Windows Me System Restore Snapshots. If this checkbox is marked, the installation adds system snapshot entries to the Windows Millennium (Me) System Restore utility. This lets end users restore their system to the state it was in before your applications installation. The installation takes longer to perform when this checkbox is marked. Note that this works only if you enable it in the Windows Millennium operating system. Replace In-Use Files. If this checkbox is marked, the installation forces the replacement of in-use files by performing a reboot of the system. Otherwise, the end user is notified that installation cannot be completed and the installation aborts. Convert CD-ROM to Floppy. When creating a CD-ROM-based installation, you can use the Copy Local Files script action to copy files from the CD-ROM to the end users hard disk, rather than embedding these files in the installer .EXE. Mark this checkbox if you want to have these files included in the installer .EXE so the installation can be placed on floppy disk(s). (You can exempt individual Copy Local Files script

62

actions from conversion by marking their Dont Convert to Floppy checkbox.) For more information, see Copy Local File(s) on page 208. Beep on New Disk Prompt. Mark this checkbox to cause your compiled installation to beep when requesting a new disk. ZIP Compatible. Mark this checkbox to make your compiled installation compatible with the ZIP archive format. If you make your installation ZIP compatible, end users can extract files from it using any unzip utility, such as WinZip. They must open the installation by choosing Open from the File menu in the ZIP utility. Double-clicking the installation launches it normally. Network Installation. Mark this checkbox if you are creating a network installation and want to reduce network traffic. If this checkbox is marked, then a CRC (Cyclic Redundancy Check) is performed on existing files. If the file exists and is identical to the new installation file, the file is not copied down, reducing traffic. However, because CRC checks are time-intensive, this can slow down the installation on the target machine, so you might want to limit this option to installations that are performed without end user intervention. Destination Platforms. Specify the type of operating system for which you create your installation. Windows 3.1x, 95, and NT (Win16/Win32). Your installation can run under both Win16 and Win32 but is slower. Windows 95 and NT (True Win32). Your installation can run only under Win32 but is faster. For all Pathname fields, click Browse to simplify path and file selection. Installation .EXE Name. Specify a name and location where you want the executable file to be stored after it has been compiled. If you leave this field blank, the name of the installation executable defaults to the name of the installation file (*.WSE). Language .INI Name. If you want to use a language that is not built into the Wise Installation System, you can specify the path to an .INI file that contains translation resources. Setup Icon Pathname. Specify the path to the icon to be used for the installation .EXE file. Dialogs Directory. If you have created a directory containing customized versions of dialogs and dialog templates, specify the path to that directory here. Temp. Files Directory. Specify the path to a directory where the Wise Installation System can store temporary files while building your installation. If this directory is not specified, the Windows temporary directory is used.

63

3: INSTALLATION EXPERT PAGES

CAB Files
This page lets you place the installation files into a cabinet (.CAB) file for automatic download and installation from a Web page. For more information about .CAB files, go to the www.microsoft.com Web site and search for cabinet files and internet component download. To create a .CAB file, mark the Place Installation .EXE in .CAB File option. This activates the window area directly below so you can type or paste additional .INF file instructions for running the application. The Wise Installation System automatically generates a SETUP.INF file that contains the instructions that call the Microsoft CAB wizard and provides instructions about which files to copy to the .CAB files. The SETUP.INF file is part of the .CAB file, not in the directory structure.

Compiler Variables
Use this page to set compiler variables that change the compiled setup program. For instance, you could use a compiler variable to determine which files are included in the compiled .EXE file. Or you could use compiler variables to create either a Win16 or a Win32 version of your application. There are many other uses for compiler variables. For a step-by-step procedure that shows how to use compiler variables to build a debug version of your installation, see Building a Debug Version on page 164. To see a sample script that uses compiler variables, open the file COMPVAR.WSE from the Samples directory in the Wise Installation System application directory. To read about the sample script, see Creating an Installer That Can Be Customized During Compile on page 395. When you reference a compiler variable name in your script, you must surround the name with percent signs, for instance, %_DEBUG_%. See Variables and Expressions on page 167 for more information about using compiler variables. For automated build processes, you can specify compiler variable values from the command line, either by entering the value directly on the command line, or by storing the values in a text file; see Wise Installation System (Wise32.EXE) on page 428. To add a new compiler variable, click the Add button. To remove a variable, select it from the list and click the Delete button. To set the default value of the variable and enter other information about it, click the Properties button. This opens the Compiler Variable Settings dialog. Compiling from Command Line. Mark this checkbox to be prompted for the value of compiler variables when you compile an installation from the command line.

64

Compiling from Within Wise. Mark this checkbox to be prompted for the value of compiler variables when you compile an installation from the Wise Installation Systems user interface. If you mark this checkbox, then a Select Compile Settings dialog appears at compile time that lists this compiler variables values. One dialog appears for each compiler variable you define. Up to 10 values in the value list display as radio buttons, and over 10 display in a listbox. Value length is limited by the amount of text that displays on the dialog. The Do not prompt for value checkbox in the Compiler Variable Settings dialog overrides this setting. See Compiler Variable Settings on page 65.

Compiler Variable Settings


This dialog appears when you click the Add or Properties button on the Compiler Variables page; see Compiler Variables on page 64. Use it to set compiler variable properties.

Variable Name. Enter the name of the compiler variable. By convention, compiler variables begin and end with an underscore (_) character. Installation Expert does not enforce this convention; however, it is useful when reading scripts to be able to distinguish between compiler variables and regular script variables. Default Value. Enter the default value of the compiler variable if it is not changed at compile time. Description. Enter a brief description or explanation of how the variable is used. This information appears in the dialog where you are asked to choose a new value for the variable.

65

3: INSTALLATION EXPERT PAGES

Value List. For compiler variables that are displayed as a list, enter a list of allowable values, each on a separate line. Also see Building a Debug Version on page 164. Data Entry Type. Choose the method to be used to enter data for the compiler variable. Options include either a simple edit field in which the end user can enter text, an edit field with a Browse button for specifying directories, or a list of values that allows either single or multiple selections. Do not prompt for value. If this checkbox is marked, you are not prompted for the value of this variable when compiling an installation even if the Prompt for Compiler Variables checkbox is marked on the main Compiler Variables page. Mark this checkbox for variables you do not expect to change frequently.

Components
Use this page to add components to the installation. Components let you add optional pieces, such as a spell checker, a tutorial, sample files, and other such add-ons. When the installation is run, end users have the option to choose which components they want to include. To read about a script that demonstrates a component-based installation, see Letting the User Choose Subcomponents During Installation on page 406. The current set of components displays on this page in the same order that they are listed in the installation. Any component that is marked as being installed by default is automatically enabled in the component list during installation. (The end user can still deactivate any components checkbox.) Use the buttons to the right of the list to add, edit, delete, or rearrange the display order of the components. Details edits the selected component, letting you rename it and specify whether it should be installed by default. Add creates a new component, prompting you to enter a name and specify whether it should be installed by default. Delete removes the selected component from the list. Move Up and Move Down let you sort the list manually by moving the selected component up or down in the list, exchanging it with the component immediately above or below it. If you decide to use components in your installation, you must go to the Files page and assign the appropriate program files to each component.

66

Once created, the component is added to the Components drop-down list in Installation Expert. Selecting a particular component from this list indicates that the settings you make apply only to that component and are implemented only if that component is installed. Note:
When an end user selects one or more optional components to be installed, a letter corresponding to each component is placed in a variable called COMPONENTS. Selecting the first component places an A in the variable, the second adds a B, and so forth. You can add up to 26 components this way. You can edit the installation script and use conditional statements to determine which files are installed when each component is selected. See Letting the User Choose Subcomponents During Installation on page 406 to learn more about building a component-based installation.

Config.sys
Use this page to specify lines to be added to the Config.sys file on the destination computer during the installation. Whenever changes are made to the Config.sys file during an installation, the end user is prompted to restart the computer to initiate the changes. To add a line to the Config.sys file, click the Add button and enter the line in the Command Line field. To remove an existing line, select it from the list and click the Delete button. To enter details about how and where a line should be added to the Config.sys file, select the line and click the Details button. Configure the settings in the Add Command to Config.sys dialog. See Add Command to CONFIG.SYS on page 67.

Add Command to CONFIG.SYS


The Add Command to CONFIG.SYS dialog appears when you click the Details button on the Config.sys page; see Config.sys on page 67. It lets you specify how a line should be added to the Config.sys file, either at a specific line number or by searching for a specific piece of text.

67

3: INSTALLATION EXPERT PAGES

Text to Insert. Enter the command line you want to add to the Config.sys file. Use a full pathname built with variable substitution (such as %SYS% to specify the system directory) so your program runs regardless of how the end users computer is set up. Line Number. Enter the line at which the new line should be inserted. Enter zero to append the command to the end of the file. The Search for Existing Text section in this dialog overrides any line number specified here; the line number applies only when the text is not found or when you do not specify any text. Search for Text. Enter the text you want to search for. The installation scans the Config.sys file looking for a line that begins with, ends with, or contains the text (depending on the setting of the Match Criteria field). If more than one line in the file matches, only the first is selected. Comment Text. Enter the text to insert at the beginning of the line when it has been found. Inserting REM (without the quote marks but with a trailing space) causes the line to be commented out and ignored during startup. This is useful when you are replacing an existing command with a new command and wish to leave the existing command in place but inactive. In this case, you should always set the Insert Action field to cause your new command to be inserted before the existing line so that a subsequent installation finds and edits the active command, not the commented-out line. Insert Action. Select the action to be taken when a line containing the specified text is found. You can either insert your new command before

68

the existing line, replace the existing line with your new command, or insert your new line after the existing one. Match Criteria. Choose whether the line must begin with, contain, or end with the text entered in the Search for Text field. Ignore White Space. If this checkbox is marked, the search operation ignores spaces and tab characters. Case Sensitive. If this checkbox is marked, the search operation distinguishes between upper-case and lower-case text. Make Backup File. If this checkbox is marked, the installation makes a copy of the Config.sys file before editing it. The backup is retained after installation so that the end user can easily restore the original configuration.

Devices
The Devices page lets you define device drivers to be installed under Windows 3.1x and Windows 95/98. The specified devices are added to the [386Enh] section of the System.ini file. The driver usually has one of the following file extensions: .386, .drv, .vxd, or .sys. The driver file must already be a part of the installation, that is, added to the Files page. To add a new device driver entry: 1. On the Devices page, click the Add button. The Select File from Installation dialog appears. Use this dialog to select the device driver file from the installation that should be added to System.ini.

The list on the left is a directory browser showing the installations components and the directories within each one. The list on the right shows the device files in the selected directory. 2. To add a device to System.ini, select it from the list on the right and click OK.

69

3: INSTALLATION EXPERT PAGES

If you choose a device driver that is part of an optional installation component, the System.ini entry is added only if the end user selects the appropriate component for installation. To remove an existing device driver from the installation: Select it from the list and click the Delete button.

Dialogs
Use the Dialogs page to choose which dialogs appear during installation. The dialogs you choose determine the level of control the end user has over the installation. Mark the checkboxes of the dialogs you want to appear in the installation. The Dialogs page lists the main dialogs that make up the wizard end users navigate through during installation. The wizard dialogs include: Welcome. Welcomes the end user to your installation, suggests exiting other running applications, and warns of the software copyright. ReadMe. Displays the ReadMe file for your application. When you select this dialog, the Pathname field is enabled at the bottom of the Dialogs page. To specify text to appear in this dialog, click Browse and select a .TXT file. The text is copied from the file to this installation. Branding/Registration. Prompts for the end users name, company name, and, optionally, a serial number. Destination Directory. Lets the end user choose a destination directory for the installation. The directory the end user chooses is stored in the variable %MAINDIR%. Backup Replaced Files. Lets the end user choose whether to back up files that are replaced during the installation and if so, where to store the backups. Select Components. Lets the end user choose which optional components to install. Select Icon Group Name. Lets the end user choose the group name for icons installed in the Program Manager or Start menu. Start Installation. Gives the end user a final chance to cancel the installation before installation begins. Finished. The post-installation dialog that informs the end user that the software was successfully installed.

70

Editing Dialogs
To edit a dialog, double-click the dialog name on the Dialogs page. This displays the dialog in the Custom Dialog Editor. The changes you make affect only the dialogs in this installation. For detailed information about using the Custom Dialog Editor, see Creating Custom Dialogs on page 293.

Adding New Dialogs


Click the Add button on the Dialogs page to create a new custom dialog. This opens the dialog Properties dialog, where you can name the new dialog and set the default properties. When you click OK, the Custom Dialog Editor opens so you can configure the new dialog. When you close the Custom Dialog Editor, the new dialog is added to the Dialogs page. See Creating Custom Dialogs on page 293 for detailed information about using the Custom Dialog Editor.

Digital Signature
Use this page to add an Authenticode digital signature to your installation so its integrity and authenticity can be verified. You must have a valid VeriSign commercial certificate to use this feature. For this to work, the sign code executable, the private key file, and the credentials file must be in the Windows directory. Also, you must enter the Descriptive Name, Credentials File, and Private Key File fields on the Digital Signature page. The digital signature protocol of Internet Explorer 4.0 is used. For more information about digital signatures, visit the VeriSign Web site at www.verisign.com and search for authenticode. To add a digital signature to your installation, mark one of the following options: Add a digital signature externally. Mark this option to leave space in the installation for a digital signature without actually adding it to the installation. This is useful if the installation must be digitally signed under a higher security environment by a different individual. Extra space is reserved to allow for the digital signature information. If an installation does not have extra space (approximately 5K), and a digital signature is added to it, errors occur when CRC checks are performed because of the resulting size increase. This option eliminates those errors. Add a digital signature. Mark this option to add a digital signature to the installation. You must have access to your companys credential file, private key file, and other information that needs to be embedded in the installation.

71

3: INSTALLATION EXPERT PAGES

When you mark one of the digital signature options, the following fields become available. Web URL. Enter your companys Internet Web address, for example: http://www.companyname.com. Descriptive Name. Enter the name of your application. This name is embedded in your Authenticode certificate and lets end users verify the name of the software they are installing. TimeStamp URL. Select or enter the URL you use for your timestamping service. Timestamping lets end users distinguish between a certificate thats expired but was valid when it was used to sign the installation, and a certificate that was used to sign an installation while it was expired. The timestamping service must be available to build the installation but does not need to be available to the end user running the installation. Credentials File, Private Key File. Select your VeriSign credentials file and private key file. You obtain these files from VeriSign. They must be located in the Windows directory.

File Associations
Use this page to associate a file extension with an application that can open a file with that extension. For example, if your application generates documents with a unique file extension, you can associate that file extension with your application. Then, when an end user double-clicks that document file, the operating system launches the associated program and opens the file. To associate a file type with a program: 1. On the File Associations page, click the Add button. The Select File from Installation dialog opens.

72

2. In the left list box, select the directory containing the program file you want to associate with this file type. The names of all .EXE files in that directory are displayed in the right list box. 3. In the right list box, select the program file you want to associate with this file type. If you choose an .EXE file that is part of an optional installation component, the association is created only if the end user chooses to install that component. 4. At the bottom of this dialog, enter the three-letter document extension of the file type you want to associate. 5. Click OK. The new file association appears on the Document Types page. To remove a file association: Select a file association from the list on the File Associations page and click the Delete button. To edit an existing file association: Select a file association from the list on the File Associations page and click the Details button. This opens the Association Details dialog. See Association Details for more information.

Association Details
Click the Details button on the File Associations page to display the Association Details dialog, where you can edit an existing file association. See File Associations on page 72.

Document Extension. This is the three-character extension that is associated with the program. Document Identifier and Identifier Full Name. These fields identify the program that can open files of the type listed in the Document Extension field.

73

3: INSTALLATION EXPERT PAGES

Print Options. This field holds the command line options that can be passed to the application to cause it to print the file instead of just opening it. If this field is not blank, a Print menu option is added to the right-click menu for files of that document type. Source Pathname. This is the path to the .EXE program associated with the specified document extension. You cannot edit this field.

Files
Use this page to specify the files and directories that are installed on the destination computer. When you add files here, Installation Expert does not actually copy or store the files; it simply records the location of the files on your local system or network. The files are not copied until you actually compile and build the installation. Therefore, if you change a files name or location, you must update its path on this page, otherwise you get error messages when you compile. When you add a program file to the Files page, Installation Expert searches the registry for related information, such as file associations and icons, that can be added to the installation. This information is added to the installation automatically and entered on the corresponding Installation Expert pages. Note:
If you inadvertently add multiple instances of the same file (with the same path), only one copy is compiled into the installation .EXE. Use the Duplicate Files Report, available from the Edit menu in Script Editor, to find duplicate files.

To add files to your installation: 1. Go to the Files page in Installation Expert. 2. In the lower left list box, which represents the directories on the destination computer, click the directory that will contain the file or files on the destination computer. You must assign all files to either the Application directory, a Windows directory, or a subdirectory that you create. If your installation contains more than one component, the list box contains directories for each component. The Application folder represents the default installation directory for the program, even though you havent formally named it yet. This is where the executables, ReadMe files, and other non-system files are typically assigned. System level files, such as fonts and certain .DLLs, should be assigned to the appropriate Windows directory. The main system

74

directories are already created for you, though you can add a new one if needed. To create a new destination directory, click the New Folder button and enter a name in the dialog. The new directory is created as a subdirectory of the selected directory. If you assign files to a directory under an optional feature, then those files are installed on the destination computer only if the component is installed. 3. In the upper left list box, which represents the directories on your computer, click the directory containing the file or files you want to add. All the files in the selected folder are listed in the upper right list box. 4. From the upper right list box, select the files you want to add and assign them to the destination directory as follows: To assign a single file to the destination directory, select the file and click the Add File button, or simply double-click the file. To select multiple files, use the CTRL or SHIFT keys while clicking on each file. To add the contents of an entire directory or only files of a particular type, click the Add Contents button. Complete the fields in the Add Wildcards dialog and click OK. For information on completing the Add Wildcards dialog, see Adding Contents of Directories to the Installation on page 76. 5. Repeat the preceding steps until you have assigned all of the program files to the proper destination directory. You can use the Files page to accomplish these additional tasks: You can drag files from Windows Explorer and drop them in a folder under the Destination Computer icon. When you drop the file, the Drag and Drop Settings dialog opens so you can set file properties (this is the same as the Install File Settings dialog.) To confirm that you want the file at this location, click OK. To review your file assignments, click a destination folder in the lower left list box. All the files assigned to that location are listed in the lower right list box. To set advanced installation options for a particular file, select that file from the lower right list box and click the Details button. This opens the Install File Settings dialog. See Specifying Installation File Settings on page 77 for more information. To remove one or more files from the destination computer, select the appropriate directory in the lower left list box, select the file(s) in the lower right list box, and click the Delete File button (or press the DELETE key).

75

3: INSTALLATION EXPERT PAGES

Adding Contents of Directories to the Installation


You can add the entire contents of a directory to your installation by using the Add Contents button on the Files page; see Files on page 74. You can use wildcard filters to add only those files in the directory that match specific criteria. To add the contents of a directory to your installation: 1. On the Files page in Installation Expert, in the upper left list box, select the directory whose contents you want to add. 2. In the lower left list box, select the directory to which you want to add the directorys contents. 3. Click the Add Contents button. The Add Wildcards dialog appears.

4. Fill out the Add Wildcards dialog: Dest. Directory. Enter the name of the installation directory that holds the directory contents youre adding. If you dont enter a directory name, the contents are added to the directory thats selected in the lower left list box. If you want to place the files into a directory of the same name as their source, you must type the directorys name in the Dest. Directory field. Include Wildcard, Exclude Wildcard. If you want to include or exclude files based on specific criteria, enter a semicolon-delimited list of wildcards in the Include Wildcards and Exclude Wildcards fields. For example, enter *.EXE for all .EXE files, *.DLL for .DLL files, and so on. If you enter multiple wildcards, separate them with

76

semicolons. If you leave the wildcard fields blank, all files in the directory are added. Include Subdirectories. Mark this checkbox to also add all the subdirectories within the directory youre adding. The wildcards apply to the subdirectories also. If this checkbox is not marked, only the files contained in the directory are added. Add as a wildcard instead of adding the files. Mark this checkbox to have the lower right list box display your wildcard settings (as specified in the Include Wildcard field or *.* if no wildcards are specified) instead of the actual file names. This lets you add other files to the source directory later. When the installation is compiled, all files matching the wildcard filter are copied to the destination computer. When you use this feature, however, the program does not automatically create icons and file associations for you. 5. Click OK in the Add Wildcards dialog. The contents of the directory in the upper left list box are added to the directory you selected in the lower left list box. If you entered a directory name in the Dest. Directory field, then the contents are added in to that directory. If you specified wildcards, only those files that match the wildcard criteria are added.

Specifying Installation File Settings


The Install File Settings dialog determines the installation options for the files selected in the lower right list box on the Files page of Installation Expert; see Files on page 74. Access this dialog by selecting a file in the lower right list box and clicking the Details button. You can use the CTRL or SHIFT keys to select multiple files; when you select multiple files, the resulting dialog is titled Multiple File Settings.

77

3: INSTALLATION EXPERT PAGES

Source Pathname. Specify the full pathname to the file on your computer. Destination Pathname. Select the destination pathname on the computer that runs the installation file. Installation Expert uses script variables to specify the directory. For example, %MAINDIR% specifies that the file should be installed in the main application directory selected by the end user. Description. Enter a description for the file being installed. This description appears in the Progress Bar dialog. Require Password. If you set a password on the Password page and mark this checkbox, the installation prompts the end user for a password before installing this file. If a password is not set on the Password page, this option is disabled. Regardless of the number of password-protected files being installed, the password prompt appears only once during installation, for the first password-protected file in the installation. If the end user chooses an

78

installation configuration that does not include any password protected files, the password prompt does not appear. Include Sub-Directories. Mark this checkbox to have the installation include files in subdirectories of the directory in the Source Pathname field. Shared DLL Counter. Mark this checkbox to have the file entered in the registry if its a .DLL, .OCX, or .VBX. That way, Windows can keep track of how many installed applications are using the file and can prevent it from being removed until it is no longer needed. No Progress Bar. If you do not want the progress bar to display during installation, mark this checkbox for every file that is being installed. If you mark it for some files, but not others, the progress bar appears to continue to display because the screen does not refresh between files. This option is useful when you install a few small files that only require a second or two and you dont want to clutter the screen with the progress bar. Self-Register OCX/DLL/EXE/TLB. All .OCXs and .TLBs as well as some .DLLs and .EXEs support self-registration. Mark this checkbox to have the .OCX, .DLL, .EXE, or .TLB register itself in the Windows registry at the end of installation. Do Not Download With WebDeploy. This checkbox is available when you click the Create Internet-based installation option on the WebDeploy page. In an Internet-based installation, files are stored as separate files in the same directory as the installation .EXE on the web server and are downloaded only as they are needed. To place the file into the installation .EXE rather than storing it as a separate file, click the Do Not Download With WebDeploy checkbox. Repair application if this file is missing. Self-repair prevents your application from failing if this file has accidentally been deleted. Mark this checkbox to initiate self-repair if this file is missing during application launch. The end user must have access to the installation media to perform a repair, and you must also configure a shortcut to your application with self-repair turned on. To use this feature, you must configure your installation for self-repair. See Automatic Self-Repair on page 35 for a description of how to set up self-repair. Professional Edition only
Self-repair support is available only in Professional Edition.

Replace Existing Files. Select an option to determine how to handle the installation of files that already exist on the destination computer. Always. The new file always replaces the old file.

79

3: INSTALLATION EXPERT PAGES

Never. The file is never installed if it already exists. Use this for files, such as configuration files, which should be installed if they are not present, but which might be customized by the end user and should therefore not be replaced on re-installation. Check File. The File Version and File Date/Time drop-down lists become available. The existing file is replaced only if the requirements set in both fields are true. Doesnt Matter. Select this option for a field if you only need one of the two requirements, File Version or File Date/Time, to be fulfilled for the existing file to be replaced. Same or Older. (File Version) Replace the existing file if it has a version resource, and if it is the same as or older than the new file. If the existing file does not have a version resource, the new file is not installed. (File Date/Time) Replace the existing file if its modification date and time are the same as or older than the new file. Older. (File Version) Replace the existing file if it has a version resource, and if it is older than the new file. If the existing file does not have a version resource, the new file is not installed. (File Date/Time) Replace the existing file if its modification date and time are older than the new file. Retain Duplicates in Path. Normally, version-checking removes one copy of a .DLL found in the path directory list, to ensure that the path only contains a single version of the .DLL. You can suppress this feature by marking this checkbox. The SmartPatch feature creates a patch file that contains only the differences between the older version of the file an end user might have, and the current version. The resulting installation is normally much smaller than a full installation file. However, the end user must already have your software installed to perform the installation. Existing File Pathname. Enter a pathname where Installation Expert can expect to find one of the files listed in the Previous File Versions list. Previous File Versions. This lists files (on your hard disk) that are older versions of the file(s) being installed. Browse to an older version of the file on your hard drive and add it to the list. Note:
Rather than specifying SmartPatch information for each file, you can use the separate SmartPatch page in Installation Expert to specify whole directories that contain older versions of your files. See SmartPatch on page 108.

80

Fonts
Use this page to add fonts to your installation. You only need to add fonts when they are required by the application being installed. Any fonts added with the Files page are listed here automatically. To add a new font: 1. On the Fonts page, click the Add button. The Select Fonts dialog appears, which lists the fonts in the Fonts directory on your computer. 2. From the Component drop-down list, select the component for which you want to install fonts. 3. In the left list box, select the directory containing the font you want to install. 4. In the right list box, select the font to install. Use the CTRL or SHIFT keys to select multiple fonts. 5. Click OK. To remove an existing font: On the Fonts page, select the font you want to remove, then click the Delete button. You can select multiple fonts by using the CTRL or SHIFT keys.

General Information
Use the General Information page to specify information about the installation file. The information on this page sets the version resource of the compiled setup file (.EXE). Your customer sees this information by right-clicking on the setup file and selecting Properties from the right-click menu. If you plan to use an automated build system and want to set these values at compile time, you can create compiler variables to set these values, and enter the compiler variable name, surrounded by percent signs, in these fields. For example, if you create a compiler variable named _INST_VERSION_ to set the version, enter %_INST_VERSION_% in the Installation Version field. See Compiler Variables on page 64. Enter information about your application in the following fields: Installation Version. The version number of the installation. Description. A description of the installation, perhaps including your applications name. Copyright. Enter the copyright notice for your installation. Company Name. Enter the name of your company.

81

3: INSTALLATION EXPERT PAGES

INI Files
The INI Files page lets you create a new .INI file to store your programs settings, or you can update the contents of an existing .INI files during the installation. To create a new .INI file: 1. From the left list on the INI Files page, select the folder where you want the new .INI file to be added. 2. Click the New File button to open the Edit INI File Settings dialog.

3. In the File drop-down list, choose a default path where the .INI file is stored. Overwrite the default NONAME.INI with the name you want to give the new .INI file. 4. In the INI File Contents field, enter the information that appears in the .INI file. You must enter at least one section heading and one command line for the file to be created. You can copy and paste the .INI contents from an existing file into this field. 5. Click OK to save the new .INI file.

82

To remove an .INI file: Select an .INI file from the list on the right of the INI Files page and click the Delete button. To edit an existing .INI file: To edit or view the contents of an .INI file, select the file from the list on the right of the INI Files page and click the Details button. This opens the Edit INI File Settings dialog. See Edit INI File Settings on page 83 for more information.

Edit INI File Settings


To edit the contents of an existing .INI file, select the file on the right of the INI Files page and click the Details button; see INI Files on page 82. The Edit INI File Settings dialog appears.

File. Displays the pathname to the .INI file. Installation Expert uses a placeholder variable, such as %MAINDIR%, to refer to the directory, rather than a hardcoded path, because the path might be different on the destination computer. You cannot edit this field; you must create a new .INI file item. INI File Contents. Enter the modifications to be made to the .INI file. The lines in this field are interpreted as follows: Lines with text enclosed in square brackets, such as [Section], instruct the installation to put the lines that follow in the indicated section of the .INI file.

83

3: INSTALLATION EXPERT PAGES

If you include a section name with no entries after it, that section and all its entries are deleted. Lines that start with a parameter name followed by an equals sign (=) and a value are added to the .INI file. For example, ProgPath=%MAINDIR%. If the .INI file already contains an entry for the specified parameter, the existing entry is replaced. If you include a parameter name with no value, for example, Progpath=, that entry is deleted if it exists. You can enter variables in the INI File Contents field to insert the values of script variables into the .INI file. See Variables and Expressions on page 167.

Updating an Existing .INI File on the Destination Computer


You can make changes to one or more of the existing system files on the destination system, such as the Win.INI and System.INI file. To do so, follow these steps: 1. On the INI Files page, select the folder where the existing system file is located. 2. Click the New File button to open the Edit INI File Settings dialog. 3. From the File drop-down list, select the path where the .INI file you want to update is stored. For example, %SYS32%\NONAME.INI 4. Overwrite the "NONAME.INI" text with the name of the .INI file that you want to update, such as "System.ini". 5. In the INI File Contents field, enter the information that you want to add to the .INI file. During the installation, your settings are merged into the existing system file. Any duplicate settings are overwritten with the values you enter here. 6. Click OK to save these settings.

Installation Log
The installation log is a text file containing a list of events that occur while the installation runs, for example, it contains the list of files that are replaced. Entries are also added to the log when files are being deleted or backed up; however, the uninstaller does not take such entries into account during rollbacks.

84

Use the Installation Log page to specify the location of the installation log and its file name, if one is created. As an alternative, set the compiler variable _LOGFILE_PATH_ to the path where you want the log file. On the Installation Log page, select one of the following options to determine whether an installation log is created and, if one is created, where it is stored. Do not create installation log. Mark this option if you do not want an installation log to be created. Keep in mind that if you do this, the end user will get an error upon attempting to uninstall. Create installation log in same directory as first installed file. By default, this saves the installation log onto the root, because the first Install File(s) action is in the uninstal.wse include script, which appears before any of your Install File(s) lines. This option is included for backwards compatibility with WiseScripts from previous versions of the Wise Installation System. If you want to create the log where your first installed file is, use the Create installation log in custom directory option. Create installation log in custom directory. Mark this option to save the installation log in a directory you specify. When you mark this option, the directory browser and the Install Log File Name field become available: Use the directory browser to specify the directory where you want to save the installation log. You can use the New Folder button to create a new directory for the log within the Application or Windows directory. Install Log Filename. Enter a file name for the installation log. A common name is Install.log.

Languages
Use this page to define the languages supported by the installation, along with the default language and the font used by the Japanese version of the installation. Unless youve added languages, you can select U.S. English (the default), French, German, Italian, and Spanish. In the Settings area of the Languages page, complete the following fields and options. Default Language. Select the default language for the installation. Japanese Font Name. If you create a Japanese installation, enter the font to be used. Japanese Point Size. If you create a Japanese installation, enter the point size to be used.

85

3: INSTALLATION EXPERT PAGES

Note:
If you are working with a double-byte language, such as most Asian languages, do not include any other languages in the installation. In other words, dont click any other checkboxes on the Languages page besides the double-byte language. Including double-byte with single-byte languages in the same installation can cause distortion of the fonts for the single-byte languages. If you need both single and double-byte installations, make a copy of the installation and include the double-byte languages in the copy.

Copy Default. Mark this checkbox to copy messages from the default language to all others to provide a starting point for translating the message. For example, suppose your installation supports two languages and you add a Display Message action to your script while English is selected in Script Editors Language drop-down list. If Copy Default is marked and you select French from the Language drop-down list, the text you entered in the English Display Message is copied to the French version of the Display Message action. Always Prompt. Mark this checkbox to have the installation always prompt the end user to select a language, unless there is only one language in the installation. To add a language to the installation: 1. Before you can add a language on the Languages page, you must first create a new language translation in the Installer Messages dialog, which you access by selecting Installer Messages from the Edit menu. See Changing Installer Messages on page 41. 2. On the Languages page, click the Add button. This displays the Select Languages dialog, which lists the language translations that are available. 3. Select the language you want to add and click OK. The language you select is added to the list on the Languages page. This list is presented to the end user at the start of the installation. You can use the Move Up and Move Down buttons to rearrange the list. To delete a language: Select a language from the list on the Languages page and click the Delete button. This removes the selected language from the installation, however, it does not delete the language translation that you entered in the Installer Messages dialog.

86

Media
Use the Media page to configure your installation for the type of media on which it will be stored and distributed. The process is simple; just mark the appropriate option for the way you want to distribute the installation. Single File Installation. Mark this option to pack all the files into a single installation file. This is convenient if you plan to distribute your installation over a LAN, or as a single downloadable file over the Internet. (In the latter case, consider using WebDeploy technology to reduce the bandwidth required for the download.) Media-Based Installation. Mark this option to break the installation into files that fit on a specific type of removable media. When you mark this option, the following fields become available: Media Type. Select the type of media you want to use: 5 1/4" highdensity floppy; 3 1/2" double-density floppy; 3 1/2" high-density floppy; Zip disk (100MB); 3 1/2" Super LS-120 diskette; CD-ROM (650MB); DVD-ROM (4.7GB); or a custom disk size. Custom Size. If you selected a custom disk size in the Media Type field, enter the formatted capacity of the media you are using in the Custom Size field.

Microsoft SMS
Professional Edition only
Systems Management Server (SMS) support is available only in the Professional Edition.

If your installation will be run in a Systems Management Server (SMS) environment, you can create an .MIF file in the Windows directory to describe your application. The Microsoft SMS page specifies the information for the .MIF file and an optional package definition file (PDF). You can find more information about SMS by visiting the www.microsoft.com Web site and searching for SMS. Note:
You can use the Exit Installation script action to write text and a success/ failure flag to your Status MIF file. See Exit Installation on page 235.

To create an .MIF file, complete the following fields. Install MIF Filename. The file name for the installation MIF file. For example: myapp.mif.

87

3: INSTALLATION EXPERT PAGES

Uninstall MIF Filename. The file name for the MIF uninstaller file. For example: unmyapp.mif. Manufacturer. The name of the company that developed this application. Product. The name of this application. Version. The version number of this application. Serial Number. The serial number of this application. Package Definition File. To create a .PDF or .SMS file, mark the checkboxes below. Create .PDF File (SMS 1.2 or earlier). Mark this checkbox to create a package definition file of file type .PDF. This file contains information about the installation, and is required to use the installation in an SMS environment. To record your installations version number in the .PDF file, enter it in the Version field. Create SMS File (SMS 2.0 or later). Mark this checkbox to create a package definition file of file type .SMS. This file contains information about the installation, and is required to use the installation in an SMS environment. To record your installations version number in the .PDF file, enter it in the Version field.

ODBC
Use the ODBC page to add ODBC data sources required by your application on the destination computer. To add ODBC driver support, select MDAC on the Runtimes page. To add a data source: To add a data source and configure its properties, click the Add button. The Configure ODBC Data Source dialog appears. To edit a data source: To edit an existing data source, select it from the Data Sources list and click the Details button. The Configure ODBC Data Source dialog appears.

88

Data Source Name. Enter the name of the ODBC data source. This name is displayed in the ODBC data sources list on the destination computer. Click the Import button to get this information from an existing ODBC data source. Driver Name. Enter the name of the ODBC driver used by this data source. The driver, along with its support files, must already exist on the destination system. Install Data Source for. Choose whether the ODBC data source is installed for use with Win16 or Win32 APIs. Data Source Attributes. Enter the data source attributes here. Installation Expert provides a set of default data source attributes that you can modify if necessary. Display Configuration Dialogs. If this checkbox is marked, the installation displays configuration dialogs that allow end users to configure the source for use on their computer system. Otherwise, the data source is installed silently, without end user intervention, using default settings. System DSN. Mark this checkbox to make the data source available to all end user accounts on the destination computer.

Online Registration
Professional Edition only
This page is available only in the Professional Edition.

89

3: INSTALLATION EXPERT PAGES

Use this page to configure the online registration feature. This allows the end user to register the program after the installation has been completed successfully. Product registration is supported through a CGI program or Active Server Page that accepts the data via the HTTP POST operation. No Online Registration. Mark this option if you do not support online registration. Online Registration. Mark this option if you support online registration. The following fields become available: Post to URL. Enter the URL of the CGI program or Active Server Page that accepts the data via the HTTP POST operation. Registration is passed to the Web server in the named fields NAME, COMPANY, ADDRESS1, ADDRESS2, ADDRESS3, EMAIL, WEBADDRESS, PURCHASEDATE, SERIALNO, PHONE, PRODINFO, CITY, STATE, and ZIP. Use the directory browser to specify the location of the file that will contain the registration data on the destination computer. You can use the New Folder button to create a new directory within the Application or Windows directory. Registration INI File Name. Enter a name for the file that will contain the registration data. Future installations use this file to preenter the users registration details, such as name and company. The end user can still change the fields before registering.

Password
Use this page to specify a required password or serial number for your installation. End users must enter the correct password or serial number in order for the installation to begin. You can turn password protection on and off on a per-file basis by selecting a file on the Files page and clicking the Details button. You must set the password first in order for this option to be enabled. See the Require Password checkbox description in Specifying Installation File Settings on page 77. Select one of the following options for protecting your installation. Single password used for all installations. Mark this option to require a single password for any copy of the installation. In the field to the right of this option, enter the password. Individual serial numbers used as password. Mark this option to have the installation work with a range of serial numbers. Note that multiple serialized copies of the installation are not produced; instead, a single installation that accepts any of the generated serial numbers is produced.

90

When you select this option, the following fields become available: Serial Number Type. Choose whether to create incremental serial numbers (in sequence) or randomly generated serial numbers. Starting Serial Number and Ending Serial Number. Define the range of serial numbers by entering a starting and ending number. Approx. Serial Numbers. Enter the approximate quantity of serial numbers. Output File. Specify a text file name, then click the Export button. This writes the serial numbers to the specified file. You can use this file to print labels to serialize your application. For maximum protection, use a random serial number scheme and a serial number range that exceeds the number of copies you will produce by a factor of 100 or more. For example, if you generate 1,000 random serial numbers between 1,000,000 and 9,999,999, unauthorized users have only a 1-in-9,000 chance of correctly guessing a serial number.

Product Details
Use the Product Details page to specify the title (usually the name of the application) that appears on the background screen and on wizard dialogs during the installation, and the default directory for the installation. Enter the following information on the Product Details page. Installation Title. Enter the name of the application. You do not need to include the word installation. Default Directory. Enter the name of the directory in which your application is installed by default. The end user can override this default. Place Default Directory Under Program Files. Mark this checkbox to place the default directory in the Program Files directory instead of in the hard disks root directory. The end user can change the location.

Progress Bar
Use this page to set options for the progress bar that displays while the installation is running. The default progress bar uses a .DLL written by Wise Solutions, which is located in Program Files\Wise Installation System\Progress. You can access the source code for this .DLL at Wise Installation System\Progress\Source. If you want, you can specify an external .DLL to be used for displaying the progress bar. Progress Dialog Placement. Select a screen position for the progress bar.

91

3: INSTALLATION EXPERT PAGES

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, you can enter 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 checkbox 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 checkbox 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 checkbox 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 your installation or uninstall. Initialization splash screen. From the drop-down list, select Default, None, or Custom. Choose Custom to modify the splash screen. Initialization .BMP File. This field becomes available when you select Custom from the Initialization splash screen drop-down list. Browse to the .BMP file that shows the graphic and the text you want your end users to see first when they run your installation. Note:
If the bitmap file you select for your custom splash screen doesnt appear correctly, you probably havent selected a valid .BMP file. Non-valid bitmap files do not appear, and no error message is displayed to inform you of the problem.

Registry
Use the Registry page to specify the registry entries to be installed or edited on the destination computer. You can either add registry entries manually or import a registry (.REG) file. If you import a Visual Basic .VBR file, it imports the registry settings, but does not automatically set up for installation of either a remote automation or DCOM server.

92

The upper two list boxes show keys and values in your computers registry. The lower two list boxes represent the keys and values to be installed on the destination computer. The left two list boxes show key structure, and the right two list boxes show values. Use the Add Keys button to copy a registry key, including all its subkeys and values, from your computer to the installation. Use the Add Values button to copy values from your computer to the installation. Use the New button to either create a new key or to import a registry file into the installation. The presence of a key in this list does not necessarily mean that the key is added to the registry on the destination computer; it merely indicates that the installation operates on the key in some way. The operation might be to add a new key or named value, to modify an existing named value, or to delete a value. Use the Delete Key or Delete Value button to remove items from the current installation. Deleting the key or value from the current installation simply means that your installation does not modify that key or value; it does not actually delete the key or value on the destination computer. Use the Details button to edit registry key settings. See Registry Key Settings Dialog on page 93. Click between the left and right list boxes to resize them horizontally. Use SHIFT-click or CTRL-click to select multiple contiguous or noncontiguous values in the list boxes on the right. Also see Creating or Editing Registry Key Settings on page 96.

Registry Key Settings Dialog


The Registry Key Settings dialog appears when you are creating or editing a registry key. It specifies operations and values for registry keys or values being installed on the destination computer.

93

3: INSTALLATION EXPERT PAGES

Operation. Select an option to determine the operation to be applied to the key and 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. An empty key is created. It is populated by a plus sign (+), which indicates that the key is empty. Remove key and all subkeys. Removes 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 not removed. Preserve existing key and value. Retains the existing value if it already exists, adding a new value if the value is not present. Root. The top-level key in which the new key is added. For example: HKEY_CURRENT_USER. Key. Enter the name of the new key. Create an entire key path by separating key names with backslashes (\). For 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 created automatically. Value Name. The name of a new named value. Data Value. The data for the value. If the Data Type (below) is Double word (DWORD), the data should be in decimal notation. To insert multiple lines of data here, hold down the CTRL key and press the ENTER key to begin a new line.

94

Data Type. The type of data contained in the named value. Available types are listed below. The associated Windows API data types are in parentheses. String. (REG_SZ prefix) A piece of alphanumeric text. Indicates that a value entry is an expandable string. If you want to embed a variable name, (such as %WIN%), you must enclose it with double percents (%%WIN%%). If you only enclose it in single percents, then the variable name is expanded to its actual value. This allows Windows NT4/2000/XP system variables to be embedded. Unexpanded string. (REG_EXPAND_SZ prefix) Identifies a value entry as an unexpanded data string. If you want to embed a variable name, (such as %WIN%), you must enclose it with double percents (%%WIN%%). If you only enclose it in single percents, then the variable name is expanded to its actual value. This allows Windows NT4/2000/XP system variables to be embedded. Multiple strings. Multiple pieces of text, separated by carriage returns. Valid under Windows NT, 2000, or XP. (REG_MULTI_SZ) Double word. A 32-bit value in decimal notation. (REG_DWORD) Binary/Hex. A series of bytes in hexadecimal notation. Each byte should be separated by at least one space. For instance, AD 30 C0 A9 40 20 A8 FC 4C 00 08. (REG_BINARY) None. This is provided for compatibility with SMS Installer installations; it behaves the same as the binary data type. Repair application if this registry value is missing. Self-repair prevents your application from failing if this registry value has been accidentally deleted. Mark this checkbox to initiate self-repair if this registry value is missing during application launch. The end user must have access to the installation media to perform a repair, and you must also configure a shortcut to your application with self-repair turned on. To use this feature, you must configure your installation for self-repair. See Automatic Self-Repair on page 35 for a description of how to set up self-repair. Professional Edition only
Self-repair support is available only in the Professional Edition.

Append Data. Normally, if you set a registry key to a new value, and the key already exists, the value is replaced with the new value you set. If you want to append the new data to an existing multiple strings value instead of replacing it, mark this checkbox. This option is disabled unless you have Multiple Strings selected in the Data Type dropdown list.

95

3: INSTALLATION EXPERT PAGES

Creating or Editing Registry Key Settings


From the Registry page, you can edit existing registry values, add new registry keys and values, and import registry files. See Registry on page 92. To add an empty registry key: 1. On the Registry page, click the location in the lower left list where you want to add the new key. 2. Click the New button and select Key from the buttons drop-down list. The Registry Key Settings dialog appears.

3. In the Operation drop-down list, select Create empty key. 4. In the Key field, place your cursor at the end of the existing text, and add a backslash and the name of the new key. For instance, append \Preferences to the end of the existing key name. 5. Click OK in the Registry Key Settings dialog. To add a registry value: 1. In the lower left list box, select the key that you want to contain the value youre adding. 2. Click the New button and select Key from the buttons drop-down list. The Registry Key Settings dialog appears. 3. Configure the Registry Key Settings dialog and click OK. See Registry Key Settings Dialog on page 93 for details.

96

To edit a registry value: 1. Double-click the value in the lower right list box. The Registry Key Settings dialog appears. 2. Configure the Registry Key Settings dialog and click OK. See Registry Key Settings Dialog on page 93 for details. To import a registry file: 1. Click the New button and select Import from the buttons drop-down list. 2. In the Select Registry File to import dialog, find the registry file (.REG file) that you want to import, and click the Open button.

Runtimes
Warning:
You can damage destination computers by installing the wrong version of runtime support files. Installing runtime files incorrectly can cause the end user's applications to stop running properly and can even disable the operating system. Before deploying any installations that install runtimes, get the latest runtime updates by running the Download Runtimes wizard from the Wise Installation System Help menu.

Use the Runtimes page to define MDAC, database, Visual Basic and Visual FoxPro, Windows, and Crystal Reports runtimes to be used by the software included in this installation file. Runtimes are sometimes pre-selected for you after running the Import Visual Basic Project tool or ApplicationWatch. Note:
To add ODBC data sources, use the ODBC page. See ODBC on page 88.

To install a particular runtime, mark the corresponding checkbox. Where appropriate, details dialogs appear when you mark a checkbox. Use these dialogs to select a specific version of a particular runtime or specify certain settings. Also see: Microsoft Data Access Components on page 98 Database Runtime on page 98 Visual Studio Support on page 99 Windows Runtime on page 100 Crystal Reports Runtime on page 101

97

3: INSTALLATION EXPERT PAGES

Microsoft Data Access Components


Warning:
You can damage destination computers by installing the wrong version of runtime support files. Installing runtime files incorrectly can cause the end user's applications to stop running properly and can even disable the operating system. Before deploying any installations that install runtimes, get the latest runtime updates by running the Download Runtimes wizard from the Wise Installation System Help menu.

The MDAC section of the Runtimes page lists the different versions of Microsoft Data Access Components (MDAC) that are available to distribute with your application. For more database runtime options, see Database Runtime. The Description area toward the bottom of the Runtimes page provides information on the currently-selected component.

Note:
The details dialog, and therefore the Details button, is not available for Microsoft Access Data Components.

Database Runtime
Warning:
You can damage destination computers by installing the wrong version of runtime support files. Installing runtime files incorrectly can cause the end user's applications to stop running properly and can even disable the operating system. Before deploying any installations that install runtimes, get the latest runtime updates by running the Download Runtimes wizard from the Wise Installation System Help menu.

The Database Runtime section of the Runtimes page lists connectivity runtimes. If your application requires any database connectivity, you probably need to include one of these options in your installation. For available MDAC options, see Microsoft Data Access Components.

98

The Description area toward the bottom of the Runtimes page provides information on the currently-selected runtime. Note:
The details dialog, and therefore the Details button, is not available for all Database runtimes.

Visual Studio Support


Warning:
You can damage destination computers by installing the wrong version of runtime support files. Installing runtime files incorrectly can cause the end user's applications to stop running properly and can even disable the operating system. Before deploying any installations that install runtimes, get the latest runtime updates by running the Download Runtimes wizard from the Wise Installation System Help menu.

Use the Visual Studio Support section of the Runtimes page to include Visual Basic, Visual FoxPro, and Visual C++ runtimes in your installation. If the application youre deploying was developed using one of these development languages, you might need to have the appropriate runtime pre-installed to ensure a complete and error-free installation.

Mark the checkboxes for the runtimes you want to include in your installation, then use the dialogs that appear to specify the location of the Visual Basic or Visual FoxPro directory on your computer as well as runtime version, desired options, and server types. The dialogs that appear when you mark one of the Visual Basic checkboxes let you do the following: Choose the appropriate runtime support for your application

99

3: INSTALLATION EXPERT PAGES

Specify the directory where Visual Basic is stored on your computer The dialogs that appear when you mark one of the Visual FoxPro checkboxes let you do the following: Specify the directory where Visual FoxPro is stored on your computer Specify how to handle remote server support, if applicable Choose the Visual FoxPro options you want to have installed with your application The Description area toward the bottom of the Runtimes page provides information on the currently-selected runtime. Note:
The details dialog, and therefore the Details button, is not available for all Visual Studio Support runtimes.

Windows Runtime
Warning:
You can damage destination computers by installing the wrong version of runtime support files. Installing runtime files incorrectly can cause the end user's applications to stop running properly and can even disable the operating system. Before deploying any installations that install runtimes, get the latest runtime updates by running the Download Runtimes wizard from the Wise Installation System Help menu.

Use the Windows Runtime section of the Runtimes page to include common Windows runtime components for installing Windows 95/98/Me and Windows NT/2000/XP applications in your installation. Add these optional runtimes when the runtime is critical to the application you are deploying, and when you expect that your end users do not have the runtime installed.

To include one or more Windows runtimes in your installation, mark the appropriate checkbox or checkboxes. When you mark the DirectX checkbox to include the DirectX Media runtime in your installation, a dialog appears to let you select the version of DirectX you want to include.

100

The Description area toward the bottom of the Runtimes page provides information on the currently-selected runtime.

Crystal Reports Runtime


Warning:
You can damage destination computers by installing the wrong version of runtime support files. Installing runtime files incorrectly can cause the end user's applications to stop running properly and can even disable the operating system. Before deploying any installations that install runtimes, get the latest runtime updates by running the Download Runtimes wizard from the Wise Installation System Help menu.

Use the Crystal Reports Runtime section of the Runtimes page to include Crystal Reports runtimes in your application. For more information about Crystal Decisions Crystal Reports, visit their Web site at www.crystaldecisions.com. Crystal Reports is a software application by Crystal Decisions (formerly Seagate Software) that generates reports from a database. It is an authoring environment in which you create a report template (.RPT file) that defines the layout of the database report, including column headers, sorting, font usage, and database support. The runtime component uses the .RPT file and the database file to generate a report that you can view, print, and generate in a variety of export formats. Note:
To include Crystal Reports runtimes in your application, you must have Crystal Reports installed on your local system.

To add a Crystal Reports runtime, mark the corresponding checkbox. Click the Details button to set the following options for a selected runtime: General Crystal Reports runtime options Database access options Supported exporting formats

101

3: INSTALLATION EXPERT PAGES

Note:
The details dialog, and therefore the Details button, is not available for all Crystal Reports runtimes.

The Description area toward the bottom of the Runtimes page provides information on the currently-selected runtime.

Screen
Use this page to set the background color or gradient and font for the installation. The Screen Preview area shows how your installation screen looks based on the current selections. To display an image anywhere on the background screen, use the Custom Billboard Editor. See Creating Custom Billboards on page 337. In the drop-down list in the Background Gradient area, select whether to display a full-screen gradient, a three-quarters screen gradient, or no gradient behind the installation dialogs. Title Bar. Mark this checkbox to cause the installations title to be displayed at the top of the screen in a title bar. Hide Program Manager. Mark this checkbox to hide the Program Manager during installation (Windows 3.x only). No Background Gradient. Mark this checkbox to display no gradient behind the installation dialogs. Top Color and Bottom Color. Click the Top Color and Bottom Color buttons to use standard Windows color selectors to choose the top and bottom colors for the background gradient. The installation automatically generates a smooth transition between the two colors. Screen Preview. Displays a real-time mock-up of how the installation screen will look. Bold/Light Fonts. Select the option to always display bold or light fonts, or to use light fonts under Windows 95/98/NT and bold fonts under Windows 3.1x. Message Box Font. Select the font to be used. If you do not specify a font, a standard sans serif font is used. For a Japanese installation, specify MS Gothic. Point Size. Select the point size for text displayed in the installation dialogs. If you do not specify a point size, the standard Windows text size is used. Character Set. Enter the number of the character set to be used. Use zero, which is the default, unless your installation is in Japanese. For a

102

Japanese installation, enter 128 and make sure you have specified MS Gothic in the Message Box Font field.

Services
The Services page lets you define applications to be installed as a service under Windows NT/2000/XP. The .EXE file you define as a service must already be a part of the installation. Consult your Microsoft developer documentation for information on creating services. This page only helps you install services, not develop them. On the Services page, you can add a service to your installation by using the Add button. Before you can add the service on the Services page, you must use the Files page to add the file that runs the service. When you add the service, you also set parameters that determine how it runs. Follow the procedure below to install a file as a service on the destination computer. To add a new service item: 1. On the Files page in Installation Expert, add the .EXE file that runs the service. 2. Go to the Services page in Installation Expert. 3. Click the Add button to display the Select File from Installation dialog, which lists the .EXE files that youve added to your installation. The left list box shows the directory structure of your installation, and the right list box shows files in the selected directory.

4. Select a file from the right list box and click OK. The service appears in the list on the Services page. If you choose an .EXE file that is part of an optional installation component, the service is installed only if the end user selects the appropriate component for installation.

103

3: INSTALLATION EXPERT PAGES

To edit services: To remove an existing service, select it from the list and click the Delete button. To change the .EXE file for a service, select it from the list and click the Details button to open the Create Service Settings dialog. See Create Service Settings on page 104 for more information.

Create Service Settings


The Create Service Settings dialog appears when you click the Details button on the Services page; see Services on page 103. It lets you control the behavior of the service when it is run. Refer to your Microsoft developer documentation for information about creating services.

Service Name. Enter the name of the service. This name is used internally by the service to register itself properly in the registry, so the value you enter here must match the internal name of the service thats stored within the .EXE file. Display Name. The name that appears in the Services control panel. Executable Path. The complete path to the executable file that is the service. Specify a pathname or use variable substitution to build a pathname. You do not have to enclose the path with quotation marks, even if a long file name contains spaces. Login Username. Enter the Windows user name under which the service should run.

104

Login Password. Enter the Windows password for the user name defined above. Error Control. Select an option from this drop-down list to determine what happens if an error is reported while starting up the service. Ignore Error. Logs the error in an error log and continues. Normal Error. Displays a message to the end user, logs the error in an error log, and continues. Severe Error. Logs the error. If the last known good configuration is being started, the startup continues. Otherwise, it reboots the system with the last known good configuration. Critical Error. Logs the error if possible. If the last known good configuration is being started, the startup fails. Otherwise, it reboots the system and sets it to the last known good configuration. Group. Enter the name of the load ordering group of which this service is a member. Leave this field empty if the service does not belong to a group. Dependencies. Enter a list of semicolon-separated names of services or load ordering groups that must start before this service. Leave this field empty if the service has no dependencies. If a service is dependent on a group, it means that at least one member of the group must be started for this service to run. Enter a plus sign (+) before group names to distinguish them from service names. Services and service groups share the same name space. For example, if you enter this string, "ftpsvr;https;drc;+widget", you create dependencies on the ftpsvr and https services and the widget group. In the Service Type area of the dialog, select an option to determine whether to start the service in its own process, as a shared process, as a kernel driver, or as a file system driver. In the Start Service area of the dialog, select an option to determine when the service should be started: at boot time, when the system loads, automatically after startup, or manually. You can also set Startup to be disabled. These options correspond to options in the Services control panel. Service Interacts With Desktop. Mark this checkbox to let the service display its user interface, if any.

Shortcuts
Use this page to add shortcuts to Windows Program Manager or to the Start menu and desktop of the destination computer.

105

3: INSTALLATION EXPERT PAGES

If you added program files on the Files page, Installation Expert might have added the default application shortcuts for you. The Shortcuts page shows the Name, Location, and Source Path of the shortcuts that have been added so far. To add a shortcut to your installation: 1. On the Shortcuts page, enter the default folder name for your Program Manager or Start menu shortcuts in the Default Folder Name field. The end user can change this during installation. You must specify a folder name before you can add any shortcuts. 2. Click the Add button. The Select File from Installation dialog opens.

The list on the left is a directory browser showing the installations components and the directories within each one. The list on the right shows the program files in the selected directory. 3. In the left list box, select the directory containing the program file you want to associate with this file type. The names of all program files in that directory display in the right list box. 4. In the right list box, select the file to which you want to assign the shortcut. If you create a shortcut to a file that is in an optional component of your installation, the shortcut is created if that component is installed. 5. Click OK. The Shortcut Details dialog appears. 6. Complete the Shortcut Details dialog. See Shortcut Details on page 107 for more information. The new shortcut appears on the Shortcuts page.

106

To edit an existing shortcut: Select a shortcut from the list on the Shortcuts page and click the Details button. This opens the Shortcut Details dialog. See Shortcut Details for more information.

Shortcut Details
Click the Details button on the Shortcuts page to display the Shortcut Details dialog, where you can edit the information about a shortcut being added to a Program Manager or Start menu group. To customize a shortcut further, or to place it in a subfolder in the Start menu, go to Script Editor and double-click the Create Shortcut line within the If System Has Windows 95 Shell Interface statement.

Shortcut Name. Enter the name of the shortcut. Command Line Options. Enter the command line options that are used to open the file associated with the new shortcut . Icon Pathname. To use a custom icon, enter the path to the icon file, .EXE, or .DLL that contains the icon you want. Icon Number. Enter the resource number of the shortcut (in the shortcut file, .EXE, or .DLL specified above) to be displayed in the Program Manager or Start menu.

107

3: INSTALLATION EXPERT PAGES

Technical Note:
An executable or shortcut file can contain multiple icons. To see the icons in a file, go to Windows Explorer, right-click any shortcut file, and select Properties. Click the Shortcut tab, then click the Change Icon button. The Change Icon dialog appears. It contains a graphical list of icons for the shortcut file you right-clicked. The icon number of the first icon is 0, the icon number for the second is 1, and so on. To see the icons in a different file, click Browse and choose a different file.

Default Directory. Enter the default directory that should be set when launching the application, if it is not the directory that contains the application. Use %MAINDIR% to substitute for the directory where the application is being installed, rather than hard-coding a pathname. If you view the Properties dialog for this shortcut in Windows Explorer, the field is referred to as the Start in directory. Shortcut Pathname. Displays the pathname of the file that is opened by the shortcut. Shortcut Location. Choose where to place the shortcut: in the applications group in the Programs submenu, in the StartUp group or submenu, on the desktop, at the top of the Start menu, or directly on the Programs menu. Enable Access For All Windows NT Users. Mark this checkbox to add the shortcut to the common Program Manager group under Windows NT/2000/XP, so all end users can have access to it. This only works if the user logged in during installation has administrator privileges. Check self-repair items when this shortcut is opened. This checkbox turns on self-repair functionality for this shortcut. Typically, you turn this checkbox on for a shortcut that launches your application. To use this feature, you must configure your installation for self-repair. See Automatic Self-Repair on page 35 for a description of how to set up self-repair. Professional Edition only
Self-repair support is available only in the Professional Edition.

SmartPatch
Use this page to turn your installation into an upgrade (patch), instead of a full version installation. When you distribute installations of this type, the destination computer must contain a previous version of your application in order for the installation to be successful.

108

To create a smart patch, make sure your computer contains a copy of the old software that is being upgraded. After you specify the path to the old software, the SmartPatch feature compares the older versions of the application to the version being installed and generates a patch installation that contains only the differences between the two versions. This can result in a significantly smaller installation file. If you specify multiple previous versions, theyre upgraded no matter what version is on the destination computer. Do Not Create SmartPatch Updates. Mark this option if you wish to create a full installation and not use the SmartPatch feature. (You can also leave this feature off while testing your installation, to produce faster compiles.) Create SmartPatch Updates. Mark this option to enable SmartPatch. Error Checking. Select an option to determine when you are alerted if the file set in the old copy of the software does not match the file set in the new installation. By default, SmartPatch expects the same file names to exist in both the old and new copies of the software. You can set a different level for error checking. Select Do not display errors if you expect a significantly different file set in the new installation. Select Display error if all matching files not found to prevent errors such as specifying an empty or incorrect directory for the old software. Select Display error if any matching files not found 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 can be used by the SmartPatch feature. SmartPatch is very memory-intensive. Set this value to 2 MB less than the amount of RAM installed in your computer. Maximum Patch Compression. Mark this checkbox to compress patch files as much as possible. This takes extra time, so you should leave this checkbox unmarked during development and testing, and mark it only when creating your final distribution build.

109

3: INSTALLATION EXPERT PAGES

Directory. This list displays directories on your computer that contain old versions of your software 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. For this function to work, the directory structures of each version must match exactlyonly the top-level directory name can be different. To add a path to an old version of the software, click the Add button and select that directory in the Browse for Folder dialog. To remove a path from this list, select it and click the Delete button.

System Requirements
Use the System Requirements page to specify minimum hardware and software requirements for the installation and to set warning messages that display to the end user if the destination computer does not meet specified requirements. On this page, you can set requirements for the Windows and Windows NT versions, the screen resolution, the screen color depth, and sound support. If you designate these settings as required, the installation aborts if the requirements are not met. To set a system requirement: 1. From the list on the System Requirements page, select the item for which you want to set a minimum requirement. Windows Version: Select this if the program you are installing requires Windows 95, Windows 98, Windows Me, no version of Windows at all, or if it runs on all versions of Windows. Windows NT Version: Select this if the program you are installing requires Windows NT 4.0, Windows 2000, Windows XP, no version of NT at all, or if it runs on all versions of Windows NT. Screen Resolution: Select this if the program you are installing requires a specific screen resolution. Screen Colors: Select this if the program you are installing requires specific color settings. Sound Support: Select this if the program you are installing requires that the destination computer be capable of playing .WAV, .MIDI files, or both. 2. Click the Details buttons. The Minimum System Requirements dialog appears. This dialog varies, depending on the selected requirement.

110

3. In the top drop-down list, select the minimum system requirement for your application. Windows Version and Windows NT version. Specify the minimum version of Windows required by your program. For example, choose Windows 98 if the application runs on Windows 98, but not on Windows 95 or Windows Me. Screen Resolution, Screen Colors, Sound Support. Specify the minimum screen resolution, color palette, or audio support options your program requires. 4. From the Type drop-down list, select the appropriate option: Choose Recommended if this configuration item is not required by the program. The message you enter in the Message Text field (see below) appears on the destination computer if the computer does not meet the specified requirement, and the installation continues once the message is acknowledged. Choose Required if this configuration item is critical to the installation and the program cannot run without it. The message you enter in the Message Text field (see below) appears on the destination computer if the computer does not meet the specified requirement, and the installation is aborted. 5. In the Message Title field, enter a name to appear in the title bar of the warning message. This field is not available if the All... or Any... option is selected in the top drop-down list. 6. In the Message Text field, enter the message that you want to appear if the destination computer does not meet the specified requirement. This field is not available if the All... or Any... option is selected in the top drop-down list.

111

3: INSTALLATION EXPERT PAGES

For example, your message can inform the end user why the installation cannot run: This application requires Windows Me to run. Please upgrade. 7. Click OK.

System Search
The System Search page specifies methods by which the installation can search for and detect a previous version of your application. If you know certain files, registry values, or .INI file changes that would be present if your application was installed previously, you can use this page to search for a previous version of your application. If a previous version is installed, its directory becomes the default directory for installation of the new software. If, during the previous installation, you wrote the installation directory pathname into an .INI file or into the registry, you can search for that pathname using this page. Or, if you know of a specific file that exists only in the installation directory, you can search for that file, and get its directory. In either case, the pathname you find is put into the variable %MAINDIR%. The variable %MAINDIR% represents the default installation directory of the installation. Tips for Searching: When you search for a file, the directory that contains the file is put into %MAINDIR%. When 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, the Value Data of the Value Name is put into %MAINDIR%. If you know that the pathname ends with a file name, click the Remove File Name checkbox when configuring the registry search. 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, click the Remove File Name checkbox when configuring the .INI search. The items listed on the System Search page show the currently-defined search methods for finding the old version of the application. The installation performs the searches in the order listed until one is successful. To search for a previous version: 1. Click the Add button and select the search method from the drop-down list.

112

Search for File. Searches the destination computers hard drive and network for a specific file. Read INI Value. Searches within an .INI file for a value. You specify the .INI file name, the section name within the .INI file, and the item name. Use this only to get an .INI value that you know to be a valid pathname on the destination computer. Read Registry Value. Searches the Windows registry for the key value you specify. You specify the registry key and the Value Name. Use this only to get an .INI value that you know to be a valid pathname on the destination computer. Depending on your selection, a corresponding dialog opens so you can configure the search. 2. Enter the search criteria in the dialog. Search for File. Specify the name of the file to look for, the message to be displayed in the progress dialog while searching, the drives to be searched (local hard drives only, network drives only, or both), and the search depth. Set the search depth to zero to search the entire directory tree of the specified volumes. A search depth of 2 or 3 is recommended when searching network volumes.

Read INI Value. Choose the directory that contains the .INI file from the browser at the top of this dialog. (If the directory is not shown in this tree, select the directory it is in and click New Folder to add it.) Then enter the file name of the .INI file to be read, the section that contains the entry to be read (without the square brackets), and the item name of the entry. Mark the Remove File Name checkbox to return only the directory name if it ends with a file name.

113

3: INSTALLATION EXPERT PAGES

Read Registry Value. Choose the root key that contains the named value you want to read, then enter the name of the key and the value to be read from that key. Mark the Remove File Name checkbox to return only the directory name if it ends with a file name.

3. Click OK to save this search item. 4. Repeat the preceding steps for each search item you want to create. During installation, the searches are conducted in the order listed, until one of them returns a positive result. If none return a positive result, the default installation directory is set to the Default Directory you enter on the Product Details page.

114

To edit the previous version search list: To remove a search item from the System Search page, select it from the list and click the Delete button. To rearrange the list, use the Move Up and Move Down buttons. Searches are performed in the listed order, and the searches cease after a search returns a positive result. The edit the details of a search item, select the item and click the Details button.

Uninstall
Use this page to specify whether the installation supports the uninstall capability and, if so, to set options for controlling which files are removed by the uninstall program. The uninstall program, which is installed automatically, is named unwise.exe. Note:
Installations created in the Professional Edition of Wise Installation System contain the Repair option (in addition to Automatic and Custom) when you choose the application name in the Add/Remove Control Panel. Choosing Repair re-edits the registry and .INI files, re-installs all files, and re-self-registers files.

Use the options at the top of this page to indicate whether you want to include an uninstall routine with your installation. If you choose to add this capability, use the remaining options on this page to configure the uninstall program. Do not add support for uninstall. Mark this option if you do not want end users to be able to uninstall your application. Support uninstall. Mark this option to allow uninstall and configure the uninstall application using the other controls in this dialog. Display uninstaller background window. Mark this checkbox to display a gradient window similar to the one displayed during the installation. Top Color and Bottom Color. Click the Top Color and Bottom Color buttons to use standard Windows color selectors to choose the top and bottom colors for the background gradient. The uninstall automatically generates a smooth transition between the two colors. Uninstaller Font. Select the font to be used. If you do not specify a font, a standard sans serif font is used. For a Japanese installation, specify MS Gothic.

115

3: INSTALLATION EXPERT PAGES

Point Size. Select the point size for text displayed in the installation dialogs. If you do not specify a point size, the standard Windows text size is used. Character Set. Enter the number of the character set to be used. Use zero, which is the default, unless your uninstall is in Japanese. For a Japanese uninstall, enter 128 and make sure you have specified MS Gothic in the Uninstaller Font field. In the Commands list on the Uninstall page, you can add commands to the uninstaller. The uninstaller automatically reads commands from the Install.log file created during installation; you can add additional commands here. Click the Add button to add a new command, the Details button to edit the selected command, and the Delete button to delete a command. To add a new command: 1. On the Uninstall page, click the Add button. 2. From the Add button drop-down list, select the type of command you want to enter: Delete File(s). Use this type of command to delete additional files, such as those created by your program on first run. It is not necessary to use this command to delete files your installation created. When you select this option, the Delete File(s) dialog appears. Select the directory containing the files to be deleted, then enter the file name in the Filename field. You can use a wildcard to specify the files to be deleted from this directory. If the directory you want to delete files from is not part of the displayed directory structure, first select the directory it should be found inside, then click the New Folder button to add it. Delete Registry Keys. Use this type of command to delete registry entries, such as those created during the execution of your program. It is not necessary to use this command to delete registry entries your installation added. When you select this option, the Remove Registry Tree dialog appears. Select the registry keys to be deleted during uninstall and click OK. If the key you wish to delete is not displayed, first select the key it should be added to, then click the New Key button to add it. Execute Program. When you select this option, the Select Program to Execute dialog appears. 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

116

the Program Filename field). For best results, make sure that the program you execute has little or no user interface. The uninstall procedure should seem like a single program to the end user, even if additional programs are executed. 3. Mark the Delete in-use files during uninstall checkbox to delete even those files that are in use when the uninstall program is running.

WebDeploy
Professional Edition only
This page is available only in the Professional Edition.

The WebDeploy page provides an efficient method for creating true Internet-based installations for your software. It creates a small stub installation that, when run, automatically downloads the compressed files from a Web server as needed. To create an Internet installation, you need to provide certain information about your Internet site and the platforms you are supporting. To see an example of a script that lets WebDeploy work through a proxy server, see Using WebDeploy Through a Proxy Server on page 409. 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 doesnt support passive transfers via FTP. Some firewalls and gateways require passive FTP transfers.

To create an Internet-based installation: 1. On the WebDeploy page, select one of the following options: Add support for Internet-based Copy Local Files script action. Mark this option if you add a Copy Local Files script action that will download or upload to a Web site. If you select this option, also choose the protocol the Copy Local Files action will use. Complete support for Internet-based installation. Mark this option to break your installation into downloadable chunks and a distributable .EXE file. 2. Fill in the following fields on this page:

117

3: INSTALLATION EXPERT PAGES

Host Address. Enter the domain name or IP address of the Web or FTP host that will hold the installation files, for example, www.mysite.com. Host Username and Host Password. Enter the user name and password required to log onto the server. If this field is left blank, an anonymous logon is performed. It is a good idea to use password protection so that casual users of your Web or FTP server do not stumble across the WebDeploy files, and also to make sure that only users with the installation stub .EXE can access them. Because 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. 3. Using the File Transfer Via drop-down list, choose how you want to transfer the files: The FTP Protocol option is designed for use within an intranet, that is, 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. If you want the FTP protocol to work through a proxy server, see the workaround solution contained in the sample script PROXY.WSE, located in the Samples directory within the Wise Installation System application directory. The HTTP Protocol 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 make 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 highly recommended. 4. In the Cluster Size field, 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 should increase 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. For example, suppose you set a cluster size of 20K, and your installation has four files sized 5K, and one file sized 50K. If you set the cluster size to 20K and compile, you end up with two data files. One is

118

20K, packed with the four 5K files. The other data file, because it is bigger than the cluster size, is not split, and remains a 50K file. 5. Click the Distribute button and select the FTP Server option from the Distribution Method combo box. This recompiles your application and uploads the files to your server. 6. Fill in the server information requested. Once the files are uploaded to the server, you can test your application. WebDeploy downloads and installs only the files that a particular end user requires, skipping those files that are the same version as existing files on the destination computer. To determine which files can be skipped, WebDeploy uses Microsofts VER.DLL. If the Internet connection is interrupted during the download, WebDeploy automatically picks up where the installation was cut off when download resumes. See The WebDeploy Process on page 120. Note:
Installations deployed through WebDeploy contain a Repair option in the uninstall wizard, but the Repair option does not function.

Also see: The WebDeploy Process on page 120 WebDeploy Versus Distributing to an FTP Server

119

3: INSTALLATION EXPERT PAGES

The WebDeploy Process


Your Computer Distribution Wizard FTPs (Does not work through proxy) Your Internet Host (FTP/HTTP) Server

Phase 1: When you first use WebDeploy, you...

Develop an installation that uses

WebDeploy - If this is an update, consider using SmartPatch to create a smaller installation Configure WebDeploy by specifying location of installation files on Web Use Distribution Wizard to upload the installation

Contains the installation - The installation is copied to the host but is not used yet - The installation and its pieces are stored in an .EXE file plus files named .001, .002, and so on

Your Users Computer Your user downloads installer (HTTP Protocol)

Your Internet Host (FTP/HTTP) Server

Phase 2: Your customer does this...

Visits your web site Clicks on the installation .EXE file Downloads the installation to their Runs the installation
computer

Contains the installation .EXE and other


files

Your Users Computer installation obtains files (HTTP Protocol)

Your Internet Host (FTP/HTTP) Server

Phase 3: When the user runs the installation, it...

Presents the user with an install wizard Automatically determines which pieces of
your application are needed Downloads only the required pieces from your web host Installs the appropriate pieces of your application

Contains the pieces of your installation Contains the new installation and its
ReadMe ready for download

WebDeploy Versus Distributing to an FTP Server


There is an important distinction between building a true Internet-based installation with WebDeploy and just distributing your installation to an FTP Server.

120

WebDeploy recompiles your information into stub files and data files, but does not actually put the files on the Web for you. The stub files are designed to be distributed over the Internet, that is, they contain all the server connection information. When an end user clicks the stub file, WebDeploy connects to the appropriate Web site, checks the system on the destination computer to determine what it needs, then starts downloading files. After it has finished downloading the files, it starts the installation. When you choose the FTP Server option in the Distribution Wizard (with WebDeploy disabled), it simply copies your compiled files to the location you specify. WebDeploy and FTP server distribution can be used in conjunction with each other. However, you should use an external FTP client to upload the files to the Web, especially if you are not familiar with the FTP process. This is simply because the FTP Server feature in the Wise Installation System fully automates the upload process, so you do not have direct control over the directories to which you are installing.

WinCE Installation Pages


Professional Edition only
Windows CE installation support is available only in the Professional Edition.

A powerful feature of Installation Expert is the ability to create installations for the Windows CE platform. Windows CE is one of the standard operating systems used on portable computing devices, that is, handhelds and palmtops. Unlike standard Windows installations, Windows CE utilizes a completely different programming architecture. Because of this, it is not possible to convert an existing installation into a Windows CE installation. Windows CE installations must be created from scratch using only the dedicated WinCE pages in Installation Expert. Installation Expert provides five dedicated Windows CE pages that are used together, independent of the other Installation Expert pages. The WinCE pages let you create components, assign files to your installation, specify platform-specific information, and add shortcuts and registry keys to your installation. Once you are finished entering information on the WinCE pages, you compile your Windows CE installation for distribution as usual. Since a Windows CE installation is quite different from a standard Windows installation, this section begins with some introductory information so you can better understand the options contained on the WinCE pages. Following that, each WinCE page is documented separately.

121

3: INSTALLATION EXPERT PAGES

How Windows CE Installations Work


Professional Edition only
Windows CE installation support is available only in the Professional Edition.

Windows CE installations use cabinet files (.CAB) as a self-contained setup package to install applications onto the Windows CE platform. This allows installations from several sources, such as a desktop computer or a Web site. In the case of installations run from a desktop computer, the CE device is connected to a desktop computer (usually by a serial connection) and the installation functionality is provided by Windows CE Client software, which must be installed on the desktop computer. This software provides support for communication with the CE device and also includes the Windows CE Application Manager program, Ceappmgr.exe, which provides the actual installation environment. The Windows CE installation file must initially call the application manager program to start the installation. The application manager then oversees the copying of files to the desktop and to the CE device. For installations run directly between a Web site and the CE device, the .CAB file(s) are downloaded manually from the Web and the Wceload.exe program, stored on the CE device, is used to install the application. Note:
To install a Windows CE application, you must have Windows CE Client software version 2.2 or greater installed on the desktop computer.

The Role of Microsoft CAB Wizard


Professional Edition only
Windows CE installation support is available only in the Professional Edition.

Your installation files need to be in a certain .CAB format so they can be installed to CE devices. Installation Expert uses the Microsoft CAB wizard, CabWiz.exe, to build such .CAB files and provides a user-friendly interface for you to work with the CAB wizard. The CAB wizard works on the development side of the installation, bundling the installation files into the proper format when the installation is compiled. It does not play an active role in the installation of applications to the desktop, which is handled by the application manager program.

122

Note:
If you are interested in learning more about Microsoft CAB wizard, refer to the CAB wizard documentation or visit the www.microsoft.com Web site and search for cabwiz.

Platform Issues in Windows CE


Professional Edition only
Windows CE installation support is available only in the Professional Edition.

Unlike standard Windows PCs, which share a common architecture, Windows CE devices use a variety of processors that are not necessarily compatible with each other, so they might not be able to share the same software. For the Windows CE developer, this means that each application, including the installation itself, must be customized for each platform on which it is to run. Installation Expert provides a simple interface that lets you easily select the platforms your application supports. When the installation is compiled, a dedicated file set is created for each supported platform and stored in its own .CAB file. When the installation is run, the application manager queries the CE device and automatically installs the .CAB file that is compatible with the device. If it cannot find a compatible .CAB file, the application manager displays a message to let the end user know that the application they are installing is not supported by the CE device. Even though a separate .CAB file is created for each platform that the application supports, all of the .CAB files are wrapped up into a single setup executable. In this way, you are able to distribute a single installer file that supports multiple platforms. Note:
Windows CE installations created with the Wise Installation System can be executed on Windows CE version 2.0 or higher, and must be installed by the end user from a Windows 95, Windows 98, or Windows NT 4.0 or later operating system. Windows CE installations can only be created on Windows 98 or Windows NT 4.0 or higher operating systems.

123

3: INSTALLATION EXPERT PAGES

Building Windows CE Installs


Professional Edition only
Windows CE installation support is available only in the Professional Edition.

This procedure guides you through the process of using the WinCE pages in Installation Expert to build a Windows CE installation. 1. From the File menu, select New. The New Installation File dialog opens. 2. Select Blank Script and click OK to open a new untitled installation file. 3. On the navigation bar at the bottom of the screen, click the Installation Expert button. Make sure that All is selected in the Pages menu to display all pages in Installation Expert. 4. From the Windows CE page group, select the WinCE Components page. 5. Refer to the pages below for step-by-step instructions for completing each of the five WinCE pages. WinCE Components on page 124. WinCE Files on page 130. WinCE Platform on page 133. WinCE Shortcuts on page 137. WinCE Registry on page 135. 6. Click the Compile button to save and test your installation. Note:
If an error is detected at any stage of the compilation, the compiler stops. All files generated during the compilation process are deleted and an error message appears to indicate the nature of the error.

WinCE Components
Professional Edition only
Windows CE installation support is available only in the Professional Edition.

124

The WinCE Components Page is where you define the components for your application. A component is the smallest set of files, icons, or registry entries that can be installed or uninstalled from the CE device as a group. Every Windows CE installation must have at least one component to hold the application files and settings. Installations that contain two or more freestanding applications can benefit from being separated into two or more WinCE components.

Why Use WinCE Components?


Professional Edition only
Windows CE installation support is available only in the Professional Edition.

When building install actions for CE applications, it is important to remember that resources are very limited on CE devices. If your application contains one or more freestanding elements that could be considered optional, such as a large help file or a utility program, then it is good practice to define those elements as separate components. By doing so, end users are given the option to install or not install those features on the destination computers. Even if end users install all the components initially, they still have the option to uninstall them individually later. If your application does not lend itself to multiple components, then the whole application is treated as a single component. Therefore, you must create at least one component.

How WinCE Components are Installed


Professional Edition only
Windows CE installation support is available only in the Professional Edition.

In Windows CE installations, each component is treated like a separate application and is bundled in its own .CAB file. The way this affects the installation is demonstrated in the following example. Suppose you are building a Windows CE installation for a simple program that consists of a main application and an optional extended help file. In order to give the end user the option to not install the help file (and save precious resources), you would define two components for the installation: one for the main application and one for the help file. After assigning the appropriate files and system settings to each component, you would compile the installation, which would bundle each component in its own .CAB file.

125

3: INSTALLATION EXPERT PAGES

When this installation runs, each component behaves like a separate application and calls the application manager program, Ceappmgr.exe. Therefore, the application manager would open the first .CAB file containing the main application and proceed with the installation. When that component is installed, the application manager closes. Now the next component would re-launch the application manager and repeat the same process. From the end user's perspective, it looks as though two separate applications are being installed. However, since they are both bundled in the same setup file, they can be considered as components of a single application. The important thing is that in the end, you have the freedom to add and remove the components independent of each other.

Considerations for Setting Windows CE Installation Directories


Professional Edition only
Windows CE installation support is available only in the Professional Edition.

There are two methods for setting installation directories for Windows CE applications. By default, your installation paths are hard-coded based on the installation directory you specify for each component or file. With this method, you can install to any number of directories, including the root directory. However, this method has the following disadvantages: It limits the ability of your end users to change the installation directory. It causes problems if end users try to install your application on international versions of Windows CE. It requires you to hard-code shortcut paths for different types of Windows CE devices because they have inconsistent shortcut locations. The other method for setting Windows CE installation directories is to create a compiler variable. This maps your installation directories to predefined Windows CE directories. For instance, if you specify files to be installed inside \Program Files, the files are installed in the Program Files directory regardless of its actual name. This method supports international versions of Windows CE, however, it has the following disadvantages: It prevents you from installing files to the root directory. It limits you to installing files to a single directory. Doing otherwise can result in the files being installed to the root predefined directory path as opposed to a subdirectory of the root predefined path.

126

To map your installation to the predefined WinCE paths, go to the Compiler Variables page of Installation Expert. Add the variable _WINCE_MACROS_ and set its default value to 1. The predefined paths are as follows: \Program Files \Windows \Windows\Desktop \Windows\Startup \My Documents \Program Files\Accessories \Program Files\Communication \Program Files\Games \Program Files\Pocket Outlook \Program Files\Office \Windows\Programs \Windows\Programs\Accessories \Windows\Programs\Communications \Windows\Programs\Games \Windows\Fonts \Windows\Recent \Windows\Favorites

How to Create a WinCE Component


Professional Edition only
Windows CE installation support is available only in the Professional Edition.

Each application must consist of at least one component to store the application's files. 1. From the WinCE Components Page, click the Add button. The Windows CE Components dialog opens.

127

3: INSTALLATION EXPERT PAGES

2. Complete the fields in this dialog to define the properties of the new component. Application Name. (Required field.) Enter the name of the application you are installing. This is how the program is referenced when it is installed/uninstalled in the application managers window. Company Name. (Required field.) Enter the name of the company that developed the application. This is used to further identify the application as it is being installed/uninstalled. Setup Name. This designates what the .CAB file(s) for this component are named. All .CAB files are named according to the following structure: [Setup Name.Processor Name.CAB]. If a Setup Name is not assigned, the value of this field defaults to the Component Name. Note:
Do not place an extension on the Setup Name value or the installation generates an error message.

Platforms Supported. (Required.) On this list, check each processor on which the application can be run. At least one platform

128

must be supported. No more than 27 platforms can be supported in any single installation. When the installation is compiled, a separate .CAB file is created for each platform. When the installation is run, the application manager program (Ceappmgr.exe) queries the CE device and selects the compatible .CAB file for installation. If the CE device uses a processor other than one(s) you marked here, a message displays on the desktop indicating that the application is not compatible with the CE device, and the installation is cancelled. If the end user has selected a platform to support but there are no other entries for the platform (no files, icons, shortcuts, or registry entries), then an installation .CAB file is not generated for that platform. Empty installation .CAB files are not created or supported. Component Name. Enter a name for this component. The Component Name identifies this component to the application manager when the installation is run. If there is only one component in the installation, the Component Name can be the same as the Application Name. If multiple components are being used, name this component in accordance with the application or information it contains. For example, Widget Program, or Widget Help File. Description. (Required.) Enter a brief description to identify this component. The Windows CE Application Manager displays this description when the component is being installed or uninstalled. Install Directory. (Required.) Enter the default installation path where you want this component to be installed on the Windows CE device. Use the drop-down list to choose from the most common installation paths. This is also useful for creating an empty directory. Icon File. Specify the path to either a freestanding icon file (.ICO) or an icon source (.EXE, .DLL) that is displayed in the application manager program to identify this installation. Icon Index. If you are using an .EXE or a .DLL as the source for the icon file, enter the resource number for the icon that is to be displayed.

129

3: INSTALLATION EXPERT PAGES

Note:
An executable file or icon file can have multiple icons contained within the file. To see the icons in a file, go to Windows Explorer, right-click any shortcut file, and select Properties. Click the Shortcut tab, then click the Change Icon button. The Change Icon dialog appears. It contains a graphical list of icons for the shortcut file you right-clicked. The icon number of the first icon is 0, the icon number for the second is 1, and so on. To see the icons in a different file, click Browse and choose a different file.

Add Component to Desktop Install. If this checkbox is marked, the .INI and .CAB files will be installed into %MAINDIR% so they can be installed onto the CE device. If this checkbox is not marked, the .INI and .CAB files are not placed into the installation and will not be available for download to the CE device. Clear this checkbox only if you are going to send out the .INI and .CAB files manually, not using the Wise Installation System .EXE. Execute Application Manager to Install/Uninstall during desktop installation. Mark this checkbox if you want the installation to automatically launch the application manager program after it has copied its files to the desktop computer. Desktop Icon Name. Enter a descriptive label that displays under this component's application icon on the desktop computer. 3. Click OK. The new component is added to the WinCE Components Page. 4. Repeat the preceding steps for each component you want to create for this application.

WinCE Files
Professional Edition only
Windows CE installation support is available only in the Professional Edition.

The WinCE Files page is where you assign which files are installed under each component by the installation. Once files have been assigned, you can use the Details button to select platform support and other conditional settings for the individual files.

130

Assigning Files to the WinCE Installation


Professional Edition only
Windows CE installation support is available only in the Professional Edition.

1. If you added one or more components on the WinCE Components page, select the component you want to work with from the Component drop-down list. The files you select below are installed only if that component is installed. 2. In the upper left list box, select the folder containing your applications files, that is, the files you want to install on the CE device. The files in this folder are listed in the right list box. 3. In the lower left list box, select the destination folder where you want the files to be installed on the CE device. All files must be assigned to either the Program Files folder, a Windows folder, or a subdirectory you create. Files cannot be installed to the root directory (C:\). System level files, such as fonts and certain .DLLs, should be assigned to the appropriate Windows folder. The main system folders are already created for you, though you can add a new folder if needed. To create a new folder on the CE device, click the New Folder button and enter a folder name in the dialog. The new folder is created as a subdirectory of the current folder. 4. Assign the appropriate files to the destination folder(s). To assign individual files to the destination folder, highlight the file in the upper right list box and click the Add File button. To select multiple files, hold down the CTRL key while clicking on each file, then click the Add File button. 5. If you have files in other directories that you want to add to this component, repeat the previous steps to assign the remaining program files to the proper directory on the CE device. To review your file assignments, select a destination folder from the lower left list box. All of the files assigned to that location appear in the lower right window. To remove unwanted files from the destination folder, highlight them in the lower right list box and click the Delete File button.

131

3: INSTALLATION EXPERT PAGES

Setting File Properties for WinCE


Professional Edition only
Windows CE installation support is available only in the Professional Edition.

The Files Properties dialog gives you individual control over how each file is installed to the CE device. Each file in the installation set can have its own unique property settings, allowing it to be installed or not installed depending on the platform used by the connected CE device or the files already installed on the device. Access the File Properties dialog from the WinCE Files Page. To view or edit the properties of a single file, select the file from the lower right window of the Files page and click the Details button. To change the properties of several files, hold down the CTRL key while selecting the files from the lower right window of the Files page, then click the Details button. As you finish editing each file, click OK and the File Properties dialog automatically displays the next file in the set. The Source Pathname field shows the current file whose settings you are editing.

Source Pathname. This is the current path to the file on your hard drive. If you want to replace this file with another, click Browse to specify the path to the new file. Destination File Name. The name for the file as it is stored in the target directory (on the CE device). File Skip Options. Select an option from this drop-down list to set how you want the installation to respond if a file error occurs during the installation of this file.

132

Skip silently if error occurs. Do not install this file and do not notify the end user if an error occurs. Warn if attempting to skip. Warn an end user if an attempt is made to skip a file after an error occurs. Do not allow file to be skipped. Do not allow the end user to skip copying a file. Platform Supported. If you select a specific platform from the dropdown list, then this file is copied only when the application is installed on that platform. The All option installs the files to all of the platforms that have been selected in the Platforms Supported list on the Windows CE Component dialog on the WinCE page. Shared File. If this checkbox is marked, the file (if it is a .DLL, .OCX, or .VBX) is entered in the registry so that Windows can automatically keep track of how many installed applications are using it and prevent it from being removed until it is no longer needed. Self Register. Some files, such as .OCXs and some .DLLs, support selfregistration. If this checkbox is marked, the file registers itself in the Windows registry before it is used. Replace Existing File. From the drop-down list, select how your installation responds if the file being installed is already stored on the CE device. Always. The new file always replaces the old file. If date/time older. Replaces the file if its modification date and time are older than the new file. Never. The file is never installed if it already exists. Use this for files, such as configuration files, which should be installed if they are not present, but which might be customized by the end user and should therefore not be replaced on subsequent re-installations. Install only if file already exists. Check this option if you only want to install this file if a file of the same name already exists in the target directory of the CE device.

WinCE Platform
Professional Edition only
Windows CE installation support is available only in the Professional Edition.

133

3: INSTALLATION EXPERT PAGES

The WinCE Platform page lets you specify platform-specific installation information, such as which versions of Windows CE are supported for each processor platform. This lets you make sure that end users dont install this application onto a CE Device that it does not run on. For instance, if your application doesn't run under Windows CE 2.0 on the Mips2000 platform, you could set up that condition here. When the application is installed, the version information you enter here is checked against the version of Windows CE running on the attached CE device. If an unsupported version of Windows CE is detected, a message displays on the desktop indicating that the application (or component) is not supported by this Windows CE device. You can also set the SETUP.DLL path for a particular platform. To specify platform settings for your installation: 1. From the Component drop-down list, select the installation component for which you wish to specify platform information. The processors supported by that component are listed in the Platform list. 2. From the Platform list, select the processor for which you want to enter platform information. 3. Enter the following platform information in the fields to the right. If your application does not have minimum or maximum version restrictions, you can leave the corresponding fields blank. Minimum Version. If your application requires a minimum build of Windows CE, such as CE 1.0, then enter 1.0 in this field. This indicates that the application does not run on any version earlier than this. If you specify a minimum version, you must also specify a maximum version in the field below. Maximum Version. If your application does run on an earlier version of Windows CE but not necessarily the latest release, enter the maximum version of Windows CE that the application runs on. For example, if it is Windows CE 2.0, then enter 2.0 in this field. If you specify a maximum version, you are not required to specify a minimum version. Minimum and Maximum Build. Builds are intermediate releases that occur between major version releases. These fields work in accord with the Version fields above. For example, your full Windows CE version number might read: 2.1.03. In this case, 2.1 is the version number and the build is .03. If your application only runs on a particular build of the version you specified above, enter the Minimum and Maximum build information here.

134

Note:
If you specify a minimum build, you must also specify a maximum build. However, if you specify a maximum build, you are not required to specify a minimum build.

Setup Dll Path. This .DLL is called (executed) during the installation. Information regarding the Setup .DLL Path is subject to change. Refer to Chapter 10 in the Microsoft Windows CE Programmer's Guide, published by Microsoft Corporation for the latest standards (ISBN# 157231-643-8) or the Windows CE SDK help files. 4. Repeat the preceding steps for each component and platform for which you want to specify Windows CE platform information.

WinCE Registry
Professional Edition only
Windows CE installation support is available only in the Professional Edition.

The WinCE Registry Page lets you add new registry keys or update existing registry values on the Windows CE device during the installation. The left list box shows a list of keys that can be modified on the Windows CE device. The right list box shows the value assigned to any new key selected on the left. To add a new registry key: 1. From the Component drop-down list, select the component to be associated with this registry entry. This registry entry is made only if this component is installed. 2. In the left list box, select the key to which you want to add a new key value. 3. Click the New Key button. The Registry Key Settings dialog opens.

135

3: INSTALLATION EXPERT PAGES

4. Specify the values for the registry key you want to add or update. Root. Select the parent key in which this key is added. Key. Enter the name of the key you want to create or update. You can create multiple hierarchical keys at once by separating them with backslashes, as in directory path names. For example, a key of Protocol\StdFileEditing creates the StdFileEditing key inside the Protocol key. Any keys you specify that do not exist are created automatically. Value Name. Enter the name of a new named value. Data Value. Enter the data for the value. If the Data Type (below) is Double word (DWORD), the data should be in decimal notation. To insert multiple lines of data here, hold down the CTRL key and press the ENTER key to begin a new line. Data Type. Select the type of data contained in the named value. Available types are as follows: String (REG_SZ prefix) indicates that a value entry is an expandable string. If you want to embed a variable name, (such as %WIN%), you must enclose it with double percents (%%WIN%%). If you only enclose it in single percents, then the variable name is expanded to its actual value. This allows Windows NT4/2000/XP system variables to be embedded. Multiple strings (REG_MULTI_SZ prefix) identifies a value entry as a multiple string. These are multiple pieces of text, separated by carriage returns. Binary/Hex (REG_BINARY prefix) List of numeric values separated by commas. Two bytes per field. Do not use the 0x hexadecimal prefix.

136

Double word (REG_DWORD prefix) identifies a value entry as a 4 byte (DWORD) entry. This can be in hexadecimal format and must be a valid DWORD value. Platform Supported. Use this field to make this registry key platform dependent. If you select a processor from this list, this registry key is added only to CE devices running on that platform. Don't Overwrite if key already exists. If you clear this checkbox, this registry value overwrites the existing key value on the Windows CE device (if it exists). If you mark this checkbox, this registry setting does not overwrite the existing key value. 5. Click OK. The key value is added to the WinCE Registry Page. After you have added a new key value, you can edit it by selecting the key name from the left list box and double-clicking on the value in the right list box. This re-opens the Registry Key Settings dialog. To remove an entire key from the left list box, select the key to remove and click the Delete Key button. To remove a key value from the right list box, select the value to remove and click the Delete Value button. 6. Repeat the previous steps to create additional registry entries for this component, or other components.

WinCE Shortcuts
Professional Edition only
Windows CE installation support is available only in the Professional Edition.

The WinCE Shortcuts page lets you determine shortcut icons to be installed on the Windows CE device, giving direct access to your application. To add a shortcut to your installation: 1. From the Component list, select the component for which you want to create a shortcut. 2. On the WinCE Shortcuts page, click the Add button. The Windows CE Shortcut Properties dialog opens.

137

3: INSTALLATION EXPERT PAGES

3. Source Path. Click Browse and select the file from your installation to which you want to create a shortcut. 4. Shortcut Name. Enter a text label that you want to appear underneath the shortcut icon. 5. Shortcut Location. From the drop-down list, select the path where the shortcut is to be installed on the CE device. Use the drop-down list to select from the most common locations for Windows CE shortcuts. The default setting is the Programs folder on the Start menu. 6. Platform Supported. Designate that this icon only be created when the application is installed on the specified platform. If the file associated with the shortcut is being installed to all platforms, than you can use the All option to create the shortcut for all platforms. Do not use the All option with a file that is being installed to a particular platform. 7. Click OK. 8. Repeat the above steps for each additional shortcut you want to add.

WiseUpdate
Professional Edition only
This page is available only in the Professional Edition.

For information on using WiseUpdate, see Using WiseUpdate on page 373.

WiseUser
The WiseUser page appears if you have WiseUser installed. WiseUser is a separate Wise Solutions product that manages installations on shared workstations. See the separate WiseUser Reference Manual for details.

138

Chapter 4

Script Editor
Script Editor provides a powerful yet easy-to-use scripting environment. Every installation is driven by a script that specifies how to display dialogs, edit the .INI files, add registry entries, and more. The script is compiled, along with all the files and other resources in the installation, into an installer .EXE file. When an end user launches the installer .EXE, the script runs, executing all the actions specified in the script. Script Editor is easy to work with even if youve never programmed before. You dont need to memorize commands, because Script Editor supports a point-and-click method of scripting. Just double-click the action you want to add to your script or just start typing the action name, then fill out options for the action. A new script line based on the action and the options you entered appears in the script at the location of the last selected script line. The resulting script is displayed in clear English-like statements. You can use Script Editors built-in debugger to help test and troubleshoot your script. Debug menu commands let you single step through a script, set breakpoints, and view the values of variables during execution. In this section, youll learn about: Working in Script Editor. Creating User-Defined Actions. Debugging Scripts. Scripting Guidelines.

139

4: SCRIPT EDITOR

Working in Script Editor


Script Editor provides a scripting environment where you can add advanced functionality to your script. The script is just another way of looking at your installation. When you create a new installation by clicking Empty Project in the New Installation File dialog, Script Editor is automatically populated with a default script. The default script is based on the template file Empty Project.wse in the Template directory (inside the Wise Installation System application directory). Conversely, if you create a new installation by clicking Blank Script in the New Installation File dialog, Script Editor is empty. Some lines in the script correspond directly to options on pages in Installation Expert. This is because options on some pages in Installation Expert automatically generate script lines in Script Editor. For instance, on the Product Details page in Installation Expert, suppose you enter MyInstallation in the Installation Title field. This option generates the following line in the script:

Set Variable APPTITLE to MyInstallation


Because pages in Installation Expert generate script lines, Script Editor attempts to apply a default script based on Installation Expert pages whenever you switch from Script Editor to Installation Expert. If you create a new blank script, add some script lines, then attempt to go to Installation Expert, you see a warning that your script must be converted. The conversion process deletes the script lines you added to the blank script. To go to Installation Expert without converting your script, select Installation Properties from the Edit menu. This switches you to Installation Expert, but instead of seeing all steps you see a subset of steps that do not affect the script in Script Editor.

140

WORKING IN SCRIPT EDITOR

The Script Editor Window


To access Script Editor, click the Script Editor button at the bottom of the window.

The Script Editor window contains all the tools necessary to develop and edit scripts. It contains the installation script and include scripts, tabs for easy switching between the scripts, toolbars with script editing tools; and a list of actions you can use to create new script lines. Each element of the Script Editor window is described below. Right-Click Menu. Right-click actions or script lines to perform common operations. Menu. Use commands on menus to perform editing functions on script lines, and to compile, test, run, and debug your script. Toolbar. The toolbars at the top of the window provides quick access to common Script Editor tasks, including editing and debugging functions. Hold your pointer over a tool to see its name. From the View menu, select from the Toolbars submenu to show and hide toolbars. Title. Enter the name of this script in the Title field. By default, it is the name entered in the Installation Title field on the Product Details page in Installation Expert followed by the word Installation. If you change the title of the script here, it does not change on the Product Details page. When you run your setup program, this name appears in two places: at the top of the splash dialog (the Initializing Wise Installation Wizard dialog), and in the title bar of the setup program screen.

141

4: SCRIPT EDITOR

Event. Use this drop-down list to specify which script you want to edit. The Mainline script is the script that typically contains installation instructions. See Choosing a Script to Edit on page 143 for more details. Language. Use this drop-down list to specify a language. All the languages your installation supports, which you set on the Languages page in Installation Expert, appear in this drop-down list. Each time you add a script line that presents user interface (UI) elements to the end user, such as the Display Message or Prompt for Text actions, you must edit the script line in every supported language. For instance, suppose you set your installation to support French and English on the Languages page in Installation Expert. While in the U.S. English script, you add a Display Message script line that states, Do you want to view the ReadMe file now? You then test your installation and you immediately see an alert message that says you havent specified a title for French in a message box. This happens because if you add an action in one language, the same action is automatically added in the other supported languages, but the options for the other supported languages are not filled out. To avoid these error messages, whenever you add a script line that presents any kind of text to the end user, immediately go to each language in the Language drop-down list, and edit that script line so it contains the translated text. To automatically copy the text to every supported language, mark the Copy Default checkbox on the Languages page in Installation Expert. The dialogs that ship with the Wise Installation System are pre-translated for you, so you do not need to edit those. Actions. The Actions list contains all the actions you can add to your script. Click the Standard tab at the bottom of the list to see all possible actions. Click the Custom tab to see a list that you can customize to contain only those actions you use more frequently. See Checking for Duplicate Files in Include Scripts on page 150. Installation Script. The Installation Script area of the page contains the script that is executed when an end user runs your setup program. You can edit any script line by double-clicking it, and you can copy and paste script lines by using the editing commands on the Edit menu. Script lines are color-coded based on the type of the script line. To change the color code, see Setting Preferences on page 43. The default color code is as follows: Logic items - blue Remarks - green Install/Copy File Items - black Compiler Variable Items - gray

142

WORKING IN SCRIPT EDITOR

Include Script Items - black New Variable Values - red Tabs. A tab is displayed for each include script you add, to facilitate switching between scripts. See Choosing a Script to Edit. To show or hide tabs for Wise include scripts, change the Show Tabs for Wise Include Scripts checkbox in Preferences; see Setting Preferences on page 43.

Choosing a Script to Edit


In addition to the main installation script, each script contains areas for Exit and Cancel scripts, which are accessible from the Event drop-down list above the installation script. Each main installation script can also contain one or more included files, which appear in tabs along the bottom of the installation script. The event script areas are just that: areas in which a script can be added to handle the events of the end user canceling the script or the installation being exited. Included scripts, however, are different; they are scripts that have been added to the main installation script by Include Script actions. During runtime, these are run in the same fashion that a function is run during the execution of programming code. When you open a script using the Open command from the File menu, that script is considered the main installation script, and is on the first tab. Changes in the main installation script are reflected in Installation Expert, and vice versa. When you do a text search, all event scripts are searched, and you can mark a checkbox to also search all include scripts. The Duplicate Files Report menu command also operates on all event scripts and all include scripts.

Working With Event Scripts


Each main installation script always contains placeholders for Cancel and Exit scripts. The code in the Exit and Cancel script areas is run in the event that the installation is exited or canceled. The Cancel script area, by default, already contains an include script called rollback.wse, which rolls the destination computer back to its pre-installation state if the end user cancels. Choose a type of script to edit by selecting it from the Event drop-down list in Script Editor. There are three types of script you can select: Mainline. The primary script, the one thats executed during the normal installation process. Exit. The script thats executed when the installation is complete, or when an Exit Installation script command is executed. Also, if you create

143

4: SCRIPT EDITOR

your own user-defined action, you store the custom dialog for it in the Exit script. Cancel. The script thats executed when the end user cancels the installation. Because some files might already have been installed when the end user cancels, the Cancel script contains the include script, rollback.wse, which returns the destination computer to its preinstallation state.

Working With Include Scripts


Include scripts are scripts that are added to your installation by way of an Include Script action. Scripts can be included either in your main installation script, or in other include scripts. During runtime, included scripts are run when the Include Script action that references them is encountered. Included scripts are added to your installation by way of an Include Script action; see Include Script on page 248. For each Include Script action in your script, a new tab appears at the bottom of Script Editor. By default, all scripts based on the Empty Project template in the New Installation File dialog already include two scripts: rollback.wse and uninstal.wse. Scripts that are added automatically, such as rollback.wse, uninstal.wse, and runtime scripts, are special Wise-created scripts. They appear only if you click the Show Tabs for Wise Include Scripts checkbox in Preferences. The rollback.wse script, by default, is in the Cancel event script (accessible from the Event drop-down list.) It is executed only 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.

Editing the Script


Use the commands on the Edit menu, the right-click menu, or the tools on the toolbar to edit your script. You can edit only one script line at a time, but you can cut, copy, or paste several lines at one time. To edit an include script, select it by clicking its tab. Note:
Any changes you make to an include script are saved to that script when you save your installation.

144

WORKING IN SCRIPT EDITOR

To edit the parameters of a script line: Double-click a script line. For most script actions, a dialog opens so you can configure its options. If it is a custom billboard or custom dialog script line, the appropriate editing environment opens. To select script lines: To select one script line, click the line. To select multiple consecutive lines, use SHIFT-click. To select multiple non-consecutive lines, use CTRL-click. To duplicate script lines: Select the script lines, then select Duplicate from the Edit menu. To delete script lines: Select the script lines, then press the DELETE key. To move script lines: Select the script lines, then select Move Up or Move Down from the Edit menu. To copy and paste script lines: 1. Select the script line or lines. 2. From the Edit menu, select Cut or Copy. 3. If youre copying the lines to another installation, open that installation script in Script Editor. You cannot open multiple scripts in the same instance of the Wise Installation System unless it is an include script. See Working With Include Scripts on page 144. If you are working with include scripts, use the tabs at the bottom of the Script Editor window to switch from one script to another. You can also open multiple instances of the Wise Installation System, and open different scripts in each. 4. Select a line in the script above which you want to place the lines you copied, then select Paste from the Edit menu. The lines appear above the line you selected. Note:
If you want inserted lines to appear below the line you selected, mark the Append New Items checkbox in Preferences, as described in Setting Preferences on page 43.

145

4: SCRIPT EDITOR

To save a script to a text file: From the File menu, select Save Script Text to File. Browse to the directory where you want to save the file and enter a file name. This text file is for viewing and printing only; you cannot make changes in the text file and import it back into Script Editor. To show or hide line numbers: From the right-click menu, select Line Numbers. To show or hide connection lines: From the right-click menu, select Connection Lines. Connection lines connect the beginning and end of an if-block or a loop. They show along the left of the script lines that make up an if-block or a loop.

Adding New Actions to a Script


Add actions to a script in one of three ways: Drag an action from the Actions list onto a line in the installation script area. The new action appears before the line that is highlighted when you drop the action. Select the line in the script above which you want the new action to appear, then double-click the desired action in the Actions list. Select the line in the script above which you want to add a new line. Start typing the first few letters of the action name. As you type, the current line becomes a drop-down list with all the action names, and the action that most closely matches the letters you typed is the current item in the list. You can use the arrow keys to move up and down the list or continue typing the action name, and when the action you want is the current item in the list, press the Enter key. The lines appear above the line you selected. Note:
If you want inserted lines to appear below the line you selected, mark the Append New Items checkbox in Preferences, as described in Setting Preferences on page 43.

146

WORKING IN SCRIPT EDITOR

After you add the action, a dialog appears that lets you set the parameters for the action. If the new action does not require any parameters, a dialog does not appear, and the action appears in the script. If the new action is a Custom Dialog or Custom Billboard action, the appropriate editing environment opens. For more details on actions, see WiseScript Actions on page 173. Some actions come in pairs. For example, when you add an If action, you must also add an End action at the end of the conditional block. Script Editor automatically indents actions inside such structures. To see connection lines between matching actions, select Connection Lines from the right-click menu.

Commenting Out Script Lines


While you are working with a script, you might want to temporarily disable certain script lines to help you with your debug process. You do this by commenting out lines of the script. Commented lines remain in the script, but are skipped when the script is executed. Actions that have been commented out appear in green. To comment out a script line: 1. Select the line or lines in the script that you want to disable. 2. Select Comment from the Edit menu. The commented lines appear in green. To reactivate commented lines, select them again and select Comment a second time.

Finding Text in a Script


Use the Find command to find lines in the script that contain a particular string of text. This command searches not only the visible text in the script lines, but also the parameters and options in the configuration dialogs associated with each script line. If you dont see your search text in the found script line, double-click the line to see the text. The Find command searches from the currently-selected line down to the last line. To search the entire script, you must click the first line of the script before starting the search. If you see a message that the text was not found and you know the search text exists, then select the first line of the script before searching again. To find text in your script: 1. From the Edit menu, select Find. The Find Text in Installation Script dialog appears.

147

4: SCRIPT EDITOR

2. In the Find What field, enter the text you want to find. Use the ? wildcard to represent any character. 3. To search for the text across all scripts, mark the Search Across Include Scripts checkbox. For information on include scripts, see Working With Include Scripts on page 144. 4. Click the Find Next button. The bottom section of the dialog shows the script line that contains the text for which youre searching, along with the complete text item in which the search text was found.

A message indicates if the search text was not found. 5. To view the script that contains the found text and its parameters, close the Find Text in Installation Script dialog and double-click the script line. 6. Click the Find Next button to find the next occurrence, or click Close to close the dialog.

148

WORKING IN SCRIPT EDITOR

Tip:
To view the parameters of a script line while you are searching, enter the search text in the Find Text in Installation Script dialog, click the Find Next button one time, and click Close. Then press F3 to find subsequent occurrences of the search text. A message dialog informs you when the search has reached the end of the script.

Replacing Text in a Script


Use the Replace command to find a string and replace it with a new string. You can only replace parameters and options that you have access to change through a configuration dialog. You cannot replace names of actions or other non-editable text. The Replace command searches from the currently-selected line down to the last line. To search the entire script, you must manually select the first line of the script before starting the search. If you see a message that the text was not found, and you know the search text exists, then select the first line of the script before searching again. To replace text in your script: 1. From the Edit menu, select Replace. The Replace Text in Installation Script dialog appears.

2. In the Find What field, enter the text you want to find and replace. Use the ? wildcard to represent any character. 3. To search for the text across all scripts, mark the Search Across Include Scripts checkbox. For information on include scripts, see Working With Include Scripts on page 144. 4. Click the Find Next button.

149

4: SCRIPT EDITOR

The bottom section of the dialog changes to show you the script line that contains the search text along with the word in which the search text was found. You cannot double-click the found line to view its parameters while the Replace Text in Installation Script dialog is open.

A message indicates if a search text was not found. 5. Click a button to find again, replace, or stop replacing: Click the Find Next button to leave the found text untouched and to find the next occurrence of the search text. Click the Replace button to replace the found text with your replacement text, and to find the next occurrence of the search text. Click the Replace All button to replace all occurrences of the search text. Use this option with caution! The text you are searching for might be found in more places than you expect. You cannot undo this operation. Click Close to close the dialog when you are done replacing. When no more occurrences of the search text can be found, the search dialog closes automatically.

Checking for Duplicate Files in Include Scripts


You can check your scripts for the existence of duplicate files. Files are considered duplicates if their source paths are identical. You might have duplicate files if your main script contains Install File(s) script lines, and if it references include scripts that also contain Install File(s) script lines. In that case, the same file might be referenced in both the main script and the include script. To determine if your script has this problem, use the Duplicate Files Report menu command. It checks the main installation script and all include scripts for duplicates.

150

WORKING IN SCRIPT EDITOR

To check for duplicate files in include scripts: 1. Go to Script Editor. 2. From the Edit menu, select Duplicate Files Report. If no duplicate files are found, a message appears telling you that no duplicate files were located. If duplicate files are found, the Save As dialog appears. 3. If the Save As dialog appears, type a name for your duplicate files report and click Save. Notepad opens displaying the duplicate files report. It might look something like this:

c:\export.txt Line: 1 File: c:\include2.wse Line: 49 File: c:\MyInstaller\MainInstall.wse


In the sample duplicate files report above, the file that is duplicated is on the first line. It is C:\export.txt. The next lines list the instances of duplication. In this sample, line 1 of the file include2.wse and line 49 of the file MainInstall.wse reference export.txt. The file include2.wse is an included file inside the MainInstall.wse script.

Customizing the List of Actions


In Script Editor, you can view the standard list of all available actions, or you can set the Custom tab to display a subset of actions that you use most frequently. You can also rearrange the list so that the actions appear in the order you choose instead of in alphabetical order. To set up a custom action list: 1. Select Custom Action List from the Edit menu. The Custom Action List Settings dialog appears.

151

4: SCRIPT EDITOR

2. Create your custom action list: To add an action to the custom action list, select an action in the Actions list, then click the Copy button. To delete an action from the custom action list, click the action in the Custom Action List, then click the Delete button. To reorder the custom actions, in the Custom Action List, select the action you want to move, then click the Move Up or Move Down button. 3. Click OK when you are finished. You can customize your Actions list further by creating your own userdefined actions. See Creating User-Defined Actions.

152

CREATING USER-DEFINED ACTIONS

Creating User-Defined Actions


Script Editor contains a list of built-in actions that you can add to your script and it lets you create your own actions. For example, you can streamline your development process by creating actions for the tasks you perform most frequently with scripting. For example, suppose that youve written a section of script that launches a Web page on your companys Web site. Some of the script lines do a registry lookup to determine the default browser on the destination computer, and other lines open the browser to the specified URL. Suppose that for each installation you create, you copy this section of script from an old installation script to your new one, then change some of the options, such as the URL. To make the functionality in this section of script conveniently available in all new installations that you develop, you could simply turn the section of script into your own user-defined action.

About User-Defined Actions


User-defined actions appear in the Actions list in Script Editor along with the built-in script actions. You create a user-defined action by creating a separate WiseScript and saving it in the Actions directory in the Wise Installation System application directory, or in the directory specified in the Shared Directory field in Preferences. There are four things you specify in the script when you create an action: the action name, the dialog that appears when your action is double-clicked, the script lines that perform the action, and the format of the script line as displayed in the script. The action name is simply the file name of the script you save in the Actions or user-defined shared directory. The dialog is optional; include a dialog only if your action has parameters that you need to change each time you use the action. For an action that opens an URL in the users browser, you might include a dialog that asks for the URL. Then if the URL changes frequently, you simply specify the new URL each time you use the action. The script lines that perform the action are the functional part of the action. For an action that opens a URL on the destination computers browser, these are the lines that determine the default browser and launch the Web page. The format of the script line refers to how the script line looks after you add the action to your script. You enter a combination of text and variables to determine the format.

153

4: SCRIPT EDITOR

For example, suppose that your user-defined action displays an HTML file on the Web. In your action, a dialog asks for the URL to the file, and the URL is put in the variable URL_PATH. For this example, you might enter the following in Title field:

Display HTML File %URL_PATH%


When you later use your user-defined action by adding it to an installation script, the dialog appears and you enter www.wisesolutions.com/ support.htm for the URL. The script line for your user-defined action displays in the format you specified, except that it shows the variables value instead of the variable name. For example, it displays:

Display HTML File www.wisesolutions.com/support.htm

Creating a User-Defined Action: Procedure


The procedure below outlines the general steps you take to create your own action. It does not contain details on what kind of action to create, or what to enter for the four parts of the user-defined action. For a tutorial in which you actually create and test a user-defined action, see Creating a User-Defined Action: Tutorial on page 156. To create a user-defined action: 1. Select New from the File menu. The New Installation File dialog appears.

2. Click Blank Script and click OK.

154

CREATING USER-DEFINED ACTIONS

If you see a warning message that the installation script is not compatible with Installation Expert, click OK, and otherwise ignore the warning. In Script Editor, you should see a completely empty script. If you do not, you might have clicked Empty Project instead of Blank Script. 3. Save the script in your Actions directory, which is located in the Wise Installation System application directory, or in the shared directory specified in Preferences. The name of the script is the name of the action in the Actions list in Script Editor. It appears in the Actions list after you exit the Wise Installation System and re-open it. 4. If your user-defined action includes a dialog where you can enter options for the action, first create the dialog. In Script Editor, select Exit from the Event drop-down list (located below the toolbar). Add a Custom Dialog action to the Exit script, and create your dialog in Custom Dialog Editor. Technical Note:
If you want to add a drop-down list in your custom dialog that contains all the WiseScript variables currently defined in this script, set the list to display the compiler variable %_VAR_LIST_%. It contains all the non-compiler variables.

Return to the main script by selecting Mainline from the Event drop-down list. 5. Next, in the main script, add script lines that perform the functionality of your user-defined script action. This might be something as simple as a single line that calls a .DLL, or could be a complex set of script lines that perform advanced functionality. 6. In the Title field in Script Editor, enter the format of the script line. The Title field determines how the script line for your user-defined action looks in the script. See About User-Defined Actions on page 153 for more details. 7. Save the script. Make sure it is saved in the Actions directory or in the shared directory specified in Preferences. 8. Test your new user-defined action: Exit the Wise Installation System. The new action is not displayed in the Actions list until you exit and re-open the Wise Installation System.

155

4: SCRIPT EDITOR

Open the Wise Installation System and create a new Empty Project. In Script Editor, look for the new user-defined script action in the Actions list. Its name is the same as the file name of the script you saved in the Actions or shared directory. Double-click your user-defined action in the Actions list. If it includes a dialog, the dialog opens. Fill out the dialog and click OK. Click the Test button to see if the action does what you want it to do.

Creating a User-Defined Action: Tutorial


The tutorial in this section guides you through the process of actually creating your own user-defined action. By following the four procedures below, you create a user-defined action named Wait. The Wait action contains a custom dialog where you can specify how many milliseconds you want the installation to pause. The main script of the Wait action contains a Call DLL statement that accesses a function in a Windows system .DLL that causes the current application to stop execution for a specified period of time. See the procedures of the tutorial in the following topics: Creating a New Blank Script for Your Action on page 156 Creating a Dialog for Your Action on page 158 Writing a Script for Your Action on page 159 Testing Your Action on page 160 Note:
You must follow all four procedures in sequence to create a new user-defined action.

Creating a New Blank Script for Your Action


1. Select New from the File menu. The New Installation File dialog appears.

156

CREATING USER-DEFINED ACTIONS

2. Click Blank Script and click OK. If you see a warning message that the installation script is not compatible with Installation Expert, click OK, and otherwise ignore the warning. In Script Editor, you should see a completely empty script. If you do not, you might have clicked Empty Project instead of Blank Script. 3. Select Save from the File menu. The Save As dialog appears. 4. Navigate to the Actions directory, which is located inside the Wise Installation System application directory, or to the shared directory specified in Preferences. Enter Wait in the File name field, and click Save. You must save user-defined actions in the Actions directory or in the shared directory specified in Preferences for them to appear in the Actions list in Script Editor. Whatever you enter as a file name is the name that appears in the Actions list in Script Editor. However, the action name does not appear in the Actions list immediately; you must exit the Wise Installation System and re-open it before the action name appears in Script Editors Actions list. Do not do this now, however; go on to the next part of the tutorial: Creating a Dialog for Your Action.

157

4: SCRIPT EDITOR

Creating a Dialog for Your Action


Continue creating your user-defined script action by creating the dialog that appears if your script action is double-clicked in the Actions list. Complete this procedure only after youve followed the procedure in Creating a New Blank Script for Your Action. If you write a script action that interacts with the developer who uses it, then you must add the user interface part of the action, in the form of a Custom Dialog script line, into the Exit script. A user-defined action does not necessarily require a dialog. In the steps that follow, you create a dialog where parameters for the action are entered. 1. From the Event drop-down list (located under the toolbar), select Exit.

You must store dialogs for user-defined actions in the Exit script. 2. In the Actions list, double-click the Custom Dialog action, enter the text Enter Time to Wait in the Dialog Title field, and click OK. 3. Click the Static Control tool on the toolbar, and in the Static Control Properties dialog that appears, enter Milliseconds to Wait in the Text field, then click OK. 4. Click the Edit Text tool on the toolbar, and in the Edit Text Properties dialog that appears: Enter %WAIT_TIME% in the Default field. Enter WAIT_TIME in the Variable field. Click OK. 5. Click the Push Button tool on the toolbar, and in the Push Button Properties dialog that appears: Enter OK in the Label field. Mark the Return to Previous Dialog option under Action. Mark the Default Button checkbox. Click OK. 6. Click the Push Button tool on the toolbar, and in the Push Button Properties dialog that appears: Enter Cancel in the Label field. Mark the Abort Installation option under Action. Click OK. 7. Rearrange the dialog so that it looks something like this:

158

CREATING USER-DEFINED ACTIONS

8. When you are done editing the dialog, select Save Changes and exit from the File menu. Now you have created the dialog that appears when your action is doubleclicked in the Actions list. The next step to creating a custom action is to add a script in the main script area. See Writing a Script for Your Action.

Writing a Script for Your Action


Continue creating your user-defined script action by writing the main script. You enter the functionality of the action in the main script. Complete this procedure only if youve followed the procedures in Creating a New Blank Script for Your Action and Creating a Dialog for Your Action. For the Wait action, you write a very simple script. The script calls kernel32.dll, a Windows system .DLL that contains a function that stops execution of the current application for the specified number of milliseconds. Technical Note:
Kernel32.dll is a Windows system .DLL that contains many common functions. To learn more about calling Windows system .DLLs, consult documentation provided as part of the Microsoft Developer Network (msdn.microsoft.com).

1. From the Event drop-down list, select Mainline to return to the main part of your script. The script should be blank. 2. In the Actions list, double-click the Call DLL Function action, and in the Call DLL Function dialog that appears: Enter %SYS32%\kernel32.dll in the DLL Pathname field. Enter Sleep in the Function Name field. Mark the Call a function with variable parameter list option. Click the Add button, and in the DLL Parameter Settings dialog that appears: Select dword from the Parameter type drop-down list.

159

4: SCRIPT EDITOR

Select Constant from the Value Source drop-down list. Enter %WAIT_TIME% in the Constant Value field. Click OK. Click OK in the Call DLL Function dialog. 3. In the Title field (located above the Actions list), enter the following text:

Wait %WAIT_TIME% Milliseconds


The text you enter in the Title field determines how the script line looks in the script. 4. Save changes in your script. It should already be named Wait.wse and should be located in the Actions directory within the Wise Installation System application directory or in the shared directory specified in Preferences. You can now test your action. See Testing Your Action.

Testing Your Action


Now that youve created your action, you are ready to test your action. Complete this procedure only if you created the Wait action by following procedures in Creating a New Blank Script for Your Action, Creating a Dialog for Your Action, and Writing a Script for Your Action. 1. Exit the Wise Installation System. You must completely exit the application so the new action appears in the Actions list the next time the Wise Installation System is launched. 2. Open the Wise Installation System and create a new empty project. An empty project contains a default script in Script Editor. 3. In Script Editor, scroll to the bottom of the Actions list and make sure that the Wait action appears there. If it does not, you might not have saved the Wait action into the Actions directory within the Wise Installation System application directory, or the directory you saved it in might not be specified in Preferences. 4. In the script area, click the top line in the script. 5. In the Actions list, double-click the Wait action. The dialog you created for your user-defined action appears.

160

CREATING USER-DEFINED ACTIONS

6. Enter 9000 and click OK. A new script line appears in your script that looks like this:

Wait 9000 Milliseconds


A millisecond is one-thousandth of a second, so 9000 milliseconds equals nine seconds. 7. Click the Test button to test your script. When the blue screen appears, you notice that it is about nine seconds before the installers Welcome dialog appears. You could place the Wait action anywhere in the script where you want a pause in the script execution. For instance, if you want a particularly detailed billboard to display for several seconds, you could place a Wait action immediately after the Display Billboard script line. If the action appears not to work, check the options you filled out for the Call DLL statement. If you still cant get it to work, open the Pause.wse file located in the Actions directory and look at its parameters; the Pause action is identical to the Wait action you just created.

161

4: SCRIPT EDITOR

Debugging Scripts
Once you have created or modified a script, you are ready to test it. You can do this either by using the Test or Run buttons on the navigation bar, or by using the more flexible capabilities available in Script Editor. In Script Editor, you can go beyond the capabilities of the Test and Run buttons to actually debug your installation. You can view the script and the values of variables while you use Script Editors tools to single-step through a script or to run to a breakpoint. You can also use Display Message and Compiler Variable actions that let you generate a debug version when you compile. You can: Use debugging tools to single-step through a script or run to a breakpoint, viewing the script as you do so. View the value of variables as the installer .EXE runs. Build a debug installation with your own custom debug messages.

Using the Script Debugger


Script Editor has a simple set of debugging tools that let you step through your script to make sure its doing what you expect. When you run your installation in debug mode, you can see exactly what the script is doing at any time, as well as the values of any variables that have been set.

162

DEBUGGING SCRIPTS

Before debugging, you can optionally set a breakpoint at a specific script line by selecting the line and selecting Set Breakpoint from the Debug menu. To begin debugging, select Go from the Debug menu. Your installer .EXE file launches, and in a moment Script Editor appears with a yellow arrow displayed next to the first line of your script. At this point, you can choose one of the following options from the Debug submenu: Single step through the script by selecting Single Step from the Debug menu. Select Go again to proceed with the installation at full-speed until the next breakpoint. Then Script Editor re-appears, with the arrow beside the next action to be processed. Set a new breakpoint by clicking the action at which you want the installation to stop, then selecting Set Breakpoint from the Debug menu. Breakpoints are the places in your script where you want to temporarily halt execution. For example, if you know that the first 30 lines of your script are working properly and you want to test the next 10 lines, you might set a breakpoint at line 31. Execute only the script action with the arrow next to it by selecting Single Step from the Debug menu. The action is processed, the arrow moves to the next line, and Script Editor waits for another command. Edit a script action by double-clicking it, or use any of the other methods for changing a script described in Working in Script Editor on page 140. Changes you make are not reflected in the installer .EXE that is currently running, but it is easier to correct script errors immediately after you find them, rather than waiting for the installer to finish. The debugger asks whether you want to stop the installer .EXE after you edit an action. Inspect or modify variables. The list that normally contains actions now contains variables and their values. You can edit a variables value by double-clicking it in this list. Exit the installation and resume normal Script Editor operation by selecting Stop Debugging from the Debug menu.

163

4: SCRIPT EDITOR

Building a Debug Version


You can use a compiler variable to build debug and normal versions of your installation; one with the Display Message actions, one without. You add the Display Message script lines into your script wherever you want to check the value of a variable or display other relevant information, but you surround each Display Message with Compiler Variable If and Compiler Variable End. Each time you build the installation, you are asked whether you want to produce a debug version. If you choose not to build a debug version, the script actions you place inside the Compiler Variable If block are not included in the installer .EXE. In the procedure below, you create a compiler variable and specify it to prompt you for a value at compile time. Then, you add a Display Message script line that tells you the value of the variable %MAINDIR%. The Display Message script line is inside a Compiler Variable If block that checks the value of the compiler variable and compiles the Display Message only if the compiler variable equals YES. To build a debug version of your installation: 1. Go to the Compiler Variables page in Installation Expert. 2. Click the Add button. The Compiler Variable Settings dialog appears.

3. Make the following entries in the Compiler Variable Settings dialog: In the Variable Name field, enter _DEBUG_.

164

DEBUGGING SCRIPTS

In the Default Value field, enter NO. In the Description filed, enter Compile debug version of

this installer?
In the Value List field, enter YES on the first line and NO on the second line. In the Data Entry Type drop-down list, select List of values (single-select). Click OK. 4. On the Compiler Variables page, mark the Compiling from Within Wise checkbox. 5. Switch to Script Editor, and in your script, add the following three script lines immediately below the script line that sets the value of MAINDIR (Set Variable MAINDIR to MyApp): Add a Compiler Variable If action and set If Variable to _DEBUG_, select Equals in the drop-down list, and set The Value to YES. After the Compiler Variable If script line, add a Display Message script line. Set Message Title to Main Directory and set Message Text to The Main Directory is %MAINDIR%. After the Display Message script line, add a Compiler Variable End action. You should see the following lines in your script:

Set Variable MAINDIR to MyApp If Compiler Variable _DEBUG_ Equals YES then Display Message Main Directory Compiler Variable End
6. Click the Test button to test your debug version. A dialog appears asking if you want to build a debug version. 7. Mark the YES option and click Next. When your installer actually starts running, the Display Message dialog appears with the current value of MAINDIR because the Display Message dialog was actually compiled into the installer .EXE. If you had selected NO, the Display Message would not even have been compiled into the installer .EXE. You can add the Compiler Variable If blocks anywhere to insert Display Message script lines to help with your debugging. You can use any type of script action inside the Compiler Variable If block. The Compile Variable If block lets you customize your installer .EXE at compile time.

165

4: SCRIPT EDITOR

Scripting Guidelines
If youve used a programming language before, you probably already understand basic scripting concepts. If you havent, you should become familiar with them before attempting to write a script.

Conditionals and Loops


Normally, script actions are executed in the order in which they appear in the script. However, the order of execution can be changed by special script actions known as conditionals and loops. Conditionals specify script actions that are executed only when certain conditions are satisfied. For example, in WiseScript, you can test what version of Windows a destination computer is running, then execute different script actions depending on whether theyre running Windows 95/98/Me or Windows NT4/2000/XP. Loops are used to indicate actions that should be repeated until a certain condition is met. For instance, you might prompt the end user to enter a particular piece of information during installation. If you want to make sure that the information an end user enters meets certain criteria, you can use a loop to repeat the prompt until the data entered is appropriate. Because a condition or loop can apply to more than one script action, both conditionals and loops are defined using at least two statements: one to mark the beginning of the section of the script to be conditionally executed and repeated, the other to mark the end of this block. The standard startof-conditional marker is the If action, although there are other script actions that also begin a conditional. The standard action for beginning a loop is While. The end of both conditionals and loops are marked using the End action. Youll notice that Script Editor indents everything inside a conditional or loop so you can easily see which actions are affected. In addition to the If and End markers, conditionals can have the Else action and the ElseIf action, which marks the beginning of the actions to be executed when the condition described by the If (or other conditional statement) is not true. The Else, if it is used, goes between the If and End actions. Actions after the If but before the Else are executed if the condition is true; actions after the Else but before the If are executed if the condition is false. If the Else action is not used, all script actions in the conditional block are executed only if the condition is true. If the condition is false, execution skips to the first action after the End of the conditional. Loops cannot have Else statements.

166

SCRIPTING GUIDELINES

In WiseScript, its possible for one conditional or loop to contain another conditional or loop. This situation, where one structure is inside another, 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 of the first conditional or loop. The second structure 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. You can nest conditionals and loops as deeply as you like, but in most circumstances you wont find it necessary to nest more than three or four deep. Script Editors indentation, which increases for each nested structure, helps you to interpret deep nestings.

Variables and Expressions


Variables are named storage locations that hold information about the system, information entered by the end user, or information derived or calculated from either of these two sources. Some variables are defined automatically by Installation Expertfor example, the WIN variable contains the path to the Windows system directory. You can also define up to 986 of your own variables using the Set Variable action, by putting data from the end user into variables, or by reading data from files into variables. Variables have these characteristics: Variable names must begin with a letter. Variable names cannot begin with an underscore (_) character; only compiler variables can start with an underscore character. Variable names can contain only numbers, letters, and underscore characters. Variable names must be 28 characters or less. They hold ASCII text, not binary data. They can be up to 32 KB in length. The advantage of variables is that they let your installer .EXE adapt to each destination computer. Once information is stored in a variable, it can be used in most script actions through a process called substitution. Any parameter for a script action can get part or all of its value from a variable. Simply specify the desired variable name preceded and followed by a percent (%) character: for example, %WIN% refers to the contents of the WIN variable, which is the path to the Windows system directory. %WIN%\FONTS thus refers to the contents of the WIN variable followed by the text \FONTS, or the path to the Windows font directory.

167

4: SCRIPT EDITOR

The % symbol is not part of the variable name, but rather a marker that tells WiseScript to replace the variables name with its value before executing the command. If you want to include an actual % character in your script, use %%. You can use substitution to build messages to be displayed to the end user, to set locations for copying or installing files, and to initialize new variables to the value of one or more other variables. If you are using a variable name as part of an expression, do not surround the variable name with percent (%) signs. For instance, if you use an If action, an ElseIf action, a While action, a Set Variable action, or a Wizard Loop action to evaluate an expression, do not enclose the variables you reference in the expression with percent (%) signs. The exception to this rule is for compiler variables; enclose compiler variables inside percent signs no matter where you enter them. A few types of actions (If, While, Set Variable, and some others) can use a more flexible scheme that lets you use arithmetic expressions and other options See Expression Operators on page 424. To read about scripts that demonstrate evaluating expressions with an If statement, see Performing Calculations on Integer Values on page 398 or Parsing Strings Using Expression Operators on page 398.

Compiler Variables vs. Runtime Variables


WiseScript has two different kinds of variables. Compiler variables have values that you set when you build the installation. These variables cannot be changed by end users who run the installer executable. Runtime variables are set by selections the end user makes in the installations dialogs, by characteristics of their machine, or by the contents of files on their hard disk, such as a settings file, an .INI file, or the registry. Set compiler variables on the Compiler Variables page of Installation Expert; see Compiler Variables on page 64. You can configure the Wise Installation System to prompt you for the values of compiler variables each time you build the installation. Compiler variables can contain the names of other variables. If you are familiar with C programming, compare the difference between compiler variables and runtime variables to the difference between preprocessor variables and C language variables. Preprocessor <#ifdef> statements determine which code is compiled; C language If statements determine which code is executed at runtime. When you initiate a compile

168

SCRIPTING GUIDELINES

by clicking the Compile, Test, or Run button, the values of compiler variables are set immediately, either by prompting you or by reading the values from the Compiler Variables page. Then Script Editor searches the entire script and replaces any instance of the compiler variable with the value. Both types of variables can be used in variable substitution. However, they have distinctly different behaviors when used in conditionals and expressions. When you enter a regular variable into an expression, you do not need to surround it with percent (%) signs, but when you enter a compiler variable in an expression, you always must surround the compiler variable with percent (%) signs. With a conditional based on runtime variables, all the script actions required by the conditional are included in the installer .EXE file. This is because the Wise Installation System cant know which part of the conditional will be executed until the installer .EXE file is run, because it depends on variables whose values are not known until runtime. The values of compiler variables, on the other hand, are known when the installer .EXE file is built. Therefore, the Wise Installation System does not include the script actions inside a compiler variable conditional when building the installer .EXE file. If an Install File(s) action is included inside a Compiler Variable If block, the file it installs is not added to the installer .EXE file if the conditional is false. You can use this functionality for many purposes. For example, you can create a script that compiles an installer .EXE file for either a 16-bit or 32-bit version of your application based on the value of a compiler variable, including only the files needed by each version of the application. Because the Install File(s) actions that install the other version of the application are not even compiled, those files are not included in the installer .EXE file, making it smaller than a universal installation for both 16 and 32 bit systems. Another common use of compiler variables is to create a debug version of your script that includes Display Action messages to display runtime variable values and other useful information at various points in the installation. By enclosing all of your debugging actions in compiler variable conditionals, you can easily strip them out when the installation has been debugged simply by changing the value of a compiler variable. The debugging actions are not even compiled into the final build. For more details on this technique, see Building a Debug Version on page 164. By convention, the names of compiler variables begin and end with an underscore. WiseScript does not enforce this convention, but you might find the naming scheme helpful in keeping track of which variables are known at compile time and which are known only at runtime.

169

4: SCRIPT EDITOR

Throughout this manual, youll sometimes see references to variables that dont specify the type of variable needed. Heres how to determine which type is needed: 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. This is because compiler variables cant be changed by scripts, only by the person who builds the installer .EXE file. In most other places, either the type of variable is implicit (for example, the Compiler If script action requires a compiler variable) or noted explicitly.

Anatomy of a Script
A script can be divided into four basic parts. If you are modifying the default script generated by Installation Expert, this overview helps you understand, in broad outline, what the default script is attempting to accomplish. If you are writing your own script from scratch, this outline can help you organize your thoughts and create a solid script that works properly with minimal tweaking. Initialization. In this section, you set up default values for your installation, including default directory, standard components, and Start menu or Program Manager group. You should read any information from .INI files or the registry that you need later in the installation. Also install any files you plan to display to the end user (README.TXT, LICENSE.TXT, etc.). Optionally, you can search for a previous version of your application and use its location as the default installation directory. User Input. This section contains a series of dialogs that ask the end user what optional components they want to install, what directory to put the files in, and so on. Generally you use a Wizard Loop action for this phase. This step might include displaying the README or LICENSE files installed in the Initialization step. File Copy. This is the longest part of the installation process; files are copied from the installer .EXE file to the destination computer. System Configuration. After files have been installed, the destination computers configuration files (.INI files, registry, Start menu, etc.) are updated so that the new software works properly. After this phase, you might prompt the end user to restart the computer.

170

SCRIPTING GUIDELINES

About Components
When an end user selects one or more optional components to be installed, a letter corresponding to each component is placed in a variable called COMPONENTS. Selecting the first component places an A in the variable, the second adds a B, and so forth. Up to 26 components can be added this way. The wizard dialogs created by Installation Expert take care of placing the correct values in the COMPONENTS variable for you, or you can use the Select Components script action or a custom dialog to accomplish the same result. In the installation script, you use conditional statements of the form If COMPONENTS contains A to determine which files are installed when each component is selected. Script Editor scans the script looking for these conditionals to determine how much disk space is required by each optional component. You must use the variable COMPONENTS and the proper conditional format for this feature to work. See Building a ComponentsBased Installation on page 405 for an example of a components-based installation script.

171

4: SCRIPT EDITOR

172

Chapter 5

WiseScript Actions
The Wise scripting language, WiseScript, contains more than 70 script actions; this section details the function and usage of each. You can write your own script or edit an existing script by inserting script actions. This section does not contain instructions on inserting actions. For more information on using Script Editor, including instructions on how to insert actions or create your own user-defined actions, see Script Editor on page 139.

173

5: WISESCRIPT ACTIONS

Add BDE Alias


The Add BDE Alias script action is used to create aliases in the Borland Database Engine configuration database. The Borland Database Engine must be installed before you can create aliases. You should use the BDE Runtime page in Installation Expert to configure BDE. The database actions are advanced features. You should already know about BDE or ODBC before attempting to use these actions. The Wise Installation System helps you install database runtimes, but you should always check the Runtimes page on the Wise Solutions Web site for updates before installing runtime files. You should first select the runtimes you want on one of the runtime pages in Installation Expert, then modify the generated script. Adding this functionality to a script from within Script Editor requires advanced knowledge of either BDE or ODBC.

IDAPINST.DLL Path. Enter the full pathname of the Idapinst.dll file. This file must be installed before any BDE aliases can be added. Normally, you install this file into a temporary directory (use the %TEMP% variable substitution) and remove it at the end of the installation procedure.

174

Config Pathname. Enter the full pathname of the BDE configuration file. This pathname can be read from the CONFIGFILE01 entry in the IDAPI section of the WIN.INI file. Use the Read INI Value script action to read this entry into a variable, for instance, BDECONFIGPATH; then use that variable name here (%BDECONFIGPATH%). Alias Name. Enter the name of the alias to be added. Alias Pathname. Enter the path of the new alias. Alias Parameters. Enter any parameters required by the alias. Alias Type. Choose a standard (such as, dBASE or Paradox) alias or an Interbase (SQL) alias. If you are adding an Interbase alias, you must fill in the User Name and Server Name fields. Default Driver. Choose the driver that should be used with this database by default, either dBASE or Paradox. Server Name and User Name. Login information that is required if you are using an Interbase (SQL) database. BDE Type. Choose Win16 (Windows 3.1) or Win32 (Windows 95/98 or NT). Win16 Variable. This variable is blank if the BDE configuration file supports only Win32 applications. If you plan to run both Win16 and Win32 BDE applications, you should set the variable to A. Language Number. This field holds the language number of the installed language resource file. Make sure the language resource file gets deployed on the destination computer. Values are as follows: English: 0009; Danish: 0006; French: 000c; German: 0007; Italian: 0010; Norwegian: 0014; Portuguese: 0016; Spanish: 000a; Swedish: 001d. Check the BDE help file (BDE32.hlp) for details on language numbers. If you enter the wrong language number your installation fails with a merge error. Preserve Existing. Mark this checkbox to add a new alias only when an alias of the same name does not already exist.

Add Directory to Path


The Add Directory to Path script action adds a directory to the PATH environment variable, as set in Autoexec.bat. The directory is appended to every occurrence of the SET PATH statement that does not already contain it. A SET PATH statement is added if none exists. The system reboots at the end of installation to ensure that the new PATH takes effect.

175

5: WISESCRIPT ACTIONS

Directory to add to PATH. Enter the directory to be added to the PATH environment variable. Use variable substitution as necessary to avoid hard-coding pathnames. For example, enter %MAINDIR% to specify the main application directory. Location of new directory. You can add your new directory to the beginning or end of the existing PATH variable. Path selection. Some destination computers might have several PATH variables. Use this drop-down list to add your directory to all of these PATH variables. Technical Note:
The maximum length of the PATH variable under MS-DOS is 128 characters. If the path is too long, it is truncated.

Add ProgMan Icons


Use the Add ProgMan Icons script action to manipulate icons and groups in the Windows Program Manager desktop (Windows 3.1/Windows NT 3.51) or any DDE-compatible Program Manager replacement. You can add and delete individual program icons, or delete an entire group. To create shortcuts on Windows 95/98/Me and Windows NT/2000/XP operating systems, use the Create Shortcut action instead of this action.

176

Action. Choose whether this script action should add an icon, delete an icon, or delete an entire group. If adding an icon, all the fields below must be provided (except for Icon PathName and Icon Number, which are optional). If deleting an icon, only Group Name and Icon Name must be provided. If deleting a group, only Group Name must be provided. Technical Note:
Always place deletions before additions in your script. If you attempt to delete an icon from a group that does not exist, the Program Manager might remove an icon with the same name from the last-added group, if such an icon exists. Deleting icons and groups first eliminates this problem. This might not be reliable in a Windows 95 shell; use Create Shortcut on 32-bit operating systems.

Group Name. Enter the group name. If your script allows the end user to select or enter a group name, use variable substitution to get the value of the variable where you stored the group name (in the standard script, for example, use %GROUP%). Icon Name. Enter the name of the new icon, if you are adding a new one. Command Line. Enter the command line that is used to open the file associated with the new icon. Use variable substitution, rather than hard-coding the command line, to make sure the command line works on any system. For example, use %MAINDIR% to specify the main

177

5: WISESCRIPT ACTIONS

application directory so that the icon works regardless of where the end user installs your application. Icon PathName. Specify a pathname or use variable substitution to build a pathname. You must specify an icon file or an .EXE file containing an icon, if you plan to use a custom icon. Icon Number. Enter the resource number of the icon (from the pathname specified above) to be displayed in the Program Manager or Start menu. Technical Note:
An executable or icon file can have multiple icons contained within the file. To see the icons in a file, go to Windows Explorer, right-click any shortcut file, and select Properties. Click the Shortcut tab, then click the Change Icon button. The Change Icon dialog appears. It contains a graphical list of icons for the shortcut file you right-clicked. The icon number of the first icon is 0, the icon number for the second is 1, and so on. To see the icons in a different file, click Browse and choose a different file.

Run Minimized. If this checkbox is marked, the application starts in a minimized state. Separate Space. This checkbox, if marked, causes a Win16 .EXE to run in its own address space under Windows NT 3.51. Do not check this box if the icon will be added under Windows 3.1. Use a Check Configuration action to check to make sure that Windows NT 3.51 is available before executing an Add ProgMan Icons action with this checkbox marked. Personal Group. This checkbox, if marked, causes the icon to be added to a personal Program Manager group.

Add Text to Install.log


Use the Add Text to Install.log script action to add commands to the installation log. As your script runs on the destination computer, each action it performs is logged in Install.log. Specify the location of Install.log on the Installation Log page in Installation Expert. Install.log records each action made to the system (installation of files, additions or changes to registry, and so on), including failures of actions to execute. For failures, it lists the reason for the failure. When the uninstaller runs, it undoes each action recorded in the Install.log, starting at the bottom of the log and working its way up. Typically, you add commands to the Install.log to customize the uninstall process for your application. To stop and start writing to Install.log, see Open/Close Install.log on page 262. If you use it to stop the log, but you do not start the log again, no log file is created.

178

Usage
In the Add Text to Install.log dialog, you simply enter the text you want to add to Install.log. Because the log is written continuously during installation, the location of the text in the log depends on where in the script you put the Add Text to Install.log script line. By default the application goes into the application directory (MAINDIR).

Log Text. Enter the text to be added to the log file. Remember, you can use variable substitution to incorporate the values of script variables in your log messages.

Examples
Normally, the uninstaller does not remove files that were installed to the Windows, Windows\System, or Windows\System32 directories. If you want these files to be removed, in Script Editor, you can place an Add Text to Install.log script line directly before the Install File(s) script lines that install files to one of these directories. In the Add Text to Install.log dialog, enter the following text. Enter it exactly as shown because it is casesensitive:

Non-System File:

Note:
You can also specify uninstaller actions by clicking the Add button on the Uninstall page in Installation Expert.

You can also add a line to the Install.log that executes a program during uninstall. If you execute a program during uninstall, the uninstaller pauses until the program finishes execution. To execute a program during uninstall, in the Add Text to Install.log dialog, enter the following line, but customize the programs pathname as necessary, and add any command line options. Enter it exactly as shown because it is case-sensitive:

Execute path: %MAINDIR%\Remove.exe

179

5: WISESCRIPT ACTIONS

If you want the uninstaller to remove not only those files that were installed, but also files that were subsequently added by your application, you can remove all the files and sub-directories within a specified directory. Use this option with caution because end users might have stored their own files in the directory. To do this, in the Add Text to Install.log dialog, enter the following line, but customize the pathname as necessary, including the wildcard information. Enter it exactly as shown because it is case-sensitive:

File Tree: %MAINDIR%\Data\Temp\*.*


If you want the uninstaller to remove not only the registry keys that were created during installation, but also those registry keys that were subsequently added by your application, you can remove an entire registry key, including all the sub-keys and values that exist below that key. To do this, in the Add Text to Install.log dialog, enter the following line, but customize the registry information as necessary. Enter it exactly as shown because it is case-sensitive:

RegDB TREE: SOFTWARE\Wise Solutions RegDB Root: 2


where the RegDB Root value is one of the following: 0 1 2 3 HKEY_CLASSES_ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE HKEY_USERS

Add to Autoexec.bat
The Add to Autoexec.bat script action edits the Autoexec.bat file, which is executed during startup, to allow you to add commands that are executed before Windows loads. If you want to have your application start up after Windows is loaded, add a shortcut to it to the StartUp group of the Start menu. Commands can be inserted in the Autoexec.bat file at an arbitrary line number, or you can have the installation search the file to find a particular piece of text and insert your new line before, after, or in place of the existing line. The destination computer is restarted automatically when installation is complete to force the new Autoexec.bat commands to take effect.

180

Text to Insert. Enter the command line you want to add to the Autoexec.bat file. If your command line refers to a program file, use a full pathname built with variable substitution, such as %MAINDIR% to specify the application directory, so your program runs regardless of the directory the end user installs it in. The PATH variable might not be set when your command is executed, so always use a full pathname. Line Number. Enter the line number at which the new line should be inserted. Specify zero to append the command to the end of the file. The Search for Existing Text panel in this dialog overrides any line number specified here; the line number applies only when the text is not found or when you do not specify any text. Search for Text. Enter the text you want to search for here. The installation scans Autoexec.bat looking for a line that begins with, ends with, or contains the text, depending on what you set in Match Criteria. If more than one line in the file matches, only the first is selected. Comment Text. Enter the text to insert at the beginning of the line that is found. Inserting REM (with the trailing space but without the quote marks) causes the line to be commented out and ignored during startup. This is useful when you are replacing an existing command with a new command and want to leave the existing command in place but inactive. In this case, you should always set the Insert Action dropdown to insert your new command before the existing line so that a

181

5: WISESCRIPT ACTIONS

subsequent installation finds and edits the active command, not the commented-out line. Insert Action. Select the action to perform when a line containing the specified text is found. You can either insert your new command before the existing line, replace the existing line with your new command, or insert your new line after the existing one. Match Criteria. Choose whether the line must begin with, contain, or end with the text entered in the Search for Text field. Ignore white space. If this checkbox is marked, the search operation ignores spaces and tab characters. Case-sensitive. If this checkbox is marked, the search operation distinguishes between upper-case and lower-case text. Make Backup File. If this checkbox is marked, the installation makes a copy of the Autoexec.bat file before editing it. The backup is retained after installation so that the end user can undo any changes made to Autoexec.bat if they cause problems.

Add to Config.sys
The Add to Config.sys script action edits the Config.sys file to add new commands. Commands can be inserted in the Config.sys file at an arbitrary line number, or you can have the installation search the file to find a particular piece of text and insert your new line before, after, or in place of the existing line. The destination computer is rebooted when installation is complete to force the new Config.sys to take effect.

182

Text to Insert. Enter the command line you want to add to the Config.sys file. Use a full pathname built with variable substitution (such as %SYS% to specify the system directory) so your program runs regardless of how the destination computer is set up. Line Number. The line number at which the new line should be inserted. (Specify zero to append the command to the end of the file.) The Search for Existing Text panel in this dialog overrides any line number specified here; the line number applies only when the text is not found or when you do not specify any text. Search for Text. Enter the text you want to search for here. The installation scans Config.sys looking for a line that begins with, ends with, or contains the text (depending on the setting of the Match Criteria field). If more than one line in the file matches, only the first is selected. Comment Text. Enter the text to insert at the beginning of the line when it has been found. Inserting REM (with the trailing space but without the quote marks) causes the line to be commented out and ignored during startup. This is useful when you are replacing an existing command with a new command and want to leave the existing command in place but inactive. In this case, you should always set the Insert Action drop-down to cause your new command to be inserted before the existing line so that a subsequent installation finds and edits the active command, not the commented-out line.

183

5: WISESCRIPT ACTIONS

Insert Action. Select the action to be taken when a line containing the specified text is found. You can either insert your new command before the existing line, replace the existing line with your new command, or insert your new line after the existing one. Match Criteria. Choose whether the line must begin with, contain, or end with the text entered in the Search for Text field. Ignore white space. If this checkbox is marked, the search operation ignores spaces and tab characters. Case-sensitive. If this checkbox is marked, the search operation distinguishes between upper-case and lower-case text. Make Backup File. If this checkbox is marked, the installation makes a copy of the Config.sys file before editing it. The backup is retained after installation so that the end user can undo any changes made to Config.sys if they cause problems.

Add to System.ini
The Add to System.ini script action lets you add a device entry to the 386Enh section of the System.ini file. If you use this command, Windows is restarted at the end of the installation to force the new device driver to be loaded. You should only use this action for installations on Windows 3.1x or Windows 9x operating systems. Do not use this action to modify the display driver (that is, display=xxx) or any other non-device entry. Use the Edit INI script action to make these types of changes. See Edit INI File on page 225.

Device Name. Enter the full command line for the device (for example, device=vshare.386). The files referenced should be in the System directory unless a full pathname is given. If you start the Device Name field with a semicolon (for example, ;device=*vcp), the device entry is commented out if it exists in the 386Enh section of System.ini. If you add a device entry with the same device name but a different driver pathname, the old entry is commented out before the new entry is added.

184

Allow Floppy Disk Change


The Allow Floppy Disk Change script action closes all the files currently in use by the installation and allows the end user to change disks. Windows does not allow you to change floppy disks when files are open on the disk being removed. Use this script item, for example, when you need to run an external .EXE located on another floppy disk. The built-in code handles floppy disk changes, so you only need to use this action for special circumstances. This action does not require configuration, so no dialog appears when you add it to your script.

Browse for Directory


The Browse for Directory script action displays a dialog asking the end user to select a directory for installation. You can customize the title of the dialog, the descriptive text displayed, and other characteristics of the dialog. This script action is included to provide backward compatibility for scripts created in earlier versions of the Wise Installation System. You can use custom dialogs to perform this same function.

Window Name. Enter the title of the Browse dialog. Description. Enter text to explain the purpose of the directory the end user is choosing. The description appears at the top of the Browse dialog.

185

5: WISESCRIPT ACTIONS

Prompt Name. Enter a short message to be displayed immediately above the directory field. Typically, it is something like Select a directory for installation. Default Value. Enter the default location of the new directory. The end user sees this directory entered into the directory field in the Browse dialog. The end user can change the default location. Variable Name. Enter the name of the variable that stores the end users directory choice. The standard script generated by Installation Expert uses the variable MAINDIR for this purpose. Dont Append. Mark this checkbox to prevent the default directory name from being appended to the current directory (see Default Value above). Confirm if Exists. Mark this checkbox if you want the end user to be warned if they have selected a directory that already exists.

Call DLL Function


The Call DLL Function script action lets you call a .DLL function from your installer. Your installation script can call functions in Win16 or Win32 .DLLs that the script has already copied to the destination computer. You can use these functions to customize the installation process. These can be .DLLs that youve written yourself, .DLLs specific to the Wise Installation System, or Windows .DLLs. You can cause your script to branch based on the returned results of a .DLL by setting the Action to Start Block if Return Value True or Start While Loop. If you are writing your own .DLL, you should use CALLBACK or WINAPI in the declaration of the .DLL, or your .DLL might not function properly in the Wise Installation System. To help with your .DLL development, review some of the sample source code, such as GETCPU32.C, in the DLL directory inside the Wise Installation System application directory. The DLL directory also contains source code for other .DLL samples in C and Delphi. These .DLLs are examples that function properly within the Wise Installation System. Calling Visual Basic ActiveX controls is not supported. To learn about sample scripts that use this action, see Using Sample Scripts that Call .DLLs on page 410.

186

DLL Pathname. Specify the pathname of the .DLL file or use variable substitution to build a pathname from variables. The .DLL should have already been installed on the destination computer before you attempt to call it. If you call it before installing it, it will not be found. If the .DLL does not need to remain on the destination computer after installation is complete, copy it to the Windows temporary directory, represented by the %TEMP% variable substitution. Note:
When you click the Test button to test the installation, you might see a message saying the .DLL could not be found. This is because during test mode, files are installed, then deleted immediately, except for files copied into the Temp directory. So if you install the .DLL with an Install File(s) statement, then execute the Call DLL statement, the .DLL is not present, and the statement fails. To avoid this problem, install .DLLs into the Temp directory.

Function Name. Enter the name of the function inside the .DLL to be called. The function should be exported when creating the .DLL. The

187

5: WISESCRIPT ACTIONS

functions parameters and return value must exactly match those specified below (case-sensitive). Call a function written specifically for WiseScript. When calling functions you have written specifically for use with WiseScript, mark this option and fill in the Variables Added, Parameter String, and Action fields immediately 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 the WiseScript-specific .DLL function has access to the variable list of the running installation program, you might decide to have it add new variables. List the names of the variables you want to add, separated by commas. (Do not use the substitution character %.) Parameter String. The parameter string can be used to pass information to the .DLL function. Any text you enter here (including variable substitution) is passed to the .DLL in the IpszParam variable. Action. Choose what the installation should do upon return 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 Return Value True. If the .DLL function returns non-zero, all the actions between this action and its matching End action are executed. Otherwise these actions are skipped. Start While Loop. The actions between this action and the matching End action (including the .DLL call) are executed repeatedly until the .DLL function returns zero. Call a function with variable parameter list. Lets you call .DLLs not specifically written for use with WiseScript. These .DLLs cannot access any of the installations internal variables, but you can pass this information to them if necessary. The parameter list buttons immediately below this option become active when it is marked. You must specify the parameters the function requires and what type of return value it provides. Add. Opens the DLL Parameter Settings dialog where you add a new parameter. Parameters should be added in the order in which they appear in the .DLLs function prototype. See DLL Parameter Settings.

188

Edit. Opens the selected parameter in the DLL Parameter Settings dialog for editing. Delete. Deletes the selected parameter from the list. Return Value Type. Choose a value type to be returned. For a return value type, you are limited to short, word, long, dword, and string pointer. See the table under DLL Parameter Settings for descriptions of each. Returned Variable. If you want to store the returned value in a script variable, select the desired variable from this list or enter its name here. Hide progress bar before calling function. If the .DLL performs any screen display, it might be cleaner to hide the installation progress bar during the call to the .DLL function. Mark this checkbox to hide the progress bar during the .DLL call.

DLL Parameter Settings


Use the DLL Parameter Settings dialog to add a new parameter. Add parameters in the order in which they appear in the .DLLs function prototype.

189

5: WISESCRIPT ACTIONS

Parameter Type. Choose from the drop-down list. If you dont find the parameter type youre looking for, its probably listed under a different name. See the following table.

Wise Installation System short word long dword

Corresponds to Win32 SDK type SHORT WORD LONG, LRESULT, BOOL DWORD (Also, use for any parameter type that begins with an H or ends with the word HANDLE, such as HWND, HANDLE, HPEN, HFONT, and LPHANDLE.) Use for any parameter that ends in STR such as LPSTR, LPTSTR, etc. Pointer to SHORT or SHORT* (use for PSHORT or LPSHORT) Pointer to LONG or LONG* (use for PLONG or LPLONG) Pointer to WORD or WORD* (use for PWORD or LPWORD) Pointer to DWORD or DWORD* (use for LPDWORD or PDWORD) char [size]

Corresponds to Visual Basic type Integer Integer Long, Boolean Long

Description 16-bit, signed integer data type 16-bit, unsigned integer data type 32-bit, signed integer data type 32-bit, unsigned integer data type

string pointer

Long

32-bit pointer to an ANSI character type null terminated string 32-bit pointer to a SHORT data type (see SHORT for the reference to this data type) 32-bit pointer to a LONG data type (see LONG for the reference to this data type) 32-bit pointer to a WORD data type (see WORD for the reference to this data type) 32-bit pointer to a DWORD data type (see DWORD for the reference to this data type) Use to place a character buffer of the given size (number of characters) into a structure. Use only with structures.

short pointer

Long

long pointer

Long

word pointer

Long

dword pointer

Long

string buffer

String

190

Technical Note:
If you are using the Win16 SDK, use word instead of dword for parameters that start with H or end with HANDLE.

Buffer Length. If you set the Parameter Type to string buffer, then this field is enabled. Set the number of characters in the string buffer in this field. The limit is 446 characters. Passing type. Leave the passing type set to Normal unless you are passing a complex structure to the .DLL. If you are passing a complex structure to the .DLL, select First element of structure for the first element in the structure, and select Contained within structure for all subsequent elements of the structure. You do not pass the structure name, just the elements inside it. For more information on structures, elements of structures, and how to pass a complex structure to a .DLL, see Passing Complex Structures to a .DLL: An Example. Value Source. Choose the type of value to be passed: Variable (pass by reference), constant (pass by value), constant with null value, or constant with window handle (pointing to the installation window). Variable Name. Enter or choose an existing installation variable name from the drop-down list if the Value Source is set to Variable. Constant Value. Enter a constant here if you chose Constant for the variable source. You can use variable substitution here; the value is constant from the point of view of the called .DLL, not necessarily from the script. Technical Note:
The Wise Installation System maintains backward compatibility with .DLLs written specifically for the API available in previous versions so that you can continue to use older scripts with the new Wise Installation System. However, this API might not be supported in future versions of the Wise Installation System and is not documented here. For new installations, you should write standard .DLLs and specify their parameters as explained above. Compile both 16-bit and 32-bit functions using the large memory model, or explicitly declare all pointers to the structure as far. The Wise Installation System reserves 5KB of stack space for 16-bit .DLL functions you call, and 100KB of stack space for 32-bit .DLL functions you call. You must free any memory allocated by your .DLL routines.

191

5: WISESCRIPT ACTIONS

Passing Complex Structures to a .DLL: An Example


In addition to passing a list of simple parameters, such as integers and strings, to a .DLL, you can also pass complex structures (sometimes called records in Pascal or Visual Basic development environments). For each parameter you send to a .DLL, you must choose a passing type. For nonstructure parameters, you select Normal from the Passing Type dropdown list. However, if you are passing an element of a structure (also referred to as a member), you select First element of structure if it is the first item in the structure, or Contained within structure if it is not the first item. There is no option for the end of the structure; it ends if there are no more parameters, or if the next parameter has passing type set to Normal or First element of a structure. Note:
The following code samples are in C notation. Syntax varies in other development environments.

Suppose that you have a function in a .DLL that processes information for a new employee. The return value of the function is a simple integer indicating success or failure. The function accepts three parameters: a structure that contains two elements, an integer, and another structure that contains two elements. The calling statement for the .DLL is:

int NewEmployee (EMPLOYEE*, int, DEPARTMENT*);


where the parameter EMPLOYEE* is a pointer to a structure, the second parameter is a simple integer, and the parameter DEPARTMENT* is a pointer to a structure. In this example, the layout of the EMPLOYEE structure is as follows:

typedef structure EMPLOYEE { LPSTR name; LONG salary; CHAR title[50]; }


The layout of the DEPARTMENT structure is as follows:

typedef structure DEPARTMENT { LPSTR deptname; LPSTR deptnum; }

192

To call the function NewEmployee described above, you add six parameters in the Wise Installation Systems Call DLL Function dialog: the three elements of the first structure, the integer, and the two elements of the second structure. In the DLL Parameter Settings dialog, click the Add button to add each parameter. Add a parameter for name, the first element of the EMPLOYEE structure, and set its parameter type to string pointer and its passing type to First element of a structure. Add a parameter for salary, the second element of the EMPLOYEE structure, and set its parameter type to long and set its passing type to Contained within structure. Add a parameter for title, the third element of the EMPLOYEE structure, and set its passing type to Contained within structure. Set its parameter type to string buffer and its buffer length to 50. Add a parameter for an integer, which is the second parameter passed to the function, and set its parameter type to long and its passing type to Normal. Add a parameter for deptname, the first element of the DEPARTMENT structure, and set its parameter type to string pointer and its passing type to First element of a structure. Add a parameter for deptnum, the second element of the DEPARTMENT structure, and set its parameter type to string pointer and set its passing type to Contained within structure.

193

5: WISESCRIPT ACTIONS

Check Configuration
The Check Configuration script action can test the hardware configuration, operating system, and certain other characteristics of the destination computer. As a result of this check, the action can display a message, abort the installation after displaying a message, or start a conditional block.

194

Usage

If System. Determines whether this action checks for the presence or absence of a requirement. Configuration to check for. The second drop-down list in the Check System Configuration dialog lets you select the option to be checked, including: Operating systems. You can check for the following: Windows NT Running, Windows 95/98 Running, Windows 95/98/NT Running, Windows 95 Shell Interface (includes Windows 95/98 and NT 4.0 and later), Windows 2000 Running, Windows Me Running, Windows XP Running. When you check for the presence of an operating system, this script action looks for the minimum operating system of the type for which youre checking. For example, if youre checking for Windows 2000 running and the destination computer has Windows 2000 or XP, the operating system check returns TRUE. Graphics support. 256 Color or Better, VGA or Better, 800x600 or Better, 1024x768 or Better. Audio and multimedia. WAV file playback support, MIDI file playback support, WAV and MIDI playback. Processor. 386 Enhanced Mode, Standard Mode, Math Coprocessor, 286 Processor or Better, 386 Processor or Better, 486 Processor or Better. Memory. At Least 1-12 MB free memory. Other. Paging Enabled, Share Loaded, NT Administrator Rights.

195

5: WISESCRIPT ACTIONS

Action. Determines what action to take when the specified option is or is not found. Display Message Only. Displays a message with the title and message specified below. Abort Installation. Displays a message with the title and message specified below, then aborts the installation. Start Block. Begins a conditional block. All actions between this action and the next Else or End action are executed. Title. The title of the message displayed by this action. Message Text. The text of the message displayed by this action. If you do not specify a message, no message is displayed. Technical Note:
Checking for Share Loaded opens a temporary file and attempts to lock a section of it. This detects all versions of DOS SHARE, Windows VSHARE, Windows NT/2000/XP, and Windows 95/98. Checking for VGA or better graphics makes sure display resolution is at least 640x480. Checking for free memory tests the amount of memory (including virtual memory) available at installation time. If the end user is running many background processes, the amount of free memory is reduced. You might choose to instruct end users to run the installation while they are running any other programs they usually use, including DOS TSRs, and with their typical SMARTDRV settings. This way the installation can determine with a reasonable degree of accuracy whether the end user has enough memory to run your software under normal circumstances.

Example
To read about a script that demonstrates this action, see Checking for 256 Color Display on page 411 or Checking Disk Space by Calling a Windows .DLL on page 411.

Check Disk Space


The Check Disk Space script action can test to determine whether there is enough disk space available for installation, based both on the size of the standard (Always Install) files and the optional components the end user has chosen to install. On the Files page in Installation Expert, standard files are listed under an Installed Files folder, whereas optional components are listed under a separate folder structure.

196

If an installation contains no optional components, all fields in this actions dialog should usually be left blank. The Wise Installation System still checks to make sure sufficient disk space exists for the standard portion of the installation, even taking into account the cluster size of the disk.

Usage

Component Variable. If your installation includes components, use the drop-down list to choose the name of the variable that contains the list of components the end user has selected. This variable is normally called COMPONENTS in the standard script; it should match the variable set by the Select Components script action or the Select Components custom dialog in the wizard loop. Status Variable. Choose the variable to hold the result of the disk space check. If there is not enough disk space for an installation, an error message is displayed, and the end user can choose to abort the installation, ignore the error, or retry the disk space check. This variable is set to R if the end user chooses to retry the installation. You can then test this variable to allow the script to define exactly what retrying means. For example, you might want to let the end user select a different directory, or even different components. If no status variable is selected, clicking Retry simply executes the test again. Reserve Space. You can specify that up to three additional disks must have additional free space beyond what is required by the installed files. For example, you might use this option if your software requires a certain amount of temporary disk space to operate, or if you plan to run a separate installer .EXE to install another application with its own space requirements. Choose a Disk Variable (a variable containing a directory name) to indicate the directory where the additional files are created, then enter the amount of space to be used by files in that directory in

197

5: WISESCRIPT ACTIONS

the Extra Space field to the right. See Modify Component Size on page 262. Do not cancel during silent installation. If the installation is being run in silent mode, the installation would ordinarily be canceled if insufficient disk space were available. There would be no error message, because the installation is, after all, running in silent mode. If this checkbox is marked, installation always continues during a silent installation regardless of the amount of free space, although a message is placed in the Install.log file.

Example
To read about a script that demonstrates this action, see Letting the User Choose Subcomponents During Installation on page 406.

Check HTTP Connection


Professional Edition only
The Check HTTP Connection script action is available only in the Professional Edition.

The Check HTTP Connection action determines whether a given URL is valid or not. It attempts to open a connection to the URL by downloading the HTML page. This script action uses the WinSock.dll to make the connection. You specify both Win16 and Win32 error variables because until the connection is attempted, you dont know which WinSock.dll is used. A Win16/32-bit installer .EXE first attempts the connection using the Win32 WinSock.dll, and if that fails, it attempts the connection using the Win16 WinSock.dll. A true Win32 installer uses only the Win32 WinSock.dll. If the download is successful, the Win32 or Win16 Error Number Variable is set to 0, which indicates success. If an error occurs, the Error Number Variable is set to another error code, and the Error Text Variable is set to a string that describes the error return codes. The error return codes and the error string come from the APIs that are called to attempt the download. A sample of the return string is:

ProxyServer= ProxyIgnore= ProxyPort=80 ProxyType=CERN WinInetText= WinInetError=0 WinSockError=11001

198

This indicates that no proxy server was used and that WinSock returned the error code 11001. Technical Note:
Some Web servers redirect invalid pages to another Web page internally. In that case no error is detected because the Web server reports that the Web page was found.

In the Check HTTP Connection dialog, specify the URL you want to check, then specify variables to hold any error numbers and error text that are returned.

URL to Check. Enter the URL to be checked. You must include the http:// in the URL path. Win32 Error Text Variable. Select a variable to hold the error text returned by the 32-bit winsock.dll. Win32 Error Number Variable. Select a variable to hold the error code returned by the 32-bit winsock.dll. Win16 Error Text Variable. Select a variable to hold the error text returned by the 16-bit winsock.dll. Win16 Error Number Variable. Select a variable to hold the error code returned by the 16-bit winsock.dll.

Check If File/Dir Exists


The Check If File/Dir Exists script action determines if a particular file or directory exists on the destination computer or whether a particular directory is writable on the destination computer. As a result of this test, the action can display an error message, abort the installation after displaying a message, or begin a conditional or loop block.

199

5: WISESCRIPT ACTIONS

If. Determines whether this action checks for the presence or absence of a file, a directory, or either. You can also test to determine if a directory is writable or whether a .DLL module is loaded. Pathname. The pathname of the file or directory to be tested. Wildcard characters, such as *, are not permitted. Use variable substitution to specify the pathname (for example, by including %WIN% at the beginning of a path as an abbreviation for the Windows directory) because these variables are set automatically and they reflect the actual path to that directory on the destination computer. Title. The title of the message displayed by this action. Message Text. The text of the message displayed by this action. If you do not specify a message, no message is displayed. Action. Determines what action to take when the specified file or directory is found (or is not found, if you are checking for the absence of a file or directory), or when a directory is found not to be writable. Display Message Only. Displays a message with the title and message specified. Abort Installation. Displays a message with the title and message specified, then aborts the installation. Start Block. Begins a conditional block. All actions between this action and the next Else or End action are executed.

200

Start While Loop. Begins a loop block. All actions between this action and the next End action are executed repeatedly as long as the condition is true. Perform loop at least once. If you chose the Start While Loop action, this checkbox determines whether the body of the loop is executed once before the test is performed. If the checkbox is cleared, the loop is executed if the condition is true, but is not executed if the condition is false. If the checkbox is marked, the loop always executes at least once. To read about a script that demonstrates this action, see Prompting the User to Insert a Floppy Disk on page 400.

Check In-use File


The Check In-use File action lets you determine whether a particular file on the destination computer is in use or not. In use is a system state that indicates that a file is currently being accessed by a process. Typically, files that are in use cannot be moved, deleted, or opened by other processes. In the Check In-Use File Settings dialog, you enter the variable in which to put the result, and the pathname of the file to check.

Variable. Enter the name of a variable in which to put the result of this test. This can be a variable you defined earlier in your script, or you can create a new variable by entering a variable name here. After the script runs the Check In-use File action, the variable contains one of the following values: In-Use, which means the file is in use, Not In-Use, which means the file is not in use, or Non-Existent, which means the file could not be found. Pathname. Enter the pathname of the file you want to check. You can use variables to build the pathname.

201

5: WISESCRIPT ACTIONS

Check Service
The Check Service script action lets you check to see if a particular service is running on the destination computer. You can check services on Windows 3.51, Windows NT 4.0, Windows 2000, and Windows XP systems. If you try to check services on another operating system, the Check Services script action always returns the result of Unknown because other operating systems do not have services.

Usage
In the Check Service Settings dialog, you enter the service name and a variable in which to put the service status. Services can be stopped and started, and paused and continued, either by clicking the Stop, Start, Pause, and Continue buttons in the Services control panel or by calling .DLL functions. Each operation takes time to implement, so the status of a service, in addition to being started or stopped, can be in an in-between state, referred to as pending.

Variable. Enter a variable name in which to put the status of the specified service. This can be a variable you defined earlier in your script or you can enter a name to create a new variable. The variable contains one of the following values after the script action is executed: Unknown, Running, Stopped, Paused, StartPending, StopPending, ContinuePending, or PausePending. Unknown means either the service was not found or the current user profile does not have sufficient privileges to query the service. If the status ends with the word Pending, it means that the service has received a request to stop, start, continue or pause, but it 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 what the service name is, consult the documentation that came with the software that installed the service.

202

Example
Your software might require the presence of a particular service in order to run properly. You can use the Check Service script action to ensure that the required service is installed and running before continuing to install your software.

Compiler Variable If/Else/End


Compiler variables are distinctly different from runtime script variables. See Compiler Variables vs. Runtime Variables on page 168. Values of runtime variables are determined at runtime by being assigned by the Wise Installation System, read from a file, or obtained from an end user. You can use variables as part of calculations, to build pathnames, and to display in a dialog. Compiler variables, on the other hand, are set on the Compiler Variables page of Installation Expert. See Compiler Variables on page 64. They are used to determine which parts of the script are included in the final installation. Compiler If blocks are instructions to the compiler. Parts of the script inside Compiler If blocks that evaluate to false are not included in the installation. If you are familiar with C programming, compare the difference between compiler variables and runtime variables to the difference between preprocessor variables and C language variables. Preprocessor <#ifdef> statements determine which code is compiled; C language If statements determine which code is executed at runtime. You can use compiler variables to build different versions of the installation from a single script source file. For example, if you create a single installation that installs both the 16-bit and 32-bit versions of your program, you might use a compiler variable to determine the type of installation you are creating. You use Compiler If statements to completely exclude the 32-bit sections of the script from the 16-bit version of the installation, and vice versa. All compiler conditionals start with a Compiler Variable If action.

Usage

203

5: WISESCRIPT ACTIONS

If Variable. The name of the compiler variable to be tested. Comparison. You can test the specified variable to determine whether it is equal to or not equal to a value, whether it contains any of the letters included in a particular string, whether the file named by the string exists, or whether the file version is equal to or greater than the value. The Value. The value for the comparison operation. Note that comparisons are case-sensitive. If you specify a file name, you cannot use variable substitution, as the action is checking to see whether a particular file is available on your computer at compile time, not the destination computer. Compiler conditional blocks can contain a Compiler Variable Else action; the actions following it are compiled if the condition specified in the If is not true. They must be closed by a Compiler Variable End.

Example
To read about a script that demonstrates this action, see Creating an Installer That Can Be Customized During Compile on page 395 or follow the procedure in Building a Debug Version on page 164.

Config ODBC Data Source


The Config ODBC Data Source script action configures an ODBC data source for use with an existing ODBC (Open Data Base Connectivity) driver. The database actions are advanced features. You should already know about BDE or ODBC before attempting to use these actions. The Wise Installation System helps you install database runtimes, but you should always check the Runtimes page on the Wise Solutions Web site for updates before installing runtime files. You should first select the runtimes you want on one of the runtime pages in Installation Expert, then modify the generated script. Adding this functionality to a script from within Script Editor requires advanced knowledge of either BDE or ODBC. You should use the ODBC page to configure ODBC and use the BDE Runtime page to configure BDE.

204

Source Name. Enter the name of the ODBC data source. This name is displayed in the ODBC data sources list on the destination computer. Click the Import button to import an existing ODBC data source from your computer, which populates the relevant fields automatically. Driver Name. Enter the name of the ODBC driver used by this data source. The driver, along with its support files, must already have been installed. Install Data Source for. Choose whether you want to install the ODBC data source for use with Win16 or Win32 APIs. Data Source Attributes. Enter the data source attributes here. The easiest way to obtain them is to copy them from the ODBC.INI file in the Windows directory. Display Configuration Dialogs. If this checkbox is marked, the installation displays configuration dialogs that let the end user configure the source for use on their computer system. Otherwise, the data source is installed silently, without end user intervention, using default settings. System DSN. Mark this checkbox to make the data source available to all user accounts on the destination computer.

205

5: WISESCRIPT ACTIONS

Configure BDE
The Configure BDE script action configures the Borland Database Engine during installation. If the IDAPINST.DLL Pathname and IDAPI Config. Template (contains the IDAPI.CNF file) fields are blank, the BDE uses the default values. This script item is normally called twice, once to read the default values for where BDE should be configured, and again to actually configure BDE given the locations you specify. The two files above are used during the installation process; after that theyre not needed. The database actions are advanced features. You should already know about BDE or ODBC before attempting to use these actions. The Wise Installation System helps you install database runtimes, but you should always check the Runtimes page on the Wise Solutions Web site for updates before installing runtime files. You should first select the runtimes you want on one of the runtime pages in Installation Expert, then modify the generated script. Adding this functionality to a script from within Script Editor requires advanced knowledge of either BDE or ODBC. You should use the BDE Runtime page to configure BDE.

Existing Config. Variable. The variable named in this field stores the full pathname of the existing IDAPI.CFG (or ODAPI.CFG) file. If no existing IDAPI configuration file exists, the variable is empty.

206

Config. Directory Variable. When the IDAPINST.DLL Pathname field is empty, this variable receives the default directory for the IDAPI.CFG file. When the IDAPINST.DLL Pathname field is filled, the IDAPI.CFG file is created in the specified directory. Config. File Name Variable. If an existing IDAPI configuration file exists, its name is placed into this variable. The file name in this field is used to create a new IDAPI configuration file. Lang. Directory Variable. This field holds the directory where the BDE Language Drivers are installed on your computer. DLL Directory Variable. This variable receives the default location for the BDE .DLLs. This is normally C:\IDAPI or the existing location of the BDE .DLLs. Returned Error Variable. If an error occurs during the configuration of BDE, a string describing the error is placed in the specified variable. This variable can be displayed to the end user with the Display Message script item. IDAPINST.DLL Pathname. This field holds the pathname of the Idapinst.dll file. This file must be installed for BDE to be configured. This file is normally placed into the %TEMP% directory and removed at the end of the installation. If this is blank, then the Wise Installation System fills the fields above by reading from the system. If its not blank, then it uses the value of those fields to actually configure BDE. IDAPI Config. Template. The IDAPI.CNF file is used during the installation to provide default values for BDE. This file must be installed prior to BDE configuration. This file is normally placed in the %TEMP% directory and removed at the end of the installation. BDE Type. Select whether BDE for Win16 or BDE for Win32 is being installed using the drop-down list. Win16 Variable. This variable is blank if the BDE configuration file supports only Win32 applications. If you plan to run both Win16 and Win32 BDE applications, you should set the variable to A. Language Number. This field holds the language number of the installed language resource file. If you want the language to be English, leave this field as is. If you want another language, enter one of the following language numbers: English: 0009; Danish: 0006; French: 000c; German: 0007; Italian: 0010; Norwegian: 0014; Portuguese: 0016; Spanish: 000a; Swedish: 001d. Another way to specify a language is to change the compiler variable _BDEWIN32LANG_ on the Compiler Variables page. Check the BDE help file (BDE32.hlp) for details on language numbers. Make sure the language resource file gets deployed on the destination computer.

207

5: WISESCRIPT ACTIONS

Note:
If you enter the wrong language number, your installation fails with a merge error.

Performing Partial BDE Installation. Mark this checkbox if you are installing a subset of the full BDE installation. Increment Use Counter. Mark this checkbox to increment the use counter.

Copy Local File(s)


Professional Edition only
Using the Copy Local File(s) action to copy from an FTP or HTTP server works only in the Professional Edition.

The Copy Local File(s) script action is used to copy uncompressed files from a floppy disk or CD-ROM during installation. It can even copy files from the destination computer, from a network, or from an FTP or HTTP server. However, it cannot handle wildcards for files copied from an FTP or HTTP server. Before you use Copy Local File(s) to copy files, you must be sure the files exist and are named as you expect.

208

Usage

Source. The location of the file or files to be copied at installation time. To specify files in the same directory as the installer .EXE, this should begin with the %INST% variable. This path should be started with a variable, and the value of the field should evaluate to a valid directory, to a file, or to files via a wildcard. Specify more than one file to be copied by using wildcards and by specifying a directory in the Destination field. See the following guidelines: If you want the progress bar that appears during installation to update correctly, do this: In the Source field, do not specify a wildcard; instead, specify a directory, such as %INST%\Pictures\. In the Local Path field, specify a directory ending with a wildcard, such as C:\MyPictures\*.jpg. The Source field will pick up the wildcard specified in the Local Path field. Specifying a wildcard in BOTH the Source field and the Local Path field results in a compile error. If you dont need the progress bar to update correctly, you can leave the Local Path field blank and enter a wildcard in the Source field instead, such as %INST%\Pictures\*.jpg. Destination. The location where the files should be copied to. If a wildcard or directory name is specified in the Source field or the Local

209

5: WISESCRIPT ACTIONS

Path field, this field should contain a directory path. Start this path with %MAINDIR% to copy files to the installation directory. Description. The text you enter here is displayed in the progress bar while the files are being copied. Local Path. A hard-coded path that specifies the location of the files on your computer at compile time. Filling in this field enables the progress bar to update correctly based on file size during installation. If you plan to use wildcards to copy multiple files, see the guidelines in the description of the Source field above. Require Password. If a password for the installation has been supplied in Installation Expert, and this checkbox is marked, the end user is prompted for a password before this file is installed. The password prompt appears only once during installation, regardless of the number of password-protected files being installed. It appears only for the first password-protected file in an installation. If the end user has chosen an installation configuration that does not include any password-protected files, the password prompt does not appear. Include Subdirectories. If a directory is entered as the Source, marking this checkbox causes the installation to copy any files in subdirectories of that directory as well. Shared DLL Counter. If this checkbox is marked, and the file is a .DLL or .VBX, it is entered in the registry so that Windows tracks which installed applications use it and prevents it from being removed if it is needed. No Progress Bar. Marking this checkbox causes the progress dialog to be hidden while this file is being copied. This is useful when youre installing a few small files that only require a second or two. Self-Register OCX/DLL/EXE/TLB. All .OCXs and .TLBs as well as some .DLLs and .EXEs support self-registration. If this checkbox is marked, the file registers itself in the Windows registry before it is used. The Copy Local File(s) action does not actually register the file, but merely records that it should be registered later. You should include a Self-Register OCX/DLL script action to actually register the item at the completion of the installation. See Self-Register OCXs/DLLs on page 281. If this action is not included, registration is performed automatically at the completion of installation. Dont Convert to Floppy. If Convert CD-ROM to Floppy is marked on the Build Settings page in Installation Expert, this file will not be affected. Replace Existing Files. Select an option to determine how to handle the installation of files that already exist on the destination computer.

210

Always. The new file always replaces the old file. Never. The file is never installed if it already exists. Use this for files, such as configuration files, which should be installed if they are not present, but which might be customized by the end user and should therefore not be replaced on re-installation. Check File. The File Version and File Date/Time drop-down lists become available. The existing file is only replaced if the requirements set in both fields are true. Doesnt Matter. Select this option for a field if you only need one of the two requirements, File Version or File Date/Time, to be fulfilled for the existing file to be replaced. Same or Older. (File Version) Replace the existing file if it has a version resource, and if it is the same as or older than the new file. If the existing file does not have a version resource, the new file is not installed. (File Date/Time) Replace the existing file if its modification date and time are the same or older than the new file. Older. (File Version) Replace the existing file if it has a version resource, and if it is older than the new file. If the existing file does not have a version resource, the new file is not installed. (File Date/Time) Replace the existing file if its modification date and time are older than the new file. Retain duplicates in path. Normally, version-checking removes existing copies of a .DLL that are found in the path directory list, to ensure that the path list only contains a single version of the .DLL. You can suppress this feature by marking this checkbox.

Example
To see how you can use this action to copy files from the Internet, see Downloading a File from a Web Site During Installation on page 408.

Create Directory
The Wise Installation System automatically creates directories as they are needed during installation. Use the Create Directory script action to create empty directories.

211

5: WISESCRIPT ACTIONS

Pathname. Enter the path of the directory to be created. Use variable substitution (such as %MAINDIR%) to create the new directory in a directory on the destination computer, rather than hard-coding a path.

Create Service
The Create Service script action gives you the ability to install a service on a Windows NT, Windows 2000, or Windows XP system. A service is a specially written application that can be set to run in the background and to start up automatically. If your software is uninstalled, the service is removed during the uninstall process. Consult your Windows developer documentation for information on creating applications that run as Windows services.

212

Service Name. The internal service name. This name is used internally by the service to register itself properly in the registry, and thus this value must match a value stored within the executable or .DLL that is the service. Display Name. The name that appears in the Services control panel. Executable Path. Specify the complete path to the executable file that is the service. If a long file name contains spaces, you do not have to enclose the path with quotation marks. You can use variable substitution to build a pathname. Login Username. The user name under which the service should run. Login Password. The password for the user name defined above. Error Control. Select an option from this drop-down list to determine what happens if an error is reported while starting up the service. Ignore Error. Logs the error in an error log and continues. Normal Error. Displays a message to the end user, logs the error in an error log, and continues. Severe Error. Logs the error. If the last known good configuration is being started, the startup continues. Otherwise, it reboots the system with the last known good configuration. Critical Error. Logs the error if possible. If the last known good configuration is being started, the startup fails. Otherwise, it reboots the system and sets it to the last known good configuration. Group. Enter the name of the load ordering group of which this service is a member. Leave this field empty if the service does not belong to a group. Dependencies. Enter a list of semicolon-separated names of services or load ordering groups that must start before this service. Leave this field empty if the service has no dependencies. If a service is dependent on a group, it means that at least one member of the group must be started for this service to run. Enter a plus sign (+) before group names to distinguish them from service names. Services and service groups share the same name space. For example, if you enter this string, "ftpsvr;httpsvr;drc;+widget", you create dependencies on the ftpsvr and httpsvr services and the widget group. Service Type. Choose whether to start the service in its own process, as a shared process, as a kernel driver, or as a file system driver. Start Service. Indicate when the service should be started: at boot, when the system loads, automatically after startup, or manually. You can also set Startup to be disabled. These options correspond to options in the Services control panel.

213

5: WISESCRIPT ACTIONS

Service interacts with desktop. Mark this checkbox to let the service display its user interface, if any.

214

Create Shortcut
The Create Shortcut script action lets you create a shortcut on Windows 95, 98, Me, 2000, NT 4.0, and XP operating systems. You can use this action to add shortcuts to the desktop or Start menu.

Source Path. The full path of an existing file. Enter a pathname, click Browse to select a file from your installation, or use variable substitution to build a pathname. For instance, start the path with %MAINDIR% to point to the installation directory. Do not enclose the source path in quotes because WiseScript adds quotes automatically. Destination Path. The path to the new shortcut file. The path should end in .LNK. To create a shortcut in the Start menu or on the desktop, first read the appropriate directory names from the registry into a variable, then use variable substitution to specify the appropriate directory here. The following keys might be useful. Programs. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Explorer\Shell Folders\Programs StartUp. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Explorer\Shell Folders\StartUp

215

5: WISESCRIPT ACTIONS

Desktop. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Explorer\Shell Folders\Desktop Command Options. If the shortcut is to an .EXE file, you can enter command line options for the program here. Default Directory. Enter the default directory that should be set when launching the application, if not the directory the application is in. Use %MAINDIR% to substitute for the directory the application is being installed in, rather than hard-coding a pathname. If you view the Properties dialog for this shortcut in Windows Explorer, this field is referred to as the Start in directory. Description. Enter a description for the shortcut that can be read by MS-DOS programs. Icon Pathname. Enter a pathname, click Browse to select a file from your installation, or use variable substitution to build a pathname. This field specifies the icon to be used for the shortcut if you do not want to use the source files original icon. Window Size. Choose to have an .EXE file open in its default window, a maximized (full-screen) window, or minimized. Icon Number. Enter the number of the icon to use from the file selected in the Icon Pathname field above. Technical Note:
An executable or icon file can have multiple icons contained within the file. To see the icons in a file, go to Windows Explorer, right-click any shortcut file, and select Properties. Click the Shortcut tab, then click the Change Icon button. The Change Icon dialog appears. It contains a graphical list of icons for the shortcut file you right-clicked. The icon number of the first icon is 0, the icon number for the second is 1, and so on. To see the icons in a different file, click Browse and choose a different file.

Shift State. Select a hot-key combination from the drop-down list to be used with a single letter or number in the Hot-Key Letter field, below. Hot-Key Letter. Enter a single letter or number to be used as a hot key (in combination with the modifier keys selected in the Shift State, above) for opening this shortcut. Support OSD software update checking. Open Software Description (OSD) is a Microsoft technology for describing and distributing software. Marking this checkbox enables the shortcut youre creating to work with OSD. For more information on OSD, search the Microsoft Web site for the words Open Software Description.

216

Check self-repair items when this shortcut is opened. This checkbox turns on self-repair functionality for this shortcut. Typically, you turn this checkbox on for a shortcut that launches your application. To use this feature, you must configure your installation for self-repair. See Automatic Self-Repair on page 35 for a description of how to set up self-repair. Professional Edition only
Self-repair support is available only in the Professional Edition.

Custom Billboard
Use the Custom Billboard script action to create scalable images to display to end users while the installer is running. For details on creating and editing images using the Custom Billboard editor, see Creating Custom Billboards on page 337. Billboards are the images that appear in the background of an installer while installation is taking place. They are typically used to convey useful tips, new features, and marketing information to end users while they are waiting for the installation to finish.

Custom Dialog
Use the Custom Dialog script action to create your own dialog or dialog set. For details on creating and editing dialogs and dialog sets, see Creating Custom Dialogs on page 293. If you want to add a dialog inside the default wizard loop, go to the Dialogs page in Installation Expert and add a new dialog by clicking the Add button. If you create a new dialog from the Dialogs page, the new dialog is automatically the same size as the other dialogs, and its Back and Next buttons are pre-configured to correctly handle click events. If you create a new dialog from scratch within a wizard loop in Script Editor, you must configure these settings yourself. To read about scripts that demonstrate this action, see Using Custom Dialog Examples on page 400. For details on the dialog Properties dialog, see Setting Dialog Properties on page 299.

217

5: WISESCRIPT ACTIONS

Delete File(s)
To remove files on the destination computer, use the Delete File(s) script action. Use this script action to delete files that youve copied during the current installation, or to delete files from a previous version of your software, or to delete any other files from the destination computer. If you used an Install File(s) script action to place a temporary file in the Windows Temp directory, you should use this script action to remove it. However, if you used the Get Temporary Filename script action to create a temporary file, you do not need to delete it because it is automatically deleted when the installation has finished.

Pathname. Use a variable to specify the file or directory the WiseScript should delete. For example, enter %TEMP%\MyDll.dll. You can use a wildcard to delete multiple files with one command. Because you could accidentally delete files you didnt install, you should test this option thoroughly. You cannot perform wildcard deletions in the Windows and System directories and their parent directories or in the root directory. Clicking Browse shows only files in the current WiseScript that are installed into the %MAINDIR%, %SYS32%, %SYS%, OR %FONTS% directories; see Automatic Runtime Variables on page 419. Because %MAINDIR% is not pre-defined, you have to define it yourself with a Set Variable action. Include Sub-Directories. If you entered the pathname to a directory (or used a wildcard), and want the operation to delete not only the selected item but all sub-directories and their files, mark this checkbox. Remove directory containing files. Mark this checkbox to also delete the directory in which the deleted file resides if its empty after its contents have been deleted.

218

Display Billboard
Use the Display Billboard script action to display graphics, referred to as billboards, on the screen during installation. You can display up to sixteen 256 color or true color bitmaps simultaneously. If you plan to display multiple images at the same time, make sure all of them use the same color palette. You can create scalable billboards with the Custom Billboard Editor. Scalable billboards shrink and grow proportionally (without jagged edges) according to the size of the screen. See Creating Custom Billboards on page 337. When you add the Display Billboard action, the Billboard Settings dialog opens.

Usage

Pathname. Specify the path to the image files you want to display. This is a path to the actual image file on your computer, which is compiled into the installer .EXE. X Position and Y Position. Indicates the location on the screen at which the specified image should be positioned. Specify these coordinates for a 640x480 screen. On screens with larger resolutions, the billboard will be placed proportionately based on the 640 x 480 location. Erase Num. This field determines how many of the graphics currently being displayed should be erased before the new image is displayed. To display only one image at a time, set this field to 1. The oldest image is removed first.

219

5: WISESCRIPT ACTIONS

Build Effect. Determines the transition effect used to display the image. You can use this drop-down list to cause the graphic to fade in, or to move onto the screen from any edge of the screen. Transparent. Mark this checkbox to have the pure blue (R=0, G=0, B=255) parts of your image become transparent. This feature is available for 256 color bitmaps only. Center Horizontal. Mark this checkbox to display your image horizontally centered. Place at Right. Mark this checkbox to display your image at the right edge of the screen. Due to rounding errors inherent in the Windows MetaFile format, this option might be slightly inaccurate when used with custom graphics that have been scaled to the screen. Scale to Screen. Mark this checkbox to scale the image to take up the same proportion of the screen regardless of screen resolution. It is displayed at actual size in 640x480 mode. Scaled billboards shrink and grow proportionally (without jagged edges) according to the size of the screen. Hide Progress Bar. Mark this checkbox to hide the progress indicator while this graphic is being displayed. Center Vertical. Mark this checkbox to center the image vertically. Place at Bottom. Mark this checkbox to place the image at the bottom of the screen. Due to rounding errors inherent in the Windows MetaFile format, this option might be slightly inaccurate when used with custom graphics that have been scaled to the screen. Tile Background. Mark this checkbox to repeat the graphic edge-toedge to fill the entire screen. Erase All. Mark this checkbox to remove all previous graphics from the screen before displaying the new one. Timed Display. Mark this checkbox to automatically display a series of graphics at evenly-spaced intervals during installation. Display time is calculated by the installer .EXE based on the number of files to be displayed. Place all Display Billboard actions before the first Install File(s) action if you are using Timed Display. Local Graphic. Normally, graphics are copied to the installers .EXE. Enter a pathname here (typically beginning with the %INST% variable substitution to specify the directory containing the installers .EXE) to indicate that the graphic to be displayed is in a separate file. This can be useful to allow you to change graphics without having to rebuild the .EXE.

220

Example
To read about a script that demonstrates this action, see Creating an Installer That Can Be Customized During Compile on page 395.

Display Message
Use the Display Message script action to display a message to the end user and to specify whether part of your script is executed based on the end users response to the message. Normally, the message dialog includes OK and Cancel buttons; OK continues the installation, and Cancel aborts the installation. You can also turn the Display Message script action into an If statement, which lets your script execute different code according to end user input. If you mark the Start of Block checkbox, the message dialog contains a Yes, No, and Cancel buttons. If the end user clicks Yes, the script lines after the If Display Message script line are executed; if the end user clicks No, the script lines are not executed; if the end user clicks Cancel, the installation is aborted.

Usage

Message Title. Enter the text to be displayed in the title bar of the message dialog.

221

5: WISESCRIPT ACTIONS

Message Text. Enter the text to be displayed in the message dialog. Press CTRL-ENTER to add line breaks in the displayed text. You can use variable substitutions in this text. Message Icon. Choose an appropriate icon for your message dialog from Windows message icons, including Information, Exclamation, and Question. You can also choose to display no icon. Start If Block. If this checkbox is marked, the message box includes Yes, No, and Cancel buttons instead of the standard OK and Cancel buttons. The Display Message action then acts as the start of a conditional If block; statements between this action and its matching End action are executed only if the end user clicks Yes. If the end user clicks No, execution continues with the first action after the closing End action. Clicking Cancel aborts the installation. No Cancel. If this checkbox is marked, the Cancel button is suppressed. Use this for informational messages where you do not want the end user to have the option to cancel installation. Note:
The Display Message script action is ideal for helping you to debug and test your script. You can add this action anywhere in your script to display the value of a variable; just enter %VARIABLE_NAME% in the Message Text field of this dialog, and when you run the installer, the message dialog appears with the value of the variable. See Building a Debug Version on page 164 for more information.

Example
To read about a script that demonstrates this action, see Checking Disk Space by Calling a Windows .DLL on page 411.

Display Progress Message


Use the Display Progress Message script action to display a message to the end user during installation. An example is, Updating the registry. This may take a few minutes. The end user cannot close these messages or use them to cancel the installation.You also use this script action to remove a progress message from the screen.

222

Remove previous progress messages. If this option is marked, any progress messages that are displayed during the installation are cleared from the screen. Display a new progress message. If this option is marked, the installation displays a progress message during the installation. Message Title. Enter the title for the dialog that displays the message. Message Text. Enter a brief message to be displayed during the installation. You can include variable references. X-Position / Y-Position. Use these fields to specify the exact location of the upper left corner of the progress message dialog on the end users screen, in pixels. Height / Width. Specify the exact dimensions of the progress message dialog in pixels. Center Horizontally. If you want the progress message dialog to be centered horizontally on the end users screen, mark this checkbox. Marking this checkbox overrides any value you enter in the X-Position field. Center Vertically. If you want the progress message dialog to be centered vertically on the end users screen, mark this checkbox.

223

5: WISESCRIPT ACTIONS

Marking this checkbox overrides any value you enter in the YPosition field. When you add a Display Progress Message action to your script, the resulting dialog contains the dialog title you specified and the descriptive message text you entered.

Display Text File


Use the Display Text File script action to display a 30K or smaller text file in a dialog. The file to be displayed should already be installed on the destination computer. If you do not need the text file after installation is complete, install it with a temporary name. First use the Get Temporary Filename action to put a random file name into a variable, then install the text file into the Temp directory by preceding that variable with %TEMP%. This script action is included to provide backward compatibility for scripts created in earlier versions of the Wise Installation System.

File Pathname. Specify the pathname of the text file to be displayed or use variable substitution to build a pathname. Using variable substitution ensures that the pathname is valid on the destination computer. Window Title. Enter the title for the window that displays the text file. Description. Enter a brief notice to be displayed at the bottom of the dialog. When you add a Display Text File action to your script, the resulting dialog contains a list box with the text in the text file, the window title you specified, and the descriptive text you entered.

224

Edit INI File


Use the Edit INI File script action to edit your programs private .INI files as well as the WIN.INI and System.ini files. You should not use this action to add device drivers to the 386Enh section of the System.ini file; use the Add to System.ini action to make these changes. Editing System.ini that way causes Windows to be restarted after installation. Editing with Edit INI File does not force Windows to restart, and might corrupt the file.

225

5: WISESCRIPT ACTIONS

File. Enter the pathname to the file to be edited. The drop-down list provides quick access to file names based on script variables (for example, %MAINDIR%\NONAME.INI), which can easily be edited to refer to the file you need to modify. INI File Contents. Enter the modifications to be made to the .INI file. Each line in this field is interpreted separately, as follows: Lines with text enclosed in square brackets (such as [Section]) tell the installation to put the lines that follow in the indicated section of the .INI file. If you include a section name with no entries after it, that section and all its entries are deleted. Lines that start with a parameter name followed by an equals sign (=) and a value indicate lines that should be added to the .INI file. (For example, ProgPath=%PROGDIR%.) If the .INI file already contains an entry for the specified parameter, the existing entry is replaced. If you include a parameter name with no value (for example, Progpath=), that entry is deleted if it exists. Comments, lines starting with ;, are not allowed.

226

Edit Registry
The Edit Registry script action lets you add, edit, or delete keys or values in the registry. You can either create registry entries by hand, or import a registry file (.REG). In the Edit Registry Settings dialog, you specify what keys and values to add. Once you click OK in the Edit Registry Settings dialog, the Edit Registry script line is added to your script. You can edit the registry settings by double-clicking on the Edit Registry script line and editing the keys and values.

Usage

Registry Keys. The root registry keys, and the keys you have added, are listed in the upper-left panel of the dialog. Value Names. All names for values you have added or changed in the selected registry key are shown in the upper-right panel of the dialog. New Key. Click Key from this drop-down button to add a new key under the key selected in the Registry Keys panel. The Registry Key Settings

227

5: WISESCRIPT ACTIONS

dialog opens, where you can enter information about the new key. See Registry Key Settings Dialog on page 228. You can click Import from this drop-down button to import a registry file (.REG). Note that by adding a key, you are not necessarily adding it to the registry on the destination computer. Adding a key to the Edit Registry action simply tells the installation that you plan to perform another operation on it; the actual operation might be to add a value, to update it, or to delete it and all its associated values. Delete Key. Deletes the selected key and all its associated subkeys and values from the current installation. New Value. Adds a new named value under the selected key or subkey. The Registry Key Settings dialog opens, letting you enter information about the new value. Delete Value. Deletes the selected named value from the Value Names panel in your installation, telling the installation that you do not want to modify that key after all. Data Settings. The Data Settings panel contains editable information about the selected key and value. The Value, Type, and Operation fields available in this panel are the same as the fields of the same name in the Registry Key Settings dialog. See Registry Key Settings Dialog on page 93. Repair application if this registry value is missing. Self-repair prevents your application from failing if this registry value has accidentally been deleted. Mark this checkbox to initiate self-repair if this registry value is missing during application launch. The end user must have access to the installation media to perform a repair, and you must also configure a shortcut to your application with self-repair turned on. To use this feature, you must configure your installation for selfrepair. See Automatic Self-Repair on page 35 for a description of how to set up self-repair. Professional Edition only
Self-repair support is available only in the Professional Edition.

Registry Key Settings Dialog


The Registry Key Settings dialog is used to set properties of newly added keys and values. When you add a key to an Edit Registry action, you are indicating that you want to make a change to that key. The change might be to delete the key or its value.

228

Operation. This field determines what operation is applied to the key and/or its associated value. Create/update key and value. The value is updated if it already exists, or if the key or value does not exist, it is created. Create empty key. Creates the key but does not add any values. Remove key and all subkeys. Deletes the key, its subkeys, and all named values associated with the key and its subkeys on the destination computer. Remove key and value only. Removes the named value from the key on the destination computer. If the key has other named values, they are preserved. Preserve existing key and value. Adds a new key or value if the specified item does not exist, but leaves the existing value in place if one already exists. Root. The parent key in which the new key is added. Key. The name of the new key. You can create multiple hierarchical keys at once by separating them with backslashes, as in directory pathnames. For example, a key of NewDocument\Protocol\StdFileEditing creates the StdFileEditing key inside the Protocol key, which is created inside the NewDocument key. Any keys in the path that do not exist are automatically created. Value Name. The name of a new named value. Data Value. The data for the value. If the Data Type (below) is Double word (DWORD), the data should be in decimal notation. To insert multiple lines of data here, hold down the CTRL key and press the ENTER key to begin a new line.

229

5: WISESCRIPT ACTIONS

Data Type. The type of data contained in the named value. Available types are listed below. The associated Windows API data types are in parentheses. String. (REG_SZ prefix) Indicates that a value entry is an expandable string. If you want to embed a variable name, (such as %WIN%), you must enclose it with double percents (%%WIN%%). If you only enclose it in single percents, then the variable name is expanded to its actual value. This allows Windows NT4/2000/XP system variables to be embedded. Unexpanded string. (REG_EXPAND_SZ prefix) Identifies a value entry as an unexpanded data string. If you want to embed a variable name, (such as %WIN%), you must enclose it with double percents (%%WIN%%). If you only enclose it in single percents, then the variable name is expanded to its actual value. This allows Windows NT4/2000/XP system variables to be embedded. Multiple strings. (REG_MULTI_SZ prefix) Identifies a value entry as a multiple string. These are multiple pieces of text, separated by carriage returns. This is only supported for installations on Windows NT4/2000/XP. Double word. (REG_DWORD prefix) Identifies a value entry as a 32-bit (DWORD) entry. Binary/Hex. (REG_BINARY prefix) Identifies a value entry as binary. Each byte should be separated by at least one blank space. For instance: AD 30 C0 A9 40 20 A8 FC 4C 00 08. None. This is provided for compatibility with SMS Installer installations; it behaves the same as the binary data type. Repair application if this registry value is missing. Self-repair prevents your application from failing if this registry value has accidentally been deleted. Mark this checkbox to initiate self-repair if this registry value is missing during application launch. The end user must have access to the installation media to perform a repair, and you must also configure a shortcut to your application with self-repair turned on. To use this feature, you must configure your installation for selfrepair. See Automatic Self-Repair on page 35 for a description of how to set up self-repair. Professional Edition only
Self-repair support is available only in the Professional Edition.

230

Example
To read about a script that demonstrates this action, see Running a Program Once After Computer Restart on page 396.

Else Statement
The Else script action marks the beginning of a section of instructions to be executed when the condition specified in the matching If action is false. It takes no parameters; selecting it from the Actions list inserts it into the script.

ElseIf Statement
Use the ElseIf script action inside an If block to check for another condition. It marks the beginning of a block of code that is executed only if the condition checked by the If is false, all previous ElseIfs are false, and this ElseIf is true. You can use one If statement with multiple ElseIf statements to check for multiple conditions. An ElseIf statement must be contained inside an If block.

If Variable. Select the name of the variable involved in the test for this conditional block or loop. Comparison. To the right of the If Variable field, select an option to determine how the variable is compared to the value. Equals, Not Equal. The value of the variable must or must not equal the value given in the field. Equals (Ignore Case), Not Equal (Ignore Case). The value of the variable must or must not equal the value given in the field. The case of the value is ignored. Contains, Does Not Contain. The value of the variable must or must not contain the text given in the Value field. Greater Than, Greater Than or Equal To. The value of the variable must be greater than or equal to the value given. Less Than, Less Than or Equal To. The value of the variable must be less than or equal to the value given.

231

5: WISESCRIPT ACTIONS

Contains Any Letters In. At least one of the letters in the variable must be found in the value given in the field. This comparison and the next one are useful for testing the results of a Radio Button Dialog action, which returns the buttons that were marked as a series of letters. Contains Letters Not In. At least one of the letters in the variable must not be found in the value given in the Value field. Length Equal To. The length of the text in the variable must equal the value given below. Expression True. The expression in the Value field below is evaluated according to the rules outlined in Variables and Expressions on page 167. The variable name specified is ignored and can be left blank. The result is considered true if it evaluates to a non-zero result. Valid Password, Invalid Password. Evaluates to true if the value entered matches the password entered on the Passwords page in Installation Expert. The Value. Enter the value to be used in the comparison, or an expression if the drop-down list is set to Expression. If you enter variable names in this field, do not surround them with percent signs (%). If you enter compiler variables, then you still must surround them with percent signs.

End Statement
The End script action marks the end of an If block or a While loop. It takes no parameters, and selecting it from the Action list inserts it directly into the script with no further dialogs or prompts.

Evaluate Windows Installer Condition


The Evaluate Windows Installer Condition script action evaluates a condition in the currently-running Windows Installer installation. You enter a Windows Installer condition and choose a WiseScript variable to hold the result. It puts the value of 1 (true) or 0 (false) into the WiseScript variable. This script action only appears if you install Wise for Windows Installer on your computer after you install the Wise Installation System. It is only relevant in a WiseScript that you plan to call with a Windows Installer installation.

232

Windows Installer installations only


This action appears only if you have installed Wise for Windows Installer after installing the Wise Installation System.

Dest. Variable. Enter or select the name of a temporary WiseScript variable in which to store the result of the Windows Installer condition. The variable is set to 1 if the condition is true, or 0 if false. Condition. Enter a condition to evaluate. This can be any condition that can be evaluated in Windows Installer. You can either enter the literal condition or use WiseScript variables enclosed in percent signs.

Execute Program
The Execute Program script action lets your script run another .EXE file. The .EXE file can be a file already installed on the destination computer, a file you installed as part of your installation, or a file you provide on a separate disk. If the program you plan to execute is designed to pass back a return value, the resulting return value is put into the variable %INSTALL_RESULT% and the variable %PROCEXITCODE%. If the program passes back a return value, you must mark the Wait for Program to Exit checkbox.

Usage

233

5: WISESCRIPT ACTIONS

EXE Path. Specify the path to the program to be executed or build a pathname using variable substitution, for example, %MAINDIR% to refer to the application directory. Using variable substitution ensures that the correct path is used regardless of where the end user installs your software. Command Line. The command line options for the program you are calling, as if you were typing them in the Run dialog. Default Directory. 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 program. Click Browse and choose a directory thats part of your installation. You can choose from directories that you created on the Files page in Installation Expert. Variables Added. List any variables created in the external program 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. Choose 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 program returns a value to the Wise Installation System. If the installation does not wait for the program to exit, add the command line parameter -sms. Technical Note:
This script action uses the Windows ShellExecute call, which means that you can open documents as well as applications. When your script opens a document, the associated application is automatically launched. In Windows 95, the Write.EXE program calls the WordPad.EXE program. If you have instructed the script to wait until the program exits, call WordPad.EXE directly; otherwise your script continues immediately without showing WordPad.EXE because Write.EXE quits itself.

Example
To read about scripts that demonstrate this action, see Downloading a File from a Web Site During Installation on page 408 or Prompting the User to Insert a Floppy Disk on page 400.

234

Exit Installation
The Exit Installation script action exits the installation, first calling the script stored in the Exit event area, accessible via the Event drop-down list in Script Editor. No message is displayed to the end user with this script action unless you also set the RESTART variable. You can set the exit code, also called return code, of this installation within this action. If you deploy this installation through Microsoft SMS, you have further options for Status MIF files.

Application Exit Code. If this installation is called by another application, this is the return code that will be returned to the calling program. However, is WISE_ERROR_RTN variable is already set, the value in WISE_ERROR_RTN will override this value as the return code. Read about WISE_ERROR_RTN in Runtime Variables on page 422. Install Status MIF. This section is disabled unless you have entered Status MIF information on the Microsoft SMS page in Installation Expert, which is only available in the Professional Edition. MIF Text. This text is added to your Status MIF file when this Exit Installation action is executed. Success/Failure. A status for the installation is added to the Status MIF file.

Find File in Path


The Find File in Path script action searches each of the directories listed in the PATH environment variable for a particular file, and returns the path to the file, or a default value if the file is not found in any of the listed directories. If more than one match is found, only the first match is returned.

235

5: WISESCRIPT ACTIONS

Usage

File Name. Enter the name of the file to search for here. The file name must not contain wildcard characters (*, ?). Variable Name. Enter the name of the variable where the path to the file should be stored if it is found. Default Value. Enter the value the variable equals if the file is not found in any of the searched directories. Leave this blank if you plan to use an If action to determine whether the file was found. If your goal is to install a new version of the file, you could specify the location where the file is normally installed here. That way, if the file was located in one of the path directories, the new version of the file would be installed in the same directory. If the file was not installed, it would be installed into a default location. Search Directories. Enter the directories to be searched, with each entry separated by a semicolon. You can use variable substitution in this field. If this field is blank, the PATH environment variable is used. Remove filename. Mark this checkbox to remove the file name from the end of the returned path, leaving only the path to the directory where the file was found. This does not apply to the default path. If you mark this checkbox, do not specify a file name as the default.

Example
To read about a script that demonstrates this action, see Finding a File in the PATH Environment Variable on page 396.

236

Get Environment Variable


The Get Environment Variable script action copies a Windows environment variable to a script variable. Environment variables are listed in System control panel; the System Variables list in the Environment tab of the System control panel shows environment variables.

Usage
In the Get Environment Variable dialog, you specify which environment variable to get, and in which variable to put its value.

Environment Variable. The name of the Windows environment variable you want to retrieve. Variable Name. The name of the script variable you want to store the value in. Default Value. The value, if any, that should be stored in the script variable specified above if the specified environment variable is not found. Remove File Name. If the environment variable typically contains a path to a file name, and you want to obtain the path to the directory that contains the file, mark this checkbox. This does not apply to the default path. If you mark the Remove File Name checkbox, do not specify a file name in the Default Value field.

237

5: WISESCRIPT ACTIONS

Example
You could use the Get Environment Variable to run a batch file or other program in a DOS window from within the Wise Installation System. To do this, you use Get Environment Variable to put the value of ComSpec into a WiseScript variable; for instance, put it in %COMMAND%. ComSpec is a Windows variable that holds the path to command.com, the DOS command line environment. You can then use the Execute Program action to call command.com. To do this, in the Execute Program Settings dialog, enter %COMMAND% in the EXE Path field, and enter the name of your batch file or program in the Command Line field. Also add the /c as a command line option to cause the command line window to close when your program finishes execution.

Get Name/Serial Number


The Get Name/Serial Number script action displays a standardized dialog that requests the end users name, company name, and a product serial number. This script action is included to provide backward compatibility for scripts created in earlier versions of the Wise Installation System. You can use the Branding / Registration dialog on the Dialogs page in Installation Expert to achieve the same effect.

Technical Note:
In the default script generated by Installation Expert, this function is performed by a Wizard dialog that reads the name and company from the registry.

238

Title. Enter the title for the dialog. Description. Enter a brief text message to be displayed in the dialog above the data entry fields. Name Prompt. Enter the text that should appear next to the Name data entry field in the Name/Serial Number dialog. Company. Enter the text that should appear next to the Company data entry field in the dialog. Serial Number. Enter the text that should appear next to the Serial Number field in the dialog. Variable. The three Variable fields specify the variables that receive the Name, Company, and Serial Number from the dialog when the end user accepts the dialog. Confirm Text. Enter the text to be displayed to confirm the end users registration in a separate dialog. If no text is entered in this field, the end users information is not confirmed.

239

5: WISESCRIPT ACTIONS

Get ProgMan Group


The Get ProgMan Group script action displays a standardized dialog with a list of items that exist in the Programs group in the Windows Start menu. If it is executed on a pre-Windows 95 operating system, it displays Program Manager groups. The end user can select a directory, accept a directory you provide, or enter a new directory name. Technical Note:
In the default script generated by Installation Expert, this function is performed by a Wizard dialog, not a Get ProgMan Group script action.

The Wise Installation System reads existing group names via a DDE link to the Program Manager. Most, but not all, Program Manager replacements support this method of reading the group names.

Window Name. Enter the title for the dialog. Description. Enter a brief text message to be displayed in the dialog above the list of groups. Prompt Name. Enter a brief prompt for the end user, such as Choose a Start menu group or enter a new one, to be displayed immediately above the data input field. Default Value. Enter the default Start menu group. Variable Name. Enter the name of the variable that holds the group chosen by the end user.

240

Get Registry Key Value


The Get Registry Key Value script action gets the value of a registry key and stores it in the specified script variable. The Get Registry Key Value script action can read MULTI_SZ (multi-line) registry values. They are read as a carriage return/line feed-separated list of lines.

Usage

Variable Name. The name of the script variable in which you want to store the value. Default Value. The value, if any, that should be stored in the script variable if the specified registry database entry is not found. Registry Key. The registry database key to be retrieved. Value Name. If you are reading a named value from the Win32 registry, enter the value name. If you are reading the Win16 registry, leave this field blank. Root. If you are reading the Win32 registry, select the root key for the registry tree that contains the value being retrieved. If you are reading the Win16 registry, leave HKEY_CLASSES_ROOT selected. Remove File Name. If the registry entry typically contains a path to a file, and you want to obtain the path to the directory that contains the file, mark this checkbox. This does not apply to the default path. If you mark the Remove File Name checkbox, do not specify a file name in the Default Value field.

241

5: WISESCRIPT ACTIONS

Expand Environment Variables. If you read a registry value of the type REG_EXPAND_SZ, all environment variables in the registry value are replaced with their actual values if you mark this option.

Example
To read about a script that demonstrates this action, see Launching a Web Page from an Installer on page 408.

Get System Information


The Get System Information script action can retrieve information about the destination computer, including the date and time, Windows or DOS version, available memory, information about files and volumes, the name and company of the owner of this copy of Windows, network information, and more.

Usage

Variable Name. The name of the script variable in which you want to store the retrieved value. Retrieve. The kind of information you want to retrieve. The following types of information can be obtained: Current Date/Time. Military-style (24 hour) date and time, in the format MM/DD/YY HH:MM Windows Version. The version of Windows in #.# format (for example, 3.10) DOS Version. The version of DOS in #.# format (for example, 6.22) K Bytes Available Memory. The amount of physical memory on the destination computer File Date/Time Modified. The date and time the file specified in the Pathname field was modified, in military (24-hour) MM/DD/YY HH:MM format

242

File Version Number. The version number of the file specified in the Pathname field, in the format #.#.#.# (for example, 2.5.4.0). If the file does not have a version resource, the response is blank (no characters). Registered Owner Name. The user name entered when Windows was installed. This is used to pre-fill the Branding / Registration dialog. Registered Company Name. The company name entered when Windows was installed. This is used to pre-fill the Branding / Registration dialog. Drive Type for Pathname. The type of drive of the file or directory whose path is in the Pathname field; N (network), H (hard disk), C (CD-ROM), F (floppy or removable disk), R (RAM disk). First Network Drive. The letter of the first network drive, followed by a colon. If there are no network drives, the response is blank. First CD-ROM Drive. The letter of the first CD-ROM drive, followed by a colon. If there is no CD-ROM drive, the response is blank. Win32s Version. The version number of the currently running Win32s system in #.# format, or blank if Win32s is not installed. Full UNC Pathname. The Universal Naming Convention pathname of the resource. Installer EXE Pathname. The full pathname, including the file name, of the installation currently executing. File Size (Bytes). The size of the file you specify in the Pathname field. Volume Serial Number. The serial number of the disk drive specified in the Pathname field. Volume Label. The label of the disk drive specified in the Pathname field. Windows Logon Name. The Windows network logon name of the person logged onto the destination computer. Service Pack Number. Returns the service pack number of the operating system, if one exists. Current Date/Time (4-digit year). The current date and time on the destination computer, showing a four-digit year. File Date/Time Modified (4-digit year). The date and time the file in the Pathname field was modified, showing a four-digit year. Disk Free Space (KBytes). Returns the free disk space in kilobytes on the disk specified by the Pathname field. In the Pathname field, you can enter just a drive (C:\), or you can enter a pathname

243

5: WISESCRIPT ACTIONS

(%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 (Universal Naming Convention) path such as \\SERVER\Apps\CAT.EXE. Windows 95 does not return the disk space for UNC paths. Current Date/Time (Regional settings). Gets the data and time specified by the destination computers regional settings. Pathname. The pathname of the file or directory whose information you want to retrieve, for operations that retrieve information on files or directories. If you are simply getting the system date and time, you can place that information into a variable and leave this field blank. If you are getting information on a file, use this field to specify the files path. Specify a pathname or use variable substitution to build a pathname.

Example
To read about a script that demonstrates this action, see Making an Installer Open Automatically (AutoPlay) on page 403.

Get Temporary Filename


During installation, you might need to create a temporary file for .DLLs called by the installation script, help files, and so on. The Get Temporary Filename script action generates a temporary file name and stores it in the specified variable. You can then use that name to install or copy a file to the Windows Temp directory (%TEMP%) with assurance that the file name does not conflict with any other file name. Files you create using Get Temporary Filename are automatically deleted when the installation finishes.

Variable. The name of the variable in which to store the temporary file name. Note that only a file name is generated; to refer to this file, you should always prefix it with the %TEMP% variable extension. So if you stored the temporary file name in a variable called %HELPFILE%, the full path of the file would be %TEMP%\%HELPFILE%.

244

Get Windows Installer Property


The Get Windows Installer Property script action gets the value of a property in the currently-running Windows Installer installation and puts it into a WiseScript variable. It only appears if you install Wise for Windows Installer on your computer after you install the Wise Installation System. This script action is only relevant in a WiseScript that you plan to call with a Windows Installer installation. Windows Installer installations only
This action appears only if you have installed Wise for Windows Installer after installing the Wise Installation System.

Dest. Variable. Enter or select the name of a temporary WiseScript variable in which to store the value of a Windows Installer property. Property Name. The name of the Windows Installer property. This property is from the currently-running Windows Installer installation.

245

5: WISESCRIPT ACTIONS

Halt Compilation
The Halt Compilation script action immediately halts compilation of your script. You should place it between Compiler Variable If and Compiler Variable End statements; if you do not, your script never compiles. Use this script action when you want to test for certain conditions before compiling your installer.

Usage
In the Halt Compilation Settings dialog, you enter message text.

Message Text. Enter the message the end user sees if the compilation is terminated.

Example
For instance, suppose you develop an installation script that uses certain runtime filesif older versions of those runtime files are used, the resulting installer could damage runtime installations on destination computers. On your own computer, you can verify that you have the latest version of the runtime files, but because your installation script might be compiled on other computers, you need a way to prevent compilation if those computers do not contain the correct runtime versions. To solve this problem, you could add a Compiler Variable If/Else/End block. Inside the compiler block, you first get the file version number of a key runtime file using the file version checking option of a Compiler If statement. Then, if the file version number is not the one your script requires, you use the Halt Compilation script action to prevent compilation with outdated files.

246

If Statement
This script action marks the beginning of a conditional block of script, an If block. If the condition specified in the If action is true, the script lines inside the If block are executed; if the condition is false, the script lines inside the If block are not executed. The If block can also contain an Else or several ElseIf actions that mark the beginning of actions to be executed when the condition specified by the If is not true.

Usage

If Variable. Select the name of the variable involved in the test for this conditional block or loop. Comparison. To the right of the If Variable field, select an option to determine how the variable is compared to the value. Equals, Not Equal. The value of the variable must or must not equal the value given in the field. Contains, Does Not Contain. The value of the variable must (or must not) contain the text given in the Value field. Greater Than, Greater Than or Equal To. The value of the variable must be greater than or equal to the value given. Less Than, Less Than or Equal To. The value of the variable must be less than or equal to the value given. Contains Any Letters In. At least one of the letters in the variable must be found in the value given in the field. This comparison and the next one are useful for testing the results of dialogs containing radio buttons, list boxes, or checkboxes, which return letters to indicate which options the end user selected. Contains Letters Not In. At least one of the letters in the variable must not be found in the value given in the Value field. Length Equal To. The length of the text in the variable must equal the value given below. Expression True. The expression in the Value field below is evaluated according to the rules outlined in Variables and Expressions on page 167. The variable name specified is ignored and

247

5: WISESCRIPT ACTIONS

can be left blank. The result is considered true if it evaluates to a non-zero result. Equals (Ignore Case), Not Equal (Ignore Case). The value of the variable must or must not equal the value given in the field. The case of the value is ignored. Valid Password, Invalid Password. Evaluates to true if the value entered matches the password entered on the Passwords page in Installation Expert. The Value. Enter the value to be used in the comparison, or an expression if the drop-down list is set to Expression.

Example
To read about a script that demonstrates this action, see Finding an Application That Is Associated With an Extension on page 396. To read about scripts that demonstrate evaluating expressions within an If statement, see Performing Calculations on Integer Values on page 398 or Parsing Strings Using Expression Operators on page 398. To read about a script that demonstrates nested If, Else, and End statements, see Checking an FTP Site for Newer Files on page 408.

Include Script
The Include Script action adds an additional script to the current installation script. For easy switching between the scripts in your installation, include scripts are displayed in tabs at the bottom of the Script Editor window. When you compile, the entire include script is copied into the calling script at the location of the Include Script script action, so the result is a combination of the scripts, with the include script inserted into the calling script. Use the Duplicate Files Report, on the Edit menu, to list duplicate files. Include scripts can help save time in developing installations, because you can develop a library of WiseScripts that perform very specific functions, like subroutines. You can re-use these specialized scripts in future installations you create, and you can easily share them with colleagues. To make an include script, choose Blank Script when you create a new file, which gives you a totally blank script. You should start with a blank script when building an include script; otherwise your include script contains the default script, which is designed to perform an installation. If you insert a default script inside your installation script, you will have two wizard loops, two of every dialog, and so on. Include scripts typically have

248

just a few lines of code that perform very specialized functions, such as calling an executable program or displaying a particular dialog. Only the script itself is inserted into the calling script; any configuration in Installation Expert is ignored, including compiler variables set on the Compiler Variables page.

Usage

Pathname. Specify the full pathname of the script to be included. The script should be a .WSE file, and the path should be on your computer, not the destination computer. Because the main script and the included scripts are combined into a single file at compile time, not runtime, you cannot use a runtime variable in the Pathname field to specify the Include Script. You can, however, use a compiler variable in this field.

Example
This is an example of the line you might use in your script to include a script:

Include Script C:\MyScripts\OpensWord.wse


This is an example of what a short include script might look like. They can be much longer:

Execute %PROGRAM_FILES%\winword.exe
The script above contains only one line, but keep in mind that the script can be whatever size you want. The only limitation is that the calling script combined with the include script or scripts cannot be longer than 32,000 lines.

Insert Line Into Text File


The Insert Line into Text File script action edits a text file you specify. Use this file to edit configuration files that cannot easily be edited by the Edit INI File, Add Device to System.ini, Add Command to Config.sys, or Add Command to Autoexec.bat actions.

249

5: WISESCRIPT ACTIONS

New lines can be inserted in the file at an arbitrary line number, or you can have the installation search the file to find a particular piece of text and insert your new line before, after, or in place of the existing line. Either fill out the Line Number field in the top section of the dialog, or fill out the Search for Existing Text section of the dialog. Do not fill out both because you can only do one or the other, search by line number, or search for existing text.

Usage

File to Edit. Specify a pathname to the text file you want to edit or use variable substitution to build a pathname. Text to Insert. Enter the command line you want to add to the file. If the line refers to a directory or file, use a full pathname built with variable substitution (such as %MAINDIR% to specify the applications directory) so the path is correct regardless of the directory where the end user installs your software. Line Number. The line number at which the new line should be inserted. Specify zero to append the command to the end of the file. The Search for Existing Text panel in this dialog overrides any line number specified here; the line number applies only when the text is not found or when you do not specify any text. Search for Text. Enter the text for which you want to search. The installer scans the file looking for a line that begins with, ends with, or

250

contains the text (depending on the setting of the Match Criteria field). If more than one line in the file matches, only the first is edited. Comment Text. Enter the text to insert at the beginning of the line when it has been found. This can be useful when you are replacing an existing command with a new command and want to leave the existing command in place but inactive. In this case, you should always set the Insert Action drop-down to cause your new command to be inserted before the existing line so that a subsequent installation finds and edits the active command, not the commented-out line. Insert Action. Select the action to be taken when a line containing the specified text is found. You can either insert your new command before the existing line, replace the existing line with your new command, or insert your new line after the existing one. Match Criteria. Choose whether the line must begin with, contain, or end with the text entered in the Search for Text field. Ignore white space. If this checkbox is marked, the search operation ignores spaces and tab characters. Case-sensitive. If this checkbox is marked, the search operation distinguishes between uppercase and lowercase text. Make Backup File. If this checkbox is marked, the installation makes a copy of the file before editing it. The backup has the same file name except with a number appended to the end. The backup is retained after installation so that the end user can undo any changes made to it if they cause problems.

Example
To read about a script that demonstrates this action, see Creating a Connection Between a Database Client and Oracle Server on page 397 or Manipulating a Text File on page 396.

Install DirectX
Use the Install DirectX script action to install DirectDraw, DirectSound, or DirectPlay drivers by calling the Microsoft-provided DirectXSetup API call within the DSETUP.DLL file. DirectX components can be installed only on Windows 95/98 or Windows NT 4.0, or later. If you deploy your installation from floppy disks, you must first install the DirectX installation files (including an entire directory sub-tree of files) and the DSETUP.DLL and DSETUP16.DLL files. Both must be in the same directory as the installer .EXE. If your installation is on a CD-ROM, you can simply run the installation from a directory on the CD-ROM. Use the Runtimes page in Installation Expert. See Runtimes on page 97.

251

5: WISESCRIPT ACTIONS

DSETUP.DLL Pathname. Enter the full pathname of DSETUP.DLL on the destination computer. If the installation files are on the CD-ROM, you might use a path like %INST%\REDIST\DSETUP.DLL. DirectX Directory Path. Enter the pathname to the directory containing the DirectX installation files. For example, %INST%\REDIST\DIRECTX. DirectX Version. Choose the version of DirectX to be installed, either 1.0/2.0, or 3.0 or higher. Complete Installation of DirectX. If this checkbox is marked, a complete installation of DirectX is performed. This is the recommended method of installing DirectX. Reinstall DirectX Files. If this checkbox is marked, the files are installed even if they would replace a later version. DirectDraw, DirectSound, DirectPlay, Direct3D, DirectInput, DirectVideo. If any of these checkboxes are marked, the indicated component of DirectX is installed. Use these checkboxes when you are not performing a complete installation. Install DirectX Setup DLLs. If this checkbox is marked, .DLLs for setting up DirectX after installation are also installed.

252

Prompt when replacing audio/video drivers. If this checkbox is marked, end users are prompted whether to replace their existing audio and video drivers when DirectX installs new ones. Restore audio/video drivers. The installation restores the original default DirectX audio and video drivers.

Install File(s)
The Install File(s) script action installs files on the destination computer. Each file or directory to be installed must have a separate Install File(s) action. For this reason, its simplest to use Installation Expert to add files to the installation, then, if necessary, switch to Script Editor to edit Install File(s) script lines. Note:
The results from an Install File(s) script action are put into a variable, INSTALL_RESULT. See its description in Automatic Runtime Variables on page 419.

253

5: WISESCRIPT ACTIONS

Source Pathname. Specify the full 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. Destination Pathname. Enter the pathname on the destination computer. Use variable substitution to specify the directoryfor example, begin with %MAINDIR% to specify that the application should be installed in the main application directory selected by the end user. The drop-down list contains pathnames using the variables defined in the script. Do not include wildcards in this field. Copy Description. Enter a description for the file being installed. This description appears in the progress bar dialog. Require Password. If a password for the installation has been supplied in Installation Expert, and this checkbox is marked, the end user is prompted for a password before this file is installed. The password prompt appears only once during installation, regardless of the number of password-protected files being installed. It appears only for the first password-protected file in an installation. If the end user has chosen an installation configuration that does not include any password-protected files, the password prompt does not appear. Include Sub-Directories. If a directory is entered as the Source, marking this checkbox causes the installation to automatically include any files in subdirectories of that directory in the installation as well. Shared DLL Counter. If this checkbox is marked, the file, if a .DLL, .OCX, or .VBX, is entered in the registry so that Windows can automatically keep track of how many installed applications are using it and prevent it from being removed until it is no longer needed. No Progress Bar. If you do not want the progress bar to display, mark this checkbox for every file that is being installed by your installation. You must mark this checkbox for every file that is being installed, because if you mark it for some, but not others, the progress bar appears to continue to display because the screen does not refresh between files. This option is useful when you install a few small files that only require a second or two and you dont want to clutter the screen with the progress bar. Self-Register OCX/DLL/EXE/TLB. All .OCXs and .TLBs as well as some .DLLs and .EXEs support self-registration. Mark this checkbox to have the .OCX, .DLL, .EXE, or .TLB register itself in the Windows registry at the end of installation. The Install File(s) action does not actually register the file, but merely records that it should be registered later. You should include a Self-Register OCX/DLL script action to actually register the item at the completion of the installation. See Self-

254

Register OCXs/DLLs on page 281. If this action is not included, registration occurs automatically at the end of installation. Do Not Download With WebDeploy. This checkbox is available when you click the Create Internet-based installation option on the WebDeploy page. In an Internet-based installation, files are stored as separate files in the same directory as the installation .EXE on the web server and are downloaded only as they are needed. To place the file into the installation .EXE rather than storing it as a separate file, click the Do Not Download With WebDeploy checkbox. Repair application if this file is missing. Self-repair prevents your application from failing if this file has been deleted accidentally. Mark this checkbox to initiate self-repair if this file is missing during application launch. The end user must have access to the installation media to perform a repair, and you must also configure a shortcut to your application with self-repair turned on. To use this feature, you must configure your installation for self-repair. See Automatic Self-Repair on page 35 for a description of how to set up self-repair. Professional Edition only
Self-repair support is available only in the Professional Edition.

Replace Existing Files. Select an option to determine how to handle the installation of files that already exist on the destination computer. Always. The new file always replaces the old file. Never. The file is never installed if it already exists. Use this for files, such as configuration files, which should be installed if they are not present, but which might be customized by the end user and should therefore not be replaced on re-installation. Check File. The File Version and File Date/Time drop-down lists become available. The existing file is only replaced if the requirements set in both fields are true. Doesnt Matter. Select this option for a field if you only need one of the two requirements, File Version or File Date/Time, to be fulfilled for the existing file to be replaced. Same or Older. (File Version) Replace the existing file if it has a version resource, and if it is the same as or older than the new file. If the existing file does not have a version resource, the new file is not installed. (File Date/Time) Replace the existing file if its modification date and time are the same or older than the new file.

255

5: WISESCRIPT ACTIONS

Older. (File Version) Replace the existing file if it has a version resource, and if it is older than the new file. If the existing file does not have a version resource, the new file is not installed. (File Date/Time) Replace the existing file if its modification date and time are older than the new file. Retain duplicates in path. Normally, version-checking removes an existing copy of a .DLL found in the path directory list to ensure that the path list only contains a single version of the .DLL. You can suppress this feature by marking this checkbox. Existing File Pathname. The SmartPatch feature creates a patch file that contains only the differences between an older versions of the file that might be on the destination computer and the current version. The resulting installation is normally much smaller than a full installation. However, your software must already be installed on the destination computer before the end user can perform such an installation. Enter the pathname at which the installation can expect to find one of the files listed below in the Previous File Versions list. If a wildcard was used in the Source Pathname field, this pathname should point to a directory. Use variable substitution to make the pathname independent of the destination computers configuration and end users installation choices. Previous File Versions. This field holds a list of files that are older versions of the file(s) being installed. Click Browse to locate an older version of the file on your hard drive and add it to the list.

Install ODBC Driver


The Install ODBC Driver script action configures an ODBC driver in the registry. If the destination computer is Windows NT4/2000/XP, this action inserts registry settings. It also returns the directories where the ODBC Manager and ODBC Driver .DLLs should be copied. It does not actually install these files. You need to use a separate Install File(s) action to install them to the proper directories. The database actions are advanced features. You should already know about BDE or ODBC before attempting to use these actions. The Wise Installation System helps you install database runtimes, but you should always check the Runtimes page on the Wise Solutions Web site for updates before installing runtime files. You should first select the runtimes you want on one of the runtime pages in Installation Expert, then modify the generated script. Adding this functionality to a script from within Script Editor requires advanced knowledge of either BDE or ODBC. You should use the ODBC page to configure ODBC.

256

Driver Name. The name of the ODBC driver used by this data source. This driver, along with its support files, should be installed in the directory returned in the Driver Pathname Variable. The Import button is a convenient way to add an already-configured ODBC driver with all its settings. Click this button to choose an existing driver from the list of drivers installed on your computer. Manager Pathname Variable. If you enter a variable name in this field, the directory that the ODBC.DLL file should be installed to is stored in the variable. If you are installing multiple ODBC drivers, only the first Install ODBC Driver action needs to set this variable. Driver Pathname Variable. Select a variable to which to store the directory where the driver files should be copied. Install Drivers For. Choose a Win16 or Win32 installation. The Win16 ODBC installation requires the Win16 version of ODBCINST.DLL; the Win32 ODBC installation requires ODBCCP32.DLL. Driver Attributes. Enter attributes for the installed ODBC drivers here in ENTRY=VALUE format. This information is added to the ODBCINST.INI file.

257

5: WISESCRIPT ACTIONS

Install WinCE Component


Professional Edition only
The Install WinCE Component script action is available only in the Professional Edition.

The Install WinCE Component script action is used to configure a single component in a Windows CE installation. You can assign a name to the .CAB file(s), the icon that displays on the desktop computer, and indicate if you want the application manager program to launch automatically.

Setup Name. This determines the name of the .CAB file(s) for this component. All .CAB files are named according to the following structure: [Setup Name.Processor Name.CAB]. If a Setup Name is not assigned, the value of this field defaults to the name of the component. Note:
Do not place an extension on the Setup Name value; if you do, the installer generates an error message.

Desktop Icon Name. Enter a descriptive label to display under this component's application icon on the desktop computer. Execute Application Manager to Install/Uninstall during desktop installation. Mark this checkbox if you want the installation to automatically launch the application manager program, Ceappmgr.exe, after it has copied its files to the desktop computer.

Install WiseUpdate Client


Professional Edition only
The Install WiseUpdate Client script action is available only in the Professional Edition.

258

WiseUpdate offers you an easy method for updating your software on your customers computers, ensuring that customers are always working the most up-to-date version of your software. Based on settings you specify on the WiseUpdate page in Installation Expert, WiseUpdate installs a small client application along with your software. The end user can open this client application from the Start menu, or you can place it in their Startup group so that it opens at set intervals when the computer boots. The WiseUpdate client checks for newer versions of your application at the Web location you specified. If it finds a new installation, it downloads and runs it. For more details, see Using WiseUpdate on page 373.

To use WiseUpdate, first fill out the WiseUpdate page in Installation Expert: Do not include WiseUpdate client in this installation. Mark this option if you do not want to use WiseUpdate in this installation. Include WiseUpdate client. Mark this option to include WiseUpdate functionality in this installation. This enables gives your application the capability to be updated over the Internet the next time you release an update. If you mark this, the WiseUpdate client executable is installed into your main application directory with your software. Then you can either fill out the rest of the WiseUpdate page, or you can double-click the Install WiseUpdate Client action in Script Editor. The Install WiseUpdate Client Settings dialog that appears, has the same settings as the WiseUpdate page. Host Address. Enter the Web server address where the WiseUpdate Client looks for updated software. The WiseUpdate Client deployed on the destination computer uses this information when it checks for updates. The WiseUpdate Client communicates using HTTP, so the

259

5: WISESCRIPT ACTIONS

location you specify must be accessible through HTTP. For example: www.widget-ware.com. You can also enter the IP number of the server. Note:
The Internet location you choose must be accessible through both the FTP and the HTTP protocolyou use FTP (in the Distribution Wizard) to transfer files to it, and your customers use HTTP (WiseUpdate Client) to read and download files from it. See WiseUpdate Tips and Troubleshooting on page 387.

Host Username. If necessary, enter the username thats required to connect to the host address. Typically, Web servers dont require usernames and passwords. This is used for basic HTTP authentication. Host Password. If necessary, enter the password thats required to connect to the host address. Only fill this in if the host username is filled in. Typically, Web servers dont require usernames and passwords. Host Directory. Enter the directory name on the host that stores the WiseUpdate configuration file. Your installer and its ReadMe are also stored in this directory. Leave this field blank to put the files on the top level of the host. Update Filename. Enter a name for the configuration file for WiseUpdate. This file will reside on the host in the host directory you specified. It is a text file that the WiseUpdate client reads to determine if a new version exists, and if so, where the new version and its ReadMe can be found. This can be any name you choose, because it is for a configuration file that has not yet been created, but keep in mind that you must use the same file name when you use WiseUpdate in the future. For example, enter WiseUpdate.INI for the file name. The file, which is created and uploaded by the Distribution Wizard, is in .INI file format and contains information you enter on the WiseUpdate page. See Using WiseUpdate Without the Distribution Wizard on page 380 for an example of the file. It resides on the host in the host directory you specified, and is read by the WiseUpdate Client to determine if a new version exists, and if so, where to find the new version and its ReadMe. Product Version. Enter the version of the current installation. This version will be stored in the configuration file specified in the Update Filename field. Check Interval (days). This field works in conjunction with the Add client to StartUp group checkbox. If you place the WiseUpdate shortcut in the StartUp group on the destination computer, the WiseUpdate Client runs silently every time the destination computer is

260

restarted or the end user logs into Windows. If the time interval has not been reached, is simply runs silently, checks the time interval, and quits. However, after the number of days you enter in this field have elapsed, instead of running silently and quitting, it runs with its normal interface and prompts the end user to check for updates. Alternate Web Page. If, for any reason, the WiseUpdate client cannot check for updates or download the installer, it opens the end users browser to this Web page specified in this field. You might direct the end user to a technical support page, a page that contains upgrade information, or a page that discusses possible problems. Start Menu Icon. Enter the name of a shortcut to the WiseUpdate Client here. The shortcut appears in the Windows Start menu, giving end users the option to check for updates whenever they want. To let your end users know the function of this shortcut, give it a descriptive name, such as Update WidgetWare. This name cannot contain special characters such as /, :, *, or ?. If you leave this field blank, make sure you mark the Add Client to Startup group checkbox so that the WiseUpdate Client runs automatically. Add client to StartUp group. Mark this checkbox if you want a shortcut for the WiseUpdate Client to be added to the Windows Startup group. If you place the WiseUpdate shortcut in the StartUp group on the destination computer, the WiseUpdate Client runs silently every time the destination computer is restarted or the end user logs into Windows. If the time interval has not been reached, is simply runs silently, checks the time interval, and quits. However, after the number of days you enter in the Check Interval field have elapsed, instead of running silently and quitting, it runs with its normal interface and prompts the end user to check for updates.

261

5: WISESCRIPT ACTIONS

Modify Component Size


The Wise Installation System automatically keeps track of how much disk space is required for the files in each of your optional installation components. If you call an external .EXE file to install or copy additional files, you can use the Modify Component Size script action to tell the installation that more space is required. You can then use the Check Disk Space action to make sure that enough space exists. You should use this action inside an If block that tests to see whether the affected component is being installed. Such a conditional block would begin with a statement such as If COMPONENTS contains A, where the components variable contains a letter of the alphabet for each component to be installed, starting with A for the first component.

Component Size. The amount of additional disk space that should be reserved for files to be installed by the script. Dest. Path. The pathname to which the files will be installed. Be sure to use variable substitution (for example, using %WIN% to refer to the Windows directory) to make the script independent of the destination computer.

Open/Close Install.log
Use the Open/Close Install.log script action to control the writing of entries into the installation log file, Install.log. Normally every file that is installed is logged to the file. If you want to log only some of the files being installed, you can stop logging at certain points and resume logging at other points. If you fail to resume, no log file is created. Also use this action to create a new installation log. The uninstaller reads the installation log from bottom to top and reverses every recorded action when it uninstalls. Therefore, to prevent the uninstaller from undoing some actions, you prevent those actions from appearing in the log by using the Open/Close Install.log action. Turn off the installation log before the script actions you dont want to be uninstalled, then turn the log back on after those actions. See Add Text to Install.log on page 178 for more information on editing the installation log.

262

Resume/Start writing entries into installation log. If this option is marked, the action begins writing entries to an existing log. Stop writing entries into installation log. If this option is marked, entries are suspended until the next Resume/Start action. If the log is not restarted by the end of installation, no log file is created. Open new installation log. If this option is marked, a new installation log is created. Enter the name of the new log in the field to the right. The installation logs default location and name are set on the Installation Log page of Installation Expert. See Installation Log on page 84. You can enter a pathname here using variable substitution; if no pathname is entered, the log is written to the same directory as the first installed file.

Parse String
The Parse String script action is used to split or edit a piece of text (which can be obtained from a variable) and place the results in two new variables. For example, if you are splitting a string at the first comma, the part of the string before the first comma is placed in the first destination variable and the remainder of the string, after the comma, is placed in the second destination variable. You can also split a string at any arbitrary character position.

263

5: WISESCRIPT ACTIONS

Usage

Source Value. The text to be parsed. You can use variable substitution (using the %VARNAME% convention) in this field to incorporate the values of one or more variables. If you want to include a literal % symbol, use %%. Pattern/Position. The substring or character position at which the split is to occur. For example, if you want to split a comma-separated string, you enter a comma here. The pattern can be any number of characters. If you are splitting a string based on character position, enter the desired character position starting with 1 for the first character in the string. Destination Variable 1,2. Enter the names of the variables to hold the two strings resulting from this operation or choose them from the dropdown list. Typically, the first variable holds text from the left part of the string and the second holds text from the right part. See Operation, below, for exact details on what information is placed in each variable. Operation. Choose the operation to be performed. Split value at first occurrence of pattern. Finds the first occurrence of the pattern in the source value, then places the text on either side of it in the two destination variables. Split value at last occurrence of pattern. Finds the last occurrence of the pattern in the source value, then places the text on either side of it in the two destination variables. Split value at position from left. Places the first n characters of the source value in the first destination variable, and the remainder of the string in the second, where n is the value entered in the Pattern/Position field.

264

Split value at position from right. Places the last n characters of the source value in the second destination variable, and the remainder of the string in the first, where n is the value entered in the Pattern/Position field. Trim Spaces. If this checkbox is marked, leading and trailing spaces are removed from both destination variables. Ignore Case. If this checkbox is marked, uppercase and lowercase are considered equal for the purpose of matching the pattern.

Example
To read about scripts that demonstrate this action, see Finding a File on the Destination Computer on page 395, Launching a Web Page from an Installer on page 408, or Manipulating a Text File on page 396.

Pause
Use the Pause script action to temporarily stop a script from executing. After the specified number of milliseconds, the script continues running. You can use this script action to cause a billboard to display for a certain number of seconds.

Milliseconds to pause. Enter the number of milliseconds you want your script to stop. A millisecond is 1/1000 of a second. To pause for one second, enter 1000, for two seconds, 2000, and so on.

Play Multimedia File


You can play an audio (.WAV) or video (.AVI) file during the installation by using the Play Multimedia File script action. Playback is asynchronous; that is, the sound or the movie can play back while installation continues. The multimedia file must have already been installed on the destination computer before the end user tries to play it. It must be small enough to fit entirely into the destination computers RAM for it to play back correctly, because the disk is heavily accessed by the installation process. To produce sound, the destination computer must be properly configured with appropriate hardware and software.

265

5: WISESCRIPT ACTIONS

File Type. Choose the kind of file to be played back, either .WAV or .AVI. Pathname. The pathname to the .WAV or .AVI file. Enter a pathname, click Browse to select a file from your installation, or use variable substitution to build a pathname. See Variables and Expressions on page 167. If you are playing a file that is only used during installation, you can use the %TEMP% substitution to play the file that was previously installed in the Windows temporary directory. X Position / Y Position. Indicates the location on the screen at which an .AVI file should be played back. Coordinates should be specified for a 640x480 screen; coordinates are automatically adjusted proportionally for the display resolution on the destination computer.

Post to HTTP Server


Professional Edition only
The Post to HTTP Server script action is available only in the Professional Edition.

Use the Post to HTTP Server script action to cause your installation to post information over the Internet to your organizations Web server. You can use it to record user registration information or other data. You must have a CGI program or Active Server Page (.ASP) on the server that accepts data sent by an HTTP POST operation and deciphers encoded characters. The destination computer must have an Internet connection (such as DialUp Networking) properly configured. If your target users might not have this capability, you can put the Post action inside a conditional block that asks the end user if they have Internet connectivity and if they want to register over the Internet.

266

Destination URL. The URL (Uniform Resource Locator) of the CGI program or ASP page that will accept the posted data. Text to Post. The text to post should be one or more lines in the format field=data, where field is the name of the field as it is expected by the CGI program, and data is the data to be sent in that field. If a line does not appear to contain a field name followed by an equals sign, it is taken to be a continuation of the previous line, and the data on the two lines is concatenated and sent with a single field identifier. The field names might be the same as script variable names, but they do not have to be. You can use the %VARNAME% convention to include variables in the data to be sent. Use %% to send an actual % symbol. Error Handling. Determines how errors in the posting operation are handled. Ignore Errors. The script continues regardless of any errors. Abort Installation. The installation stops if the posting operation cannot be completed. Start Block. The Post to HTTP Server action begins a conditional block. All the statements between this action and the next End statement are executed only in the event of an error.

267

5: WISESCRIPT ACTIONS

Prompt for Filename


The Prompt for Filename script action lets the end user select a file using a standard Open or Save dialog. The complete pathname of the file or directory is returned to the specified variable. Although these dialogs are generically used for opening and saving files, your script determines exactly what to do with the pathname returned. For example, you could use a Save dialog to let the end user choose the directory in which your application should save files by default. This value could then be written to a registry entryno file would actually be saved by the installation, even though a Save dialog appeared. This script action is included to provide backward compatibility for scripts created in earlier versions of the Wise Installation System. You can use custom dialogs to perform the same function.

Dialog Type. Choose an Open File or Save As dialog. Dialog Title. The title for the dialog. Dest. Variable. The variable that holds the name of the file or directory selected. Default Extension. The extension appended to the file name if the end user does not enter one.

268

Filter List. Enter file specifiers for the types of files you want to display in the dialog. End users can select the types of files they want to see from a drop-down list. The format is illustrated in the Prompt for File Name dialog: a textual description of the types of files, followed by a semicolon, followed by a comma-separated list of wildcard specifiers for those types of files (*.TXT for text files). Each line in this field is a separate entry in the File Type drop-down list in the dialog. Allow selection of multiple files. Mark this checkbox to allow end users to choose multiple files by holding the CTRL or SHIFT key while clicking in the file list. Prompt if file does not exist. Mark this checkbox to display a confirmation dialog if the end user enters the name of a file that does not exist. File must exist. Mark this checkbox to cause the script action to fail to proceed until a file that exists has been specified. Pathname must exist. Mark this checkbox to verify that the pathname specified exists before proceeding. Skip write permissions test. If you selected Save As for the Dialog Type, the installer displays a Save As dialog when the end user enters a file name. If you clear this checkbox, the installer attempts to create the file that the end user specified in the Save As dialog to verify that the end user has write permission to the directory. If you mark this checkbox, the installer skips the file creation attempt. Do not validate the pathname. Mark this checkbox to allow the Wise Installation System to accept any specified pathname without checks of any sort. Display prompt if overwriting existing file. Mark this checkbox to have your installation display a message if a file already exists on the destination computer with the same name as a new file about to be installed.

Prompt for Text


The Prompt for Text script action displays a dialog that lets an end user enter a line of text. Optionally, you can choose to have the installation treat the entered text as a pathname, including verifying whether the end user really wants to use the file name if the file already exists. This script action is included to provide backward compatibility for WiseScripts created in earlier versions of the Wise Installation System. You can use custom dialogs to perform the same function.

269

5: WISESCRIPT ACTIONS

Usage

Window Name. Enter a name for the window in which the prompt appears, such as Select Destination Directory. Description. Enter brief instructions here. Prompt Name. Enter the label text to be displayed beside the text input field in the dialog. Default Value. Enter the text that should be displayed in the dialog when it first appears. If the end user does not edit this text, it is returned as their input. Variable Name. Enter the name of the variable that holds the text entered by the end user. Directory. If this checkbox is marked, any trailing backslashes are deleted from the end users input, so you can use it as a directory pathname. Confirm If Exists. If this checkbox is marked, and the end user enters the pathname of a file or directory that already exists, they are asked to confirm that they want to overwrite the existing file with the file to be installed.

Example
To read about a script that demonstrates this action, see Performing Calculations on Integer Values on page 398 or Parsing Strings Using Expression Operators on page 398.

270

Radio Button Dialog


The Radio Button Dialog script action lets you display a collection of up to ten mutually exclusive options to your end users, presenting them as a group of radio buttons. Only one button can be chosen. The button selected by the end user is returned as a letter: A for the first radio button, B for the second, and so on. This script action is included to provide backward compatibility for WiseScripts created in earlier versions of the Wise Installation System. You can use custom dialogs to perform the same function.

Title. Enter the name of the dialog here. Dest. Variable. Enter the name of the script variable that stores the letters corresponding to the button the end user chooses. If your script sets this variable to a letter before the dialog is displayed, the corresponding button appears selected when the dialog appears to the end user. Description. Enter instructional or explanatory text to be displayed in the dialog above the radio buttons. Component List. Enter the available choices, one on each line, pressing ENTER after each.

271

5: WISESCRIPT ACTIONS

Read INI Value


The Read INI Value script action reads an entry from an existing .INI file into a script variable. This action is useful for obtaining the pathname to an existing version of a program or other file.

INI Pathname. The path to the .INI file to be read. Enter a pathname, click Browse to select a file from your installation, or use variable substitution to build a pathname. For example, begin the pathname with %WIN% to specify that the file is in the Windows directory, so the script works regardless of the actual Windows directory pathname on the destination computer. INI Section. INI files can be divided into sections by including markers enclosed by square brackets. (Brackets are [ and ] characters.) Enter the name of the section that contains the entry you want to read, without the brackets. INI Item. The name of the entry you want to read from the .INI file. Default Value. The value, if any, that should be stored in the script variable specified below if the specified entry is not found in the .INI file. Variable Name. The name of the script variable in which the value obtained should be stored. Remove File Name. If the .INI entry typically contains a path to a file name, and you want to obtain the path to the directory that contains the file, mark this checkbox. This does not apply to the default path. If you mark the Remove File Name checkbox, do not specify a file name in the Default Value field.

272

Read/Update Text File


The Read/Update Text File script action begins a loop designed to read and, optionally, update the lines of text contained in a text file. Each repetition of the loop brings a new line of text into the specified variable; the instructions inside the loop can be used to change the contents of the variable. The changed contents of the variable can then be written back to the file. When there are no more lines left in the file, the loop ends. As with a While loop, mark the end of the Read/Update loop with an End action.

Usage

Pathname. Specify the pathname to the text file to be edited on the destination computer. You can use variable substitution to build a pathname, so the action works properly regardless of the directory structure on the destination computer. See Variables and Expressions on page 167. Variable. The name of the variable into which each line of the text file should be read. Action. You can choose to read each line of the file into the variable, or to have the contents of the variable automatically written to the file after each pass through the loop. If you choose the latter action, changing the value of the variable (using Set Variable, Parse String, etc.) inside the loop is sufficient to write the new value to the file. Make Backup File. If this checkbox is marked, a copy of the file is made before the original is read. If you plan to change the contents of a file, mark this checkbox to let the end user reverse the changes you made if it becomes necessary. You should use this only if you are updating a file.

Example
To read about a script that demonstrates this action, see Manipulating a Text File on page 396.

273

5: WISESCRIPT ACTIONS

Read/Write Binary File


The Read/Write Binary File script action can read or write the value of a script variable to or from any binary file on the destination computer.

File Pathname. Specify the path to the file to be read or modified. It must already exist and must contain space for the variables data. The existing information in the file is not moved to make room for any information written. You can use variable substitution to build a pathname based on variables such as %MAINDIR% or %SYS%. Variable Name. The name of the variable information that is to be read into or written from. File Offset. The number of bytes into the file where the data is written. Bytes are numbered starting with zero. Max Length. 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 the file or read from it. Null Terminated. If this checkbox is marked, a zero byte is written to the binary file after the string. Technical Note:
The Read/Write Binary File action does not support reading or writing nonASCII characters (characters with codes above 127).

274

Reboot System
The Reboot System script action reboots the destination computer and exits the installation at that point.

Reboot Operating System. Restarts Windows on Windows 9x or 3.1 at completion of the installation script; on Windows NT4/2000/XP, this option logs the end user out at that point. Reboot Computer System. Performs a full system reboot on the destination computer at completion of the installation script on Windows 9x or 3.1 and on Windows NT4/2000/XP, if the end user has administrator privileges. If the end user on Windows NT4/2000/XP does not have administrator privileges, this option only logs the end user out.

275

5: WISESCRIPT ACTIONS

Register Font
The Register Font script action registers a new TrueType font (.TTF file) that has been copied into the Windows font directory.

Font File Name. Select a font from the drop-down list or enter the file name of the .TTF font file (not the full pathname) to be added to the system. The drop-down list contains any font files that you have added to your installation using the Files page in Installation Expert. The file must already have been installed in the font directory, and the fonts file name must match its internal name. Font Name. Enter the full name of the font here. The name you enter here appears in Font menus on the destination computer. It is added to the Fonts section of the WIN.INI file. Under Windows 95 or later, the font is added to the registry.

Remark
The Remark script action is a documentation tool; it is not processed, but provides a place for script developers to write notes to themselves and to others who might read and maintain their scripts. Script Editor displays remarks in green by default; however, you can change this color in Preferences. See Setting Preferences on page 43.

Comment. Enter the comment here. To insert a blank line into your script, leave this field blank and click OK.

276

Rename File/Directory
Use the Rename File/Directory script action to rename a file or directory on the destination computer. This can be a file or directory that existed prior to your installation, or a file or directory that your installer placed on the destination computer. The file must not be in use for this script action to work.

Old Pathname. Specify the full path to the existing file or directory. You can use variable substitution to build a pathname. For instance, start the pathname with %MAINDIR% or %WIN% to refer to files in the installation directory or the Windows directory. If you click Browse, you cannot choose a directory, only a file. New File Name. The new name for the file or directory. Do not specify the entire pathname, only the file name or directory name.

Search for File


The Search for File script action searches local drives, network drives, or all drives for a particular file, and returns the path to the file, or a default value if the file is not found in any of the listed directories.

277

5: WISESCRIPT ACTIONS

Usage

File Name. Enter the name of the file for which to search. The file name can contain wildcard characters (*, ?). If you choose Directory given by File Name field in the Drives to Search field, then you must include the directory pathname here. Variable Name. Enter the name of the variable where the path to the file is stored if it is found. Default Value. Enter the value you want the variable listed above to receive if the file is not found on any of the searched drives. Leave this blank if you plan to use an If action to determine whether the file was found. If your goal is to install a new version of the file, you could specify the location where the file is normally installed. That way, if the file is located elsewhere on the destination computer, the new version of the file would be installed in the same directory. If the file was not installed, it would be installed into a default location. Message Text. Enter a brief message to be displayed while the search operation is in progress. Return Type. You can choose to return only the first match, or a carriage return/line feed-delimited list of all matches. Drives to Search. Choose to search local drives, network drives, or both. You can also choose to search the directory path specified in the File Name field. Search Depth. Specify how deeply into subdirectories the search should look. A depth of 1 searches only the root directory, a depth of 2

278

searches the root directory and any subdirectories in it, and so on. A depth of 0 searches the entire drive. When searching network volumes, limit search depth to 2 or 3 if you want to avoid a long wait for the end user. If a search to this depth does not find the file, you can add extra script actions to ask the end user to manually locate the directory containing the file. See Browse for Directory on page 185. Remove File Name. Mark this checkbox to remove the file name from the end of the returned path, leaving only the path to the directory where the file was found. This does not apply to the default path. If you mark the Remove File Name checkbox, do not specify a file name in the Default Value field.

Example
To read about a script that demonstrates this action, see Finding a File on the Destination Computer on page 395.

Select Components
The Select Components script action lets you display up to ten optional installation components to your end users, presenting them as a group of checkboxes. Any number of these checkboxes can be marked. The checkboxes marked by the end user are returned as a series of letters: A for the first checkbox, B for the second, and so on. This script action is included to provide backward compatibility for WiseScripts created in earlier versions of the Wise Installation System. You can use custom dialogs to perform the same function.

279

5: WISESCRIPT ACTIONS

Technical Note:
In scripts generated by Installation Expert, this function is performed by a Wizard dialog, not a Select Components script action.

Title. Enter the name of the dialog. Dest. Variable. Enter the name of the script variable that stores the letters corresponding to the buttons the end user chooses. If your script sets this variable to a series of letters before displaying the dialog, the buttons that correspond to those letters are selected when the dialog is presented to the end user. In the standard installation script, the variable COMPONENTS is used for this purpose. Disk Variable. Enter the variable name that holds the pathname where your software will be installed (usually MAINDIR if you are using the standard script). The free space on this drive is displayed in the dialog. If this field is left blank, no space indicator is displayed. Sub-Components. Enter a list of sub-components. These subcomponents are incorporated in the disk space calculations if the main component is selected. Description. Enter instructional or explanatory text to be displayed in the dialog above the checkboxes. Component List. Enter the available choices, one on each line, pressing ENTER after each.

280

Self-Register OCXs/DLLs
When an .OCX, a .DLL, or an .EXE file is installed, you can queue it for selfregistration. See Install File(s) on page 253. Use the Self-Register OCXs/ DLLs script action to self-register all queued .OCX, .DLL, and .EXE files. You can also use it to add an existing file to the queue.

Description/Pathname. You enter different information in this field depending on what option you mark: If you mark the Register all pending OCXs/DLLs/EXEs option, then enter a message to be displayed to the end user during the registration process. This means that you are self-registering .OCX, .DLL, and .EXE files that have already been installed. The Browse button is disabled if you mark this option. If you mark the Queue existing file for self-registration option, specify a pathname or use variable substitution to build a pathname. This means that you are adding another file to the queue for registration. Register all pending OCXs/DLLs. If this option is marked, the action registers all queued .OCX, .DLL, and .EXE files that are awaiting selfregistration. Queue existing file for self-registration. If this option is marked, the action marks the file listed in the Pathname field for later selfregistration.

Set Control Attributes


Use the Set Control Attributes script action to show, hide, enable, or disable a control in the dialog you are designing. You can only access this script action while you are working on a dialog in Custom Dialog Editor. To access a dialogs script, select Dialog Script Editor from the View menu while in Custom Dialog Editor. In the Set Control Attributes dialog, you set the control name and what to do to the control.

281

5: WISESCRIPT ACTIONS

Usage

Control Name. This drop-down list contains the names of all the controls in the current dialog. Select the control you want to manipulate. Use Custom Dialog Editor to name all controls that you want to manipulate with script actions. To name a control, right-click the control, select Control Properties, and, in the dialog that appears, enter a name in the Control Name field. Operation. Choose from Show/Enable Control, Disable Control, and Hide Control.

Example
To read about a script that demonstrates this action, see Configuring a Dialog to Handle Mouse Events on page 400.

Set Control Text


Use the Set Control Text script action to change the text associated with a control in the dialog you are designing. You can only access this script action while you are working on a dialog in Custom Dialog Editor. To access a dialogs script, select Dialog Script Editor from the View menu while in Custom Dialog Editor. In the Set Control Text dialog, you set the control name and enter new text for the control.

Usage

Control Name. This drop-down list contains the names of all the controls in the current dialog. Select the control you want to change.

282

Use Custom Dialog Editor to name all controls that you want to manipulate with script actions. To name a control, right-click the control, select Control Properties, and, in the dialog that appears, enter a name in the Control Name field. Control Text. Enter new text to associate with the control.

Example
To read about a script that demonstrates this action, see Configuring a Dialog to Handle Mouse Events on page 400.

Set Current Control


Use the Set Current Control script action to set a control to be the current control in the dialog you are designing. The current control in a dialog is the one to which keyboard operations apply; for instance, if the OK button is the current control, and you press the RETURN key on the keyboard, the OK button acts as though it has been clicked. You can only access this script action while you are working on a dialog in Custom Dialog Editor. To access a dialogs script, select Dialog Script Editor from the View menu while in Custom Dialog Editor. In the Set Current Control dialog, you specify the control name of the control to set.

Usage

Control Name. This drop-down list contains the names of all the controls in the current dialog. Select the control you want to set as current. Use Custom Dialog Editor to name all controls that you want to manipulate with script actions. Custom Dialog Editor to name all controls that you want to manipulate with script actions. To name a control, right-click the control, select Control Properties, and, in the dialog that appears, enter a name in the Control Name field.

Example
To read about a script that demonstrates this action, see Configuring a Dialog to Handle Mouse Events on page 400.

283

5: WISESCRIPT ACTIONS

Set File Attributes


Use this script action to set the attributes of one file or a group of files. In the Set File Attributes dialog, set the attributes of the file or files.

File Pathname. Select the path to the file to be changed. You can enter variables to build a pathname. You can use wildcards to specify multiple files. Read-Only / Hidden / System. Mark a checkbox to set the indicated attribute for the file or files specified above. Scan directory tree. Mark this checkbox to apply the changes to all files in the specified directory, along with all files in its subdirectories and their subdirectories. Archive. Mark this checkbox to set the archive flag for the specified files. The archive bit is used by many backup programs to determine which files should be backed up in an incremental backup.

Set Files/Buffers
The Set Files/Buffers script action sets the FILES= and BUFFERS= lines in the Config.sys file. If either is currently lower than the minimum specified in this action, it is increased to the specified value. If either is already greater than or equal to the desired value, it is not changed.

284

Minimum Files. The minimum number of files to be specified by FILES= in Config.sys. Set to zero or leave blank to leave FILES= unchanged. Minimum Buffers. The minimum number of buffers to be specified by BUFFERS= in Config.sys. Set to zero or leave blank to leave BUFFERS= unchanged.

Set Variable
Use the Set Variable script action to set the value of a variable by providing a literal value, by generating the new value from the variables existing value after modifying it in some way, or by evaluating an expression.

Usage

Variable. Enter or select the name of the variable to be set. Variable names must begin with a letter, must contain only numbers, letters, and underscore characters, and must be 28 characters or less. New Value. Provide the new value of the variable here. If you are entering a variable or an expression made up of variables, you do not need to enter the percent sign (%) before and after the variable names. The new value is operated upon as indicated by the Operation dropdown list before being assigned to the target variable. Operation. Indicates the operation to be performed on the new value as it is being assigned to the variable. Available options are: Nothing. No changes are made to the value; this is a simple assignment. Increment, Decrement. The value is increased or decreased by one. To apply either operation to an existing variable, you must specify the variables existing value, using variable substitution, in

285

5: WISESCRIPT ACTIONS

the value field. For example, to increment the variable FOO, place FOO in the Variable field and %FOO% in the New Value field. Remove trailing backslashes. Any trailing backslashes (\) are removed, converting the variable to a valid directory name. Convert to long (short) filename. Converts an existing pathname to its equivalent long or short pathname if the installer is running under Windows 95 or NT. For this to work, the specified directory or file must exist. Convert to uppercase or lowercase. All alphabetical characters are converted to uppercase or lowercase. Evaluate Expression. The expression in the New Value field is evaluated according to the rules outlined in Variables and Expressions on page 167. Append to Existing Value. If this checkbox is marked, the variables new value is added to the end of its original value instead of replacing it. Remove File Name. Removes a file name from the end of a pathname, leaving only the directory name. Read Variable From Values File. Mark this checkbox to read the variable from the values file specified on the command line to the installer .EXE using the /M command line option. The values file is a simple text file with variables listed, one per line, in NAME=VALUE format. If the variable is found in the values file, the specified value is used; otherwise, its value is unchanged. It can be up to 32K in size.

Example
To read about a script that demonstrates this action, see Performing Calculations on Integer Values on page 398.

Set Windows Installer Property


The Set Windows Installer Property script action sets the value of a property in the currently-running Windows Installer installation. You can either hard-code a value or set the property to the value of a variable. This script action only appears if you install Wise for Windows Installer on your computer after you install the Wise Installation System. Only use this script action in a WiseScript that you plan to call from a Windows Installer installation. Windows Installer installations only
This action appears only if you have installed Wise for Windows Installer after installing the Wise Installation System.

286

Property Name. Enter the name of a Windows Installer property. This can be either an existing Windows Installer property, or a new property name. Entering a new property name creates the property in Windows Installer. Property Value. Enter the value to assign to the Windows Installer property. You can either hard-code a value or enter a WiseScript variable enclosed in percent signs.

Start/Stop Service
The Start/Stop Service script action lets you start or stop the specified service on the destination computer. This action only applies to Windows 3.51, Windows NT 4.0, Windows 2000, and Windows XP systems because other operating systems do not have services.

Usage
After you attempt to stop a service, the script pauses for a moment to give the service time to stop. The currently logged-in end user must have the appropriate privileges to start and stop services. In the Start/Stop Service Details dialog, you enter the service name and specify whether to stop or start the service.

Service Name. Enter the name of the service here. This is not necessarily the same name you see in the Services control panel. If you are unsure what the service name is, consult the documentation that came with the software that installed the service. If you used the Create Service script action to create the service, this is the same name you entered in the Create Service Settings dialog. Operation. Choose to start or stop the service.

287

5: WISESCRIPT ACTIONS

Example
Your installation might need to stop a service before it can install an update to that service. You can use this script action to first stop the service, then update the necessary files.

While Statement
The While script action marks the beginning of a loop. An End statement marks the end of the loop. As long as the condition specified in the While Statement Settings is true, then the script lines inside the loop continue to execute repeatedly. If the condition specified is not true, then the While loop is exited, and the script line following the While loop is executed. In the While Statement Settings dialog, you specify the condition to test for, and also whether the loop should execute at least one time.

Usage

While Variable. The name of the variable involved in the test for this conditional block or loop. Comparison. To the right of the While Variable field, select an option to determine how the variable is compared to the value. Equals, Not Equal. The value of the variable must or must not equal the value given in the field. Contains, Does Not Contain. The value of the variable must or must not contain the text given in the Value field. Greater Than, Greater Than or Equal To. The value of the variable must be greater than or equal to the value given. Less Than, Less Than or Equal To. The value of the variable must be less than or equal to the value given. Contains Any Letters In. At least one of the letters in the variable must be found in the value given in the field. This comparison and the next one are useful for testing the results of returned by custom dialogs, which returns letters for each option the end user chooses.

288

Contains Letters Not In. At least one of the letters in the variable must not be found in the value given in the Value field. Length Equal To. The length of the text in the variable must equal the value given below. Expression True. The expression in the Value field below is evaluated according to the rules outlined in Variables and Expressions on page 167. The variable name specified is ignored and can be left blank. The result is considered true if it evaluates to a non-zero result. Equals (Ignore Case), Not Equal (Ignore Case). The value of the variable must or must not equal the value given in the field. The case of the value is ignored. Valid Password, Invalid Password. Evaluates to true if the value entered matches the password entered on the Passwords page in Installation Expert. The Value. Enter the value to be used in the comparison, or an expression if the drop-down list is set to Expression. Perform while loop at least once. This checkbox determines whether the body of the loop is executed once before the test is performed. If the checkbox is cleared, the loop is executed if the condition is true, but is not executed if the condition is false. If the checkbox is marked, the loop always executes at least once.

Example
To read about a script that demonstrates this action, see Error Checking User Input on page 399 or Killing an Application Using Windows .DLL Calls on page 410.

Win32 System Directory


The Win32 System Directory script action puts the path to the Windows 3.1, Windows 95/98, or Windows NT4/2000/XP system directory into a variable. On Windows 3.x or Windows 95/98, this is %WIN%\System. Under Windows NT and greater, this is %WIN%\System32. You can then use this variable to specify a path for installing shared files. You can also use the predefined variables %SYS% or %SYS32% to access the system directory. This script action is included to provide backward compatibility for WiseScripts created in earlier versions of the Wise Installation System.

289

5: WISESCRIPT ACTIONS

Variable Name. The name of the script variable in which the value obtained should be stored.

Wizard Loop
The Wizard Loop script action is used to construct a series of wizard dialogs that make up the majority of the installers end user interface. End users can move forward and backward through these dialogs; the script continues executing inside the wizard loop structure until the last wizard dialog has been filled out and accepted. Installation Expert creates default Wizard Loop and Custom Dialog actions for you, but you can also build them yourself, or use Script Editor to customize the existing structure.

Usage

290

Dialog Boxes. Displays a list of the Custom Dialog actions inside the wizard loop structure. Click the dialog you want to change. Skip Dialog. This section of the Wizard Loop dialog lets you set the circumstances under which a dialog is skipped. You can set different Skip settings for each dialog. For example, if one dialog asks the end user if they want to back up their configuration files before installing, and the next asks where they want to store the backup files, you might set a condition on the second dialog to skip it if the DOBACKUP variable, which is set by the first dialog, is equal to NO. The options available for setting up a condition (If Variable, the condition, and the Value) are the same as in an If or a While action; see If Statement on page 247. Direction Variable. The variable named here stores the direction the Wizard is currently heading. When the end user clicks Next in a wizard dialog, the value N is stored in the specified variable; when the end user clicks Back, a B is stored. If you create your own custom Wizard dialogs, you should follow this convention. The wizard loop created by Installation Expert uses a variable called DIRECTION for this purpose. You can use this variable in the Skip Dialog condition tests to set up dialogs that should be displayed when the end user is going forward but should be skipped when going backward, for instance. Display Variable. The variable named here holds the name of the dialog that is being displayed this time through the loop. You should choose this variable in the Dialog Set Properties dialog in the Custom Dialog Editor. Wizard loops generated by Installation Expert use the variable DISPLAY for this purpose. Pathname. Specify the path to the bitmap to be displayed in the wizard dialogs. This is a file on your computer, not the destination computer. The Wise Installation System copies it into your installation when you compile. You can turn off this graphic for selected wizard dialogs using the Dialog Box Properties dialog. See Setting Dialog Properties on page 299. X-Pos / Y-Pos. Determines the relative placement of the graphic in the dialog, using X and Y coordinates. Do not resize bitmap. Normally, the Wise Installation System automatically resizes the graphic based on the destination computers resolution. The image is displayed at actual size on a 640x480 monitor, and is enlarged if the destination computer is set to a higher resolution. Mark this checkbox to force the image to be displayed at the same size at all resolutions.

291

5: WISESCRIPT ACTIONS

3D Border. If this checkbox is marked, a three-dimensional border is added to your image. Bitmap Filler Color. This color is displayed around the edges of the bitmap specified in the Wizard Bitmap Pathname field if the bitmap does not completely fill the image area in the wizard dialog. When the destination computer is set to display large fonts, the dialog automatically increases in size, and the bitmap might not fill the entire image area. In that case, the extra space is filled with the Bitmap Filler Color you choose. Technical Note:
The dimensions of the first Wizard dialog set the dimensions for all the dialogs in the wizard loop.

Example
To read about a script that demonstrates this action, see Showing or Skipping Dialogs Based on End User Input on page 404.

292

Chapter 6

Creating Custom Dialogs


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. If you want to add interactivity to dialogs, you can use the Dialog Script Editor thats built into the Custom Dialog Editor. The Dialog Script Editor lets you script dialogs to handle mouse events, gather end user input, and branch according to end user choices. When editing dialogs, you can change or add items such as static text, text editing fields, graphics, checkboxes, radio buttons, push buttons, combo boxes, and list controls. Apply alignment, spacing, and tab order to controls on a dialog to polish the dialog's look. Custom Dialog Editor lets you work with single dialogs, or dialog sets. When one dialog calls another dialog, and that dialog calls a third, both the calling and called dialogs can be stored within the same dialog, and are referred to as a dialog set. Topics in this section cover: Adding and Editing Dialogs. Working With Dialogs. Configuring Dialog Control Properties. Solving Problems in Dialogs. Working With Custom Dialog Sets. Creating a Custom Dialog Script to perform script actions in response to certain events inside a dialog.

293

6: CREATING CUSTOM DIALOGS

Adding and Editing Dialogs


The Custom Dialog Editor is a built-in utility for creating and editing dialogs. It lets you place controls on the dialogs and resize and move them. You can add a dialog from either Installation Expert or from Script Editor. Adding dialogs from Installation Expert automatically inserts preconfigured dialogs of consistent design into the set of wizard dialogs that is displayed on the destination computer during the installation. Adding a dialog from Script Editor inserts a blank dialog with no design or configuration. You can access Custom Dialog Editor from three places: Installation Expert - Dialogs Page. Go to the Dialogs page, click the name of a dialog, then click the Edit button. You must mark the checkbox of the dialog to enable the Edit button. See Editing Dialogs From the Dialogs Page on page 296. Script Editor - Custom Dialog Action. In Script Editor, you can either create a new dialog or edit an existing dialog. To create a new dialog, double-click the Custom Dialog script action, enter a name for the dialog, and click OK. Your new dialog appears, ready for editing. To edit an existing dialog, find the Custom Dialog script line for the dialog you want to edit, and double-click it. See Editing Dialogs From Script Editor on page 297. Edit Menu - Dialog Templates. To edit dialogs globally, that is, for the current and all future installations, select Dialog Templates from the Edit menu. Then click a dialog name and click OK. When you edit a dialog using this method, all future installations are affected. See Editing Dialog Templates on page 297.

Adding a Dialog to Your Installation


You can create a new dialog either from the Dialogs page in Installation Expert or from Script Editor. If you add a dialog from the Dialogs page, the dialog is automatically created the same size and shape as other wizard dialogs, it is added to the Wizard loop for you, and it already has correctly configured Next, Back, and Cancel buttons. However, if you add a dialog from Script Editor, the dialog is empty, and nothing is pre-configured for youyou must design and configure it yourself. Therefore, if you want to add a dialog to the installation wizard, add the dialog from the Dialogs page. If you want to add a dialog that's not part of the installation wizard (and therefore which doesn't need Next and Back buttons), add it from Script Editor.

294

ADDING AND EDITING DIALOGS

To create a new dialog: 1. Go to the Dialogs page in Installation Expert, or go to Script Editor. On the Dialogs page, click a dialog name, then click the Add button. The dialog you add is placed before the dialog that was selected when you clicked Add. In Script Editor, double-click the Custom Dialog script action in the Actions list. The Dialog Box Properties dialog appears.

2. In the Dialog Box Properties dialog, enter a title for the dialog in the Dialog Title field and click OK. Do not give it the same name as an existing dialog. For information on how to set dialog properties, see Setting Dialog Properties on page 299. The new dialog opens in the Custom Dialog Editor.

3. Add and configure controls on the new dialog.

295

6: CREATING CUSTOM DIALOGS

See Editing Existing Dialogs on page 296. See Configuring Dialog Control Properties on page 304. 4. Save your changes by selecting Save Changes and Exit from the File menu. Note:
If you want to use this dialog in other installation scripts, select Save As from the File menu, and save the dialog as a .DLG file. (Built-in dialogs are stored in the \Dialogs\Template directory.) This does not affect the current installation. You can add a saved dialog to another installation by selecting Open from the File menu while in Custom Dialog Editor.

Also see Adding and Editing Dialogs.

Editing Existing Dialogs


Whenever you edit a dialog from the Dialogs Page in Installation Expert or by double-clicking the Custom Dialog script line in Script Editor, you are editing the dialog for the current installation only. The following procedures guide you through the process of editing dialogs from each of these locations. Note:
If you save the dialog and overwrite the .DLG template file, then the dialog changes permanently for all future installations.

Editing Dialogs From the Dialogs Page


1. On the Dialogs page in Installation Expert, select the dialog you want to edit. To edit a dialog, mark its corresponding checkbox.

296

ADDING AND EDITING DIALOGS

2. Click the Edit button. The dialog you selected opens in Custom Dialog Editor. Make changes to the dialog by adding, editing, or removing controls. See Adding and Editing Dialog Controls on page 301. See Aligning and Spacing Dialog Controls on page 302. See Configuring Dialog Control Properties on page 304. 3. Save your changes by selecting Save Changes and Exit from the File menu.

Editing Dialogs From Script Editor


1. In Script Editor, locate the Custom Dialog script line that calls the dialog you want to edit.

2. Double-click the Custom Dialog script line. The dialog opens in Custom Dialog Editor. Make changes to the dialog by adding, editing, or removing controls. See Adding and Editing Dialog Controls on page 301. See Aligning and Spacing Dialog Controls on page 302. See Configuring Dialog Control Properties on page 304. 3. Save your changes by selecting Save Changes and Exit from the File menu.

Editing Dialog Templates


If you edit a dialog from the Dialogs page in Installation Expert or by double-clicking the Custom Dialog script line in Script Editor, you are editing the dialog for the current installation only. If you want to edit a dialog so that all future installations contain your changed version of the dialog, you can edit the dialog templates. Dialog templates include other dialogs in addition to those shown on the Dialogs page of Installation Expert, such as the Insert New Disk dialog. If you decide to edit dialog templates, first make a backup of the \Dialogs\Template directory, which is in the Wise Installation System application directory. If you edit a dialog and save your changes, the dialog is permanently changed.

297

6: CREATING CUSTOM DIALOGS

To edit dialog templates: 1. Select Dialog Templates from the Edit menu. The Select Dialog to Edit dialog appears.

2. Click the dialog you want to edit and click OK. The dialog opens in Custom Dialog Editor. Make changes to the dialog by adding, editing, or removing controls. See Adding and Editing Dialog Controls on page 301. See Aligning and Spacing Dialog Controls on page 302. See Configuring Dialog Control Properties on page 304. 3. Save your changes by selecting Save Changes and Exit from the File menu. A dialog asks you to confirm your choice, because the dialog will be used in all future installations.

298

WORKING WITH DIALOGS

Working With Dialogs


This section introduces the common operations youll need to know to create and update dialogs, such as resizing dialogs, adding and arranging controls, and setting the tab order for dialog controls. For detailed information about configuring individual controls, see Configuring Dialog Control Properties on page 304.

Setting Dialog Properties


You can change properties of a dialog, such as the title of the dialog, set default font attributes, and set exact dimensions and positions. To do so, select Dialog Box Properties from the Edit menu from within Custom Dialog Editor. The Dialog Box Properties dialog appears.

In the Dialog Box Properties dialog, you can specify the following: Dialog Title. Enter the title for the dialogs title bar. Font Name / Font Size. Enter the exact name of a font and a point size. This font type and size is applied to any text whose font attribute is set to Default Font. When you add or edit a text box, you can set the font to Default Font, or you can set it to a customized font to override the default. Width / Height. Enter the point sizes of the dialog to be more precise and to be consistent with other dialogs. All dialogs in a wizard loop MUST have the same size as the first dialog. Otherwise screen refresh problems occur.

299

6: CREATING CUSTOM DIALOGS

Note:
You can also resize the dialog by clicking its edges and dragging. Use the Width and Height fields for more precise positioning.

Horiz. Position / Vert. Position. Specify where on the screen to display the dialog. If you choose Default, the dialog is centered on the screen. Do not display wizard graphic on this dialog. Mark this checkbox to turn off the wizard graphic in this dialog. The wizard graphic is set in the Wizard Loop script action, and applies to all dialogs in the wizard loop unless you mark this checkbox.

Using the Right-Click Menu in the Dialog Editor


Use the right-click menu to simplify editing in the Custom Dialog Editor. It contains all the same tools and functionality that are in the toolbar and on the Layout and Add menus.

Introduction to Dialog Controls


Controls are items on a dialog. Everything you see on a dialog is some type of control. Most text is comprised of static text controls, editable text is an edit text control, graphics are placed in static graphic controls. Each item on a dialog is an individual control, with the exception of radio buttons, which are created as a group. You can add the following types of controls to dialogs: Text Control. Adds non-editable text. See Text Controls on page 304. Hot Text. Adds hot text that you can link to actions or even a Web page. See Hot Text Controls on page 306. Edit Text. Adds an editable text field, such as a field where the end user enters information. The field can show single or multiple lines. You can also use this type of control to display a text file. See Edit Text Controls on page 309. Push Button. Adds a clickable button. Generally you must configure buttons to perform an action, such as displaying another dialog. Buttons can also close a dialog, set script variables, and take other actions. Every dialog must contain at least one button. See Push Button Controls on page 312. Radio Button. Adds a radio button group. Use a radio button group when the end user can make only one selection from a group of options. See Radio Button Controls on page 314.

300

WORKING WITH DIALOGS

Checkbox. Adds a checkbox. Use checkboxes when the end user can make multiple selections from a group of options. See Checkbox Controls on page 315. Combo Box. Adds a drop-down list or a multi-line list box. You can configure the drop-down list to either allow the end user to enter a nonlisted option, or constrict the end user to the listed choices. See Combo Box Controls on page 317. List Box. Adds a scrolling list of items from which the end user can select one or more options. See List Box Controls on page 319. Group Box. Adds a box that encloses a group of related controls with a rectangle. See Group Box Control on page 322. Graphic. Adds a non-editable bitmap graphic. See Graphic Controls on page 322. Rectangle. Adds a box. See Rectangle Control on page 323. Play AVI. Adds a movie but no controls to play, stop, rewind, or fast forward the movie. See Play AVI Control on page 324.

Adding and Editing Dialog Controls


The process of adding and configuring a control on a dialog is similar for each type of control. You configure a set of properties for the control, which determine the controls appearance and behavior. There are three ways you can add a control: you can click the control you want in the toolbar; you can choose from the right-click menus Add submenu; or you can use the Add menu on the main menu bar. To add a control using Custom Dialog Editors toolbar, click a tool, then click the dialog. To see a tooltip that describes a tool, hold the mouse pointer over the tool. You can drag the toolbar so that it either floats or docks to the top or bottom of the window.

Adding a Control to a Dialog


To add a control to a dialog: 1. From the Add menu, select the type of control you want to add. See Introduction to Dialog Controls on page 300 for descriptions of each type. The Properties dialog for that type of control opens so you can configure the control. 2. Configure the Properties dialog. See Configuring Dialog Control Properties on page 304 for specific information on each control. 3. Click OK to add the new control to the dialog.

301

6: CREATING CUSTOM DIALOGS

You can resize and move the control using its handles. Use SHIFT-CLICK to select multiple controls. To resize and move controls with more precision, double-click the control to view its Properties dialog and set the Placement options, which include X- and Y-position, height, and width.

Aligning and Spacing Dialog Controls


Alignment and spacing tools help you automatically align and space controls in relation to one another. Use SHIFT-CLICK to select multiple items, then use the commands on Custom Dialog Editors Layout menu to position controls. Align Controls Left lines up the left edge of the selected controls with the left edge of the leftmost control. Align Controls Right lines up the right edge of the selected controls with the right edge of the rightmost control. Align Controls Top lines up the top edge of the selected controls with the top edge of the topmost control. Align Controls Bottom lines up the bottom edge of the selected controls with the bottom edge of the bottommost control. Space Evenly Down distributes the selected controls vertically between the topmost and bottommost controls. Their horizontal position is not changed. Use an Align Controls Left or Align Controls Right command to move them into a column. Space Evenly Across distributes the selected controls horizontally between the topmost and bottommost controls. Their vertical position is not changed. Use an Align Controls Top or Align Controls Bottom command to move them into a row.

Setting Tab Order of Dialog Controls


Tab order refers to the sequence in which controls are selected when the end user presses the TAB key. By default, the tab order is the same as the order in which the dialog controls were created. However, you can change the tab order later. To change the tab order on a dialog: 1. In Custom Dialog Editor, select Tab Order from the Layout menu. A blue number appears next to each dialog control, showing the current tab sequence. The first control in the tab order has the focus when a dialog is first displayed.

302

WORKING WITH DIALOGS

2. Specify the new tab order by clicking on the controls in 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. To exit the tab order view, press the ESC key. Note:
Although static controls such as graphics, text messages, divider lines and so on are included in the tab order, they are ignored when the end user presses the TAB key. Thus, their actual tab order is irrelevant.

303

6: CREATING CUSTOM DIALOGS

Configuring Dialog Control Properties


When you add a control to a dialog, its corresponding properties dialog opens immediately so you can configure the details of that control. This section describes the options available on each properties dialog. To learn more about scripting dialogs to handle mouse events and retrieving end user choices from dialogs, see Using Custom Dialog Examples on page 400.

Text Controls
Use text controls to display information in a dialog. Text controls are static controls, which means that the end user cannot make changes to them. When you add text to your dialog, you also determine text alignment, font, or placement. To add a text control, select Text Control from the Add menu in Custom Dialog Editor. The Text Control Settings dialog appears.

Text. Enter the text to be displayed here, up to a maximum of 511 characters. To start a new line, press CTRL-ENTER. Enter variable names

304

CONFIGURING DIALOG CONTROL PROPERTIES

surrounded by percent signs to display your applications name or other information. See Variables and Expressions on page 167. Control Name. 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. Text Alignment. Determines how the text is aligned in the field: left, centered, or right. Fit pathname to field width. If the control displays a pathname, mark this checkbox to cause the pathname to be shortened, if necessary, by placing \\ in the pathname to indicate omitted directories, which allows it to fit in the allotted space. No Wrap. If you mark this checkbox, the static text is not wrapped to additional lines if it is too long to display on a single line. No Prefix. Normally, you can use the ampersand character (&) in static text to indicate that the next character should be underlined and used as a shortcut to that control. If you mark this checkbox, the & is displayed literally and no underlining is performed. Set Font. Use this button to specify the font for this control. Normally all controls use the default font, which you set in the Dialog Box Properties dialog. Choosing another font here overrides the default font. If the font you choose is not available on this computer, the system font is used. Click the Default Font button to use the font specified in the Dialog Box Properties dialog. Transparent background. Mark this checkbox to make the background for this text control transparent. The Calculated Value group box is used primarily for component installations to display the space requirements for the selected components. For 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. Use the COMPONENTS variable here, as it calculates the total space requirements for the currently-selected component set. Disk. Select a variable to represent the Disk Space Remaining on the installation drive. Use the MAINDIR variable here because it keeps track of free space in the installation directory. Use the Placement fields to determine the location and size of your text control.

305

6: CREATING CUSTOM DIALOGS

X-Position / Y-Position. Use these fields to specify the exact location of the control on the dialog, in dialog units. As an alternative, you can use the alignment tools to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 302. Width / Height. Specify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, but this method is more precise.

Hot Text Controls


Use the Hot Text control to link an action to specific text. For example, you can add hot text with a link to a Web page or to a different dialog. Hot text changes color and might also become underlined as the mouse pointer passes over it. When you add text to your dialog, you also determine text alignment, font, or placement.

Specifying Hot Text Properties


To add hot text, select Hot Text from the Add menu in Custom Dialog Editor. The Hot Text Control Settings dialog appears, where you can specify the action you want to take place when the end user clicks the hot text, and you determine the appearance of the hot text.

306

CONFIGURING DIALOG CONTROL PROPERTIES

Label. Enter the text you want to use as hot text. Variable. Enter the name of the variable that is modified when the end user clicks this hot text. Value. Enter the value that gets assigned to the variable entered above. This can be useful in a script when you need to know which hot text the end user clicked. Control Name. The name by which you plan to refer to this control in the dialog script. Leave the field blank if you do not plan to manipulate this control with a script. In the Action group box, choose an action for the hot text. Return to Previous Dialog. Displays the previously-displayed dialog in the dialog set. (The exception: the Back buttons in Wizard dialogs do not use this option. They are controlled by the Wizard Loop script action.) If this is the first dialog displayed from the set, it returns to the installation script.

307

6: CREATING CUSTOM DIALOGS

Return to Script. Returns to the installation script, even if this dialog was called from another dialog in the dialog set. Display Dialog. Displays the selected dialog from the current set. Abort Installation. The end user is asked to confirm that the installation should be aborted. If the end user confirms, the installation is exited. Display Help Context. If the HELPFILE variable points to a valid copy of a Windows help file, the specified numeric help context is displayed. Execute Program. Another application is launched. Click the Edit button to specify and configure the application to be launched; see Specifying Execute Program Settings on page 326. You can also use this option to create a link to a Web page; see Linking Hot Text to a Web Page on page 309. Execute Named Event. Passes a named event to the dialog script. The DLG_EVENT_TYPE variable is set to the entered text. See Creating a Custom Dialog Script on page 333 for more information. In the Font group box, choose a font for the hot text. Set Font. Use this button to specify the font for this control. Normally all controls use the default font, which you set in the Dialog Box Properties dialog. Choosing another font here overrides the default font. If the font you choose is not available on this computer, the system font is used. Default Font. Click this button to use the font specified in the Dialog Box Properties dialog. In the Text color group box, specify color and underline settings for the hot text. Disabled Color and Enabled Color. Click the Color button 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 checkbox to underline the hot text when the end user moves the mouse pointer over the text. In the Placement group box, specify where to place the hot text. X-Position / Y-Position. Use these fields to specify the exact location of the control on the dialog, in dialog units. As an alternative, you can use the alignment tools to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 302. Width / Height. Specify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, but this method is more precise.

308

CONFIGURING DIALOG CONTROL PROPERTIES

Do Not Check Fields. Mark this checkbox to suppress directory confirmation and field validity checking.

Linking Hot Text to a Web Page


You can use hot text to provide a link from a dialog to a Web page. For example, you can give end users a link to your company Web page or to a page that offers more information on the product theyre installing. To link hot text to a Web page: 1. From the Add menu in Custom Dialog Editor, select Hot Text. The Hot Text Control Settings dialog appears. 2. Fill in the Label, Variable, Value, and Control Name fields as appropriate. See Specifying Hot Text Properties on page 306. 3. In the Action group box, mark the Execute Program option. 4. Click the Edit button. The Execute Program Settings dialog appears. 5. In the Command Line field, type the URL for the Web page to which you want to link the hot text, for example, http://www.wisesolutions.com. 6. Fill in the EXE Path, Default Directory, Variables Added, and Window Size fields as appropriate. See Specifying Execute Program Settings on page 326. 7. Click OK. The Hot Text Control Settings dialog returns. 8. Specify appearance and location of the hot text. See Specifying Hot Text Properties on page 306. 9. Click OK.

Edit Text Controls


The Edit Text control lets the end user enter and edit text information. You can also use it to display text, such as license agreements or Readme files. To add an Edit Text control, select Edit Text from the Add menu in Custom Dialog Editor. The Edit Text Control Settings dialog appears.

309

6: CREATING CUSTOM DIALOGS

Default. The text you enter into this field appears in the Edit Text control by default. To put a paragraph character in this field, type CTRLENTER. Variable. Select a variable to store the contents of this field after the dialog is dismissed. Alignment. Specify how the text is aligned in the edit field: leftjustified, centered, or right-justified. Control Name. Enter the name by which you plan to refer to this control in the dialog script. Leave this blank if you do not plan to manipulate this control with a script. Horiz. Scroll. Mark this checkbox to add a horizontal scroll bar to the field. Vert. Scroll. Mark this checkbox to add a vertical scroll bar to the field. Auto HScroll. Mark this checkbox to scroll the text automatically if it extends past the right edge of the edit field. Auto VScroll. Mark this checkbox to scroll the text automatically if it extends past the bottom of the edit field. Multi-line. Mark this checkbox to allow multiple lines of text to be entered into the edit field.

310

CONFIGURING DIALOG CONTROL PROPERTIES

Password. Mark this checkbox 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 if you want to suppress the hiding of highlighting. Want Return. Mark this checkbox to allow the ENTER key to advance to the next line; otherwise entered text stays on one line. This option must be used with the Multi-line option. Border. Mark this checkbox to include a border around the edit field. Uppercase or Lowercase. Mark this checkbox to convert all entered characters to a different case. Read Only. Mark this checkbox to prevent end users from entering data into the field. Tab Stop. If this checkbox is marked, end users can use the TAB key to give focus to this field. Make sure this is marked for input fields. RichEdit. Enables the text box to support rich text objects, such as 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 (such as %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 checkbox to cause trailing backslashes to be removed from the text before it is placed in the variable. Confirm if Exists. Mark this checkbox to prompt for confirmation if the pathname the end user entered already exists on the destination computer. Clear this checkbox if you do not want the This directory already exists message to appear. X-Position / Y-Position. Use these fields to specify the exact location of the control on the dialog, in dialog units. As an alternative, you can use the alignment tools to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 302. Width / Height. Specify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, but this method is more precise.

311

6: CREATING CUSTOM DIALOGS

Push Button Controls


Push Buttons are simply buttons, like an OK or Cancel button. When clicked, they perform an action, such as saving the dialog data, closing the dialog, or advancing to the next dialog. Each dialog must have at least one button that allows the end user to get out of the dialog. To learn more about scripting buttons to handle mouse events, see Configuring a Dialog to Handle Mouse Events on page 400. To add a button, select Push Button from the Add menu in Custom Dialog Editor. The Push Button Control Settings dialog appears.

Label. Enter the name of the push button. To indicate the keyboard equivalent for the button, enter an ampersand (&) immediately before a letter. For example, < &Back would display the label < Back and set the keyboard shortcut to ALT-B. Variable and Value. Use the Variable field to enter (or select) the name of the variable that is modified when this button is clicked by the end user. In the Value field, enter the value that gets assigned to that variable. This can be useful in a script when more than one button can dismiss a dialog and you need to know which one the end user clicked.

312

CONFIGURING DIALOG CONTROL PROPERTIES

Control Name. Enter the name by which you plan to refer to this control in the dialog script. Leave this blank if you do not plan to manipulate this control with a script. Action. Choose an action for the button. Return to Previous Dialog. Displays the previously-displayed dialog in the dialog set. (The exception: the Back buttons in Wizard dialogs do not use this option. They are controlled by the Wizard Loop script action.) If this is the first dialog displayed from the set, it returns to the installation script. Return to Script. Returns to the installation script, even if this dialog was called from another dialog in the dialog set. Display Dialog. Displays the selected dialog from the current set. Abort Installation. The end user is asked to confirm that the installation should be aborted. If the end user confirms, the installation is exited. Display Help Context. If the HELPFILE variable points to a valid copy of a Windows help file, the specified numeric help context is displayed. Execute Program. Another application is launched. Click the Edit button to specify and configure the application to be launched. See Specifying Execute Program Settings on page 326. Execute Named Event. Passes a named event to the dialog script. The DLG_EVENT_TYPE variable is set to the entered text. See Creating a Custom Dialog Script on page 333 for more information. X-Position / Y-Position. Use these fields to specify the exact location of the control on the dialog, in dialog units. As an alternative, you can use the alignment tools to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 302. Width / Height. Specify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, but this method is more precise. Default Button. Mark this checkbox to make this the default button, that is, the one that is selected if the end user presses the ENTER key. Only one button should be set to the default per dialog. Do Not Check Fields. Mark this checkbox to suppress directory confirmation and field validity checking (useful for Browse buttons).

313

6: CREATING CUSTOM DIALOGS

Radio Button Controls


A group of radio buttons is considered a single control. The end user can select only one button from the group. Alignment and spacing between the individual buttons is automatically maintained by the Custom Dialog Editor. To learn more about scripting radio buttons to handle mouse events and to retrieve information, see Enabling, Disabling, and Marking Controls in a Dialog on page 402. To add a radio button, select Radio Button from the Add menu in Custom Dialog Editor. The Radio Button Control Settings dialog appears.

Radio Button Text. Enter the text options for the radio buttons, one on each line. If the end user selects the first radio button, the letter A will be put into the variable that stores the return value. If the end user selects the second radio button, the letter B is returned, and so on. Each option in the radio button is assigned a sequential character value (A, B, C, D, and so on). Retain Disabled. If you preset the radio button variable so that some of its options are disabled, those options become enabled if the end user proceeds to the next dialog and clicks Back to backtrack. Marking this checkbox makes disabled radio button options retain their disabled state, even if end users go backward and forward in dialogs. Technically, this checkbox causes any lowercase letters in the variable to stay in the variable, even after the end user navigates between dialogs. If this

314

CONFIGURING DIALOG CONTROL PROPERTIES

checkbox is cleared, the variable takes on the value of the option that was selected, and the lowercase information is lost. Variable. Enter or select the name of the script variable that stores the return value of this dialog control. Technical Note:
If you set the variable to a string containing one or more lowercase letters, the corresponding options will be disabled in the radio button control when it displays on the dialog. For instance, a radio button with four options whose variable is set to ABcd would have the last two options disabled.

Control Name. Enter the name by which you plan to refer to this control in the dialog script. Leave this blank if you do not plan to manipulate this control with a script. X-Position / Y-Position. Use these fields to specify the exact location of the control on the dialog, in dialog units. As an alternative, you can use the alignment tools to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 302. Width / Height. Specify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, but this method is more precise.

Checkbox Controls
Like radio buttons, a group of checkboxes is considered a single control. Unlike radio buttons, however, the end user can select multiple boxes. The alignment and spacing between the individual boxes is automatically maintained by the Custom Dialog Editor. Checkboxes are often used to control the installation of components or sub-components. To learn more about scripting checkboxes to handle mouse events and to retrieve information, see Enabling, Disabling, and Marking Controls in a Dialog on page 402. To add a checkbox, select Checkbox from the Add menu in Custom Dialog Editor. The Checkbox Control Settings dialog appears.

315

6: CREATING CUSTOM DIALOGS

Checkbox Text. Enter the text options for the checkboxes here, one on each line. If the end user selects the first checkbox, the letter A will be appended to the variable that stores the return value. If the end user selects the second checkbox, the letter B is appended, and so on. Each option in the checkbox is assigned a sequential character value (A, B, C, D, and so on). The variable stores all letters of checkboxes that are selected. For instance, if the end user picks the first, third, and fourth checkboxes, the variable is ABD. Variable. Enter or select the name of the script variable that stores the result of this dialog control. Technical Note:
If you set the variable to a string containing one or more lowercase letters, the corresponding options will be disabled in the checkbox control when it displays on the dialog. For instance, a checkbox with four options whose variable is set to ABcd would have the last two options disabled.

Sub-Components. If the checkbox control is being used to specify the components to be installed, these components could have subcomponents. Enter the names of sub-component variables separated by commas.

316

CONFIGURING DIALOG CONTROL PROPERTIES

Control Name. Enter the name by which you plan to refer to this control in the dialog script. Leave this blank if you do not plan to manipulate this control with a script. X-Position / Y-Position. Use these fields to specify the exact location of the control on the dialog, in dialog units. As an alternative, you can use the alignment tools to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 302. Width / Height. Specify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, but this method is more precise. Components. If this checkbox is marked, the sizes of the components that correspond to the variable specified are displayed to the right of the checkboxes. (Usually, you should mark this checkbox only if you are selecting components and have specified the COMPONENTS variable.) Retain Disabled. When this option is marked, it causes any lowercase letters in the variable to stay in the variable, even if the end user selects an option, proceeds to the next wizard dialog, then returns to the checkbox field. If this option is cleared, the variable takes on (only) the value of the selected option and the lowercase information is lost. Now, if the end user selects an option, proceeds to the next wizard dialog, then returns back to the checkbox field, all four options are available.

Combo Box Controls


A combo box can take three forms: a list box, a drop-down list, and a dropdown list that can also accept text entry. In the text entry drop-down list, end users can enter text or choose a value from the list. The size of a combo box determines where the drop-down list drops.

Note:
When you place a combo box, you must resize the bounding box so that it is taller than the visible combo box. If you do not, the drop-down list fails to dropdown when you run the installation.

To add a combo box, select Combo Box from the Add menu in Custom Dialog Editor. The Combo Box Control Settings dialog appears.

317

6: CREATING CUSTOM DIALOGS

Combo Box Text. Enter the text to be displayed in the list. Enter one item per line. Sort. Mark this checkbox to sort the combo box items into ascending order. Vert. Scroll. Mark this checkbox to let the end user scroll vertically if there are more items than fit into the allocated space. Auto HScroll. Mark this checkbox to scroll the text entry field horizontally automatically if more text is entered than fits. ProgMan Groups. If you mark this checkbox, the items in the Programs group of the Windows Start menu appear in the combo box. If the installer runs on Windows 3.1, the Program Manager groups appear in the combo box. Drive List. Mark this checkbox to display the end users available drives in the combo box. The value returned is a letter and a colon (such as C:). Directory. Mark this checkbox to have trailing backslashes automatically removed from the entered or selected text. Confirm If Exists. Mark this checkbox to prompt for confirmation if the pathname the end user entered already exists on the destination computer. Clear this checkbox if you do not want the This directory already exists message to appear.

318

CONFIGURING DIALOG CONTROL PROPERTIES

Variable. Enter or select the name of the script variable that stores the result of this dialog control. Technical Note:
To cause an option in the list to be pre-selected, choose use a Set Variable action to set a variable to the value of one of the options. Then choose that variable in the Variable field.

Combo Box Type. Choose Simple (list box from which end users can make a selection), Drop Down (drop-down list that allows text entry or selection from the list), or Drop List (drop-down list that only allows a selection from the list). Control Name. Enter the name by which you plan to refer to this control in the dialog script. Leave this blank if you do not plan to manipulate this control with a script. X-Position / Y-Position. Use these fields to specify the exact location of the control on the dialog, in dialog units. As an alternative, you can use the alignment tools to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 302. Width / Height. Specify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, but this method is more precise. Technical Note:
When setting the width and height for a combo box field, make sure the boxs dimensions are at least as wide as the longest option in the list. If the field does not drop down when tested, increase the dimensions of the field so it is twice as wide and three times as tall.

List Box Controls


A list box is simply a list of values from which the end user can choose. The control can return either the actual string the end user selected, or its position in the list as a letter. The installation returns A if the first item is selected, B if the second item is selected, and so on. You can set a list box to let the end user select multiple values by marking its Multi-Select option.

319

6: CREATING CUSTOM DIALOGS

To add a list box, select List Box from the Add menu in Custom Dialog Editor. The List Box Control Settings dialog appears.

List Box Text. Each line of this text is displayed as a separate item in the list box. Press the ENTER key between selections so there is only one item per line. Variable. Enter or select the name of the script variable that stores the result of this dialog control. Control Name. Enter the name by which you plan to refer to this control in the dialog script. Leave this blank if you do not plan to manipulate this control with a script. List Box Type. Choose Normal (a simple list), Program Manager Groups (a list of the items in the Programs group of the Start menu), Directory Tree Browse (a directory tree browser including an edit field, directory tree, and disk drive list), or List Box with Checkboxes (a list containing a checkbox for each item, allowing multiple items to be selected simultaneously). If the installer runs on Windows 3.1, Program Manager Groups causes the Program Manager groups to appear in the list box.

320

CONFIGURING DIALOG CONTROL PROPERTIES

Components. If this list box control is being used to specify the components to be installed, and if the components have subcomponents, you use this field to enter the names of sub-component variables separated by commas. Sort. Mark this checkbox to sort the list box items in ascending order. Vert. Scroll. Mark this checkbox to allow the end user to scroll vertically if there are more items than fit into the allotted space. Horiz. Scroll. Mark this checkbox to allow the end user to scroll horizontally if any items are too long for the allotted space. Disable No Scroll. Mark this checkbox to display a vertical scrollbar even if one is not needed. Multi-Select. Mark this checkbox to allow the end user to select multiple items from the list. Return Letters. Mark this checkbox to cause the control to return a list of letters representing the item selected (that is, A for the first, B for the second, etc.) rather than the item text itself. Dont Append. Mark this checkbox to not append the Program Files directory name onto the Destination Directory selected by the end user. Confirm If Exists. Mark this checkbox to prompt for confirmation if the pathname the end user entered already exists on the destination computer. Clear this checkbox if you do not want the This directory already exists message to display. Components (checkbox). Mark this checkbox to create named components and fill in the Components field above. Store Position. Mark this checkbox to store the position of the last selected item. The position is stored as a zero-padded, two-digit decimal number at the beginning of the variable. For example, if the end user selects the first, the third, then the fourth item, this control returns a value of 04ACD. X-Position / Y-Position. Use these fields to specify the exact location of the control on the dialog, in dialog units. As an alternative, you can use the alignment tools to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 302. Width / Height. Specify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, but this method is more precise.

321

6: CREATING CUSTOM DIALOGS

Group Box Control


A group box encloses a group of related controls with a rectangle. To add a group box, select Group Box from the Add menu in Custom Dialog Editor. The Group Box Control Settings dialog appears. For an example of a group box, look at the Placement group box in the Group Box Control Settings dialog.

Group Box Text. Enter a name to appear at the top of your group box. For example, in the Group Box Control Settings dialog, Placement is the group box text. Control Name. Enter the name by which you plan to refer to this control in the dialog script. Leave the field blank if you do not plan to manipulate this control with a script. Transparent Background. Mark this checkbox to make the background for this control transparent. X-Position / Y-Position. Use these fields to specify the exact location of the control on the dialog, in dialog units. As an alternative, you can use the alignment tools to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 302. Width / Height. Specify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, but this method is more precise.

Graphic Controls
You can add graphics to be displayed on a dialog. Graphic controls are static controls, which means that the end user cannot make changes to them. To add a graphic, select Graphic from the Add menu in Custom Dialog Editor. The Graphic Control Settings dialog appears.

322

CONFIGURING DIALOG CONTROL PROPERTIES

Graphic Pathname. Enter the pathname for the bitmap graphic to add to the dialog or click Browse to navigate to its location. Control Name. Enter the name by which you plan to refer to this control in the dialog script. Leave the field blank if you do not plan to manipulate this control with a script. Do not resize bitmap graphic. Normally, graphics are resized if the dialog needs to be made larger, for example, because the destination computer uses a larger font size. Mark this checkbox to keep the graphic at the same size, regardless of the system settings. Be aware though, that marking this checkbox on systems with standard font sizes causes the graphic to appear in a different place on the dialog. Therefore, test your installation thoroughly if you decide to mark this checkbox. X-Position / Y-Position. Use these fields to specify the exact location of the control on the dialog, in dialog units. As an alternative, you can use the alignment tools to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 302. Width / Height. Specify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, but this method is more precise.

Rectangle Control
Use the Rectangle dialog control to draw a box in the dialog. Rectangle controls are static controls, which means that the end user cannot make changes to them. To add a rectangle, select Rectangle from the Add menu in Custom Dialog Editor. The Frame/Rectangle Control Settings dialog appears.

323

6: CREATING CUSTOM DIALOGS

Type. From the drop-down list, choose Frame or Rectangle. On older operating systems, such as Windows NT 3.51 or Windows 3.1, rectangles are filled and frames are not. All newer operating systems do not distinguish between rectangles and frames. Bevel. Select an option to determine the 3D appearance of the frames or rectangles: Inset. Frame/rectangle appears to sink into the dialog. Flush. Frame/rectangle appears at the same level with the dialog. Outset. Frame/rectangle appears to pop out of the dialog. Control Name. Enter the name by which you plan to refer to this control in the dialog script. Leave the field blank if you do not plan to manipulate this control with a script. X-Position / Y-Position. Use these fields to specify the exact location of the control on the dialog, in dialog units. As an alternative, you can use the alignment tools to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 302. Width and Height. Specify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, but this method is more precise.

Play AVI Control


You can play an animation on any of your installation dialogs by adding a Play AVI dialog control. For example, you might want to provide marketing information or offer animated help on how to install your product. The .AVI you add plays automatically, either once or looping continuously. To add a movie, select Play AVI from the Add menu in Custom Dialog Editor. The Play AVI Control Settings dialog appears.

324

CONFIGURING DIALOG CONTROL PROPERTIES

.AVI Pathname. Specify the pathname for the movie (.AVI file) you want to play on the dialog. Control Name. Enter the name by which you plan to refer to this control in the dialog script. Leave the field blank if you do not plan to manipulate this control with a script. X-Position / Y-Position. Use these fields to specify the exact location of the control on the dialog, in dialog units. As an alternative, you can use the alignment tools to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 302. Width / Height. Specify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, but this method is more precise. Loop Continuously. Mark this checkbox to repeatedly start the movie from the beginning.

325

6: CREATING CUSTOM DIALOGS

Specifying Execute Program Settings


When you place a Hot Text control or a Push Button control on a dialog, you can choose to execute a program if the hot text or button is clicked. To do this, you choose the Execute Program option in the Hot Text Control Settings dialog or the Push Button Control Settings dialog. The Execute Program Settings dialog appears.

EXE Path. Specify the path to the application to be executed, including the application executable. Use variable substitution (for example, %MAINDIR% to refer to the application directory) to ensure a valid path regardless the installation location. You can enter the filename only if you set the path in the Default Directory field below. Command Line. Enter the command line options for the application, as if you were typing them using the Run command on the Start menu. For example: /S /Q Default Directory. Specify the directory where the application looks first when looking for a file. If you entered only the file name in the EXE Path field, the file must exist in this directory. You can use a variable here also. Variables Added. Any script variables that were added by the executable program using a DDE link. Technical Note:
Variables Added is 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 checkbox is marked, the installation does not continue until the application has exited.

326

SOLVING PROBLEMS IN DIALOGS

Solving Problems in Dialogs


This section provides solutions to several of the most common dialog editing problems, including changing the default graphic on a wizard dialog, and techniques for customizing and altering the behavior of dialogs.

Changing the Default Graphic on Wizard Dialogs


By default, wizard dialogs contain a graphic that is not part of the individual dialogs. It is specified in the Wizard Loop Settings dialog, where you configure the Wizard Loop script action. You can change this graphic, and you can turn it off for selected dialogs. To change the bitmap that applies to all wizard dialogs: 1. In Script Editor, locate the Wizard Loop script line and double-click it. (There are two Wizard Loop script lines, one for the main installation, and one that contains the Finish dialog. Change both of these if you want the same graphic on all dialogs.) The Wizard Loop Settings dialog appears. For information on this dialog, see Wizard Loop on page 290. 2. In the Pathname field in the Wizard Bitmap section, enter a pathname for a new graphic. This automatically changes the graphic for all dialogs in the loop sequence. To turn off the Wizard Bitmap in selected wizard dialogs: 1. In Script Editor, double-click the Custom Dialog script line for the dialog you want to change. 2. In Custom Dialog Editor, from the Edit menu, select Dialog Box Properties. The Dialog Box Properties dialog appears. For information on this dialog, see Setting Dialog Properties on page 299. 3. Towards the bottom of the dialog, mark the Do not display wizard graphic on this dialog checkbox.

327

6: CREATING CUSTOM DIALOGS

Removing Program Files From the End of Destination Directory


Whenever the default directory is changed by clicking Browse in the Select Destination Directory dialog, a Program Files directory is automatically appended to the selected directory. This happens if you did NOT fill out the Default Directory field on the Product Details page. You can either fill out the Default Directory field, or you can disable the appending of Program Files. To get rid of Program Files: 1. From Script Editor, double-click the following line in the script:

Custom Dialog Select Destination Directory


The Custom Dialog Editor opens. 2. From the Window menu, choose Select Destination Directory. The Select Destination Directory dialog opens. 3. Double-click the list box control. The List Box Control Settings dialog opens.

328

SOLVING PROBLEMS IN DIALOGS

4. If you do not want the Program Files directory to be automatically appended, mark the Dont Append checkbox and click OK. 5. Select Save Changes and Exit from the File menu.

Disabling the Directory Already Exists Message


When an end user runs the installer and selects an existing folder as the destination directory, a warning message informs the end user that the directory already exists. This helps prevent the end user from installing to the wrong directory. To skip this warning message: 1. From Script Editor, double-click the following line in the script:

Custom Dialog Select Destination Directory


The Custom Dialog Editor opens. 2. From the Window menu, choose Select Destination Directory. The Select Destination Directory dialog opens. 3. Double-click the list box control. The List Box Control Settings dialog opens. 4. If you do not want the Directory Already Exists message to display, clear the Confirm if Exists checkbox and click OK. 5. Select Save Changes and Exit from the File menu.

Keeping Disabled Buttons from Reactivating


This problem affects both radio buttons and checkboxes. Here is an example of the problem: Suppose you have a dialog in a wizard loop that has a radio button with four options, several of which are intentionally disabled by setting the variable associated with the radio button to ABcd. The lowercase c and d make the third and fourth options appear disabled. The dialog works fine if the end user selects an option and continues through the wizard dialogs. However, if the end user clicks Back to return to the dialog that contains the radio button, then all four of the buttons options are enabled. You can correct this problem in the Radio Button Control Settings dialog by marking the Retain Disabled checkbox. This causes any lowercase letters in the variable to stay in the variable, even after the end user selects a radio button and proceeds to the next wizard dialog.

329

6: CREATING CUSTOM DIALOGS

In the example described above, if Retain Disabled is marked and an end user selects the first option in the radio button, the value of the variable is set to cdA (uppercase A because the end user selected the first option.) If Retain Disabled is not marked, the radio button's variable is set only to A. That is why all four radio buttons are enabled when the end user backtracks, because the variable does not contain a, b, c or d.

Handling Mouse Events


Dialogs can exhibit different behaviors based on end user input. To learn more about this, refer to the sample scripts listed below. These are located in the Samples directory within the Wise Installation System application directory. See the following topics: Learning About Script Samples on page 392 Configuring a Dialog to Handle Mouse Events on page 400 Enabling, Disabling, and Marking Controls in a Dialog on page 402 Displaying a License Agreement Dialog on page 403 Showing or Skipping Dialogs Based on End User Input on page 404 Letting the User Choose Subcomponents During Installation on page 406

330

WORKING WITH CUSTOM DIALOG SETS

Working With Custom Dialog Sets


A single Custom Dialog script action can display a set of related dialogs. You do this by using a button in one dialog as a gateway to other dialogs. This secondary dialog can lead to other dialogs, return to the primary dialog (that called them), or give the focus back to the installation script. A single dialog set can contain up to 256 separate dialogs. If you want to see an example of a custom dialog script, two dialogs on the Dialogs page in Installation Expert are actually dialog sets: Destination Directory and Backup Replaced Files. Note:
Generally dialog sets are comprised of one dialog and the other dialogs that it calls. For instance, a dialog might have an Options button and Browse button, each of which brings up the corresponding dialog. The three dialogs together comprise a dialog set. The main dialogs that you see during installation are not a dialog set; they are controlled by a Wizard Loop action in the script.

Creating a Dialog Set


To create a custom dialog set: 1. Create the master dialog. The master dialog is the first dialog displayed when the associated Custom Dialog script action is executed. 2. Add another dialog to the set (as required) by opening the File menu and choosing New Dialog. Fill out the Dialog Properties dialog and save the new dialog, but leave it open for editing. To switch between dialogs in the set while editing, open the Window menu and select the dialog you want to edit. (You can also delete the current dialog using the Delete Dialog command on this menu.) 3. Link the set of dialogs together using push button controls. See Push Button Controls on page 312 to learn about the various actions you can assign to a button. Using push buttons, you can not only link to another dialog, but you can also return to the dialog from which it was called, or return to the installation script. 4. When you have finished creating the dialog set, choose Save Changes and Exit from the File menu. This saves all the dialogs in the set simultaneously.

331

6: CREATING CUSTOM DIALOGS

Configuring Dialog Set Properties


In the Dialog Set Properties dialog, you can name the set and specify the variable on which to base the display of this dialog set. To access the Dialog Set Properties dialog, open the dialog in Custom Dialog Editor and select Dialog Set Properties from the Edit menu.

Dialog Set Name. The name of this dialog set. If this dialog set is comprised of only one dialog, then this is usually the same name as the dialog. The Dialog Set Name must be unique within a wizard loop. This value is displayed in the installation script. Display Variable. The display variable determines which dialog in the wizard loop to present to the end user the next time the wizard loop is executed. When this dialog is presented to the end user, the display variable is set to this dialog set name. If this field is not blank the dialog is only displayed if the variable holds the same value as the Dialog Set Name field. Called Dialogs Float. If you are displaying a dialog outside a wizard loop, mark this checkbox if you want called dialogs to appear over the calling dialog. For instance, suppose you display a Select Destination Directory dialog that contains a Browse button. If this checkbox is marked, and the end user clicks Browse, the Browse dialog appears on top of the Select Destination Directory dialog instead of replacing it. This behavior is built into the wizard loop dialogs by default.

332

CREATING A CUSTOM DIALOG SCRIPT

Creating a Custom Dialog Script


Each dialog can include an attached WiseScript that lets you perform script actions in response to certain events inside a dialog. Use the View menu in the Custom Dialog Editor to access the Dialog Script Editor, which is a scaled-down version of Setup Editor. It contains only those script actions that can be used in dialog scripts, plus three script actions that are only available in the Custom Dialog Editor scripting environment: Set Control Attributes, Set Control Text, and Set Current Control. For an example of a dialog script, open the sample script EVENT HANDLER.WSE from the Samples directory within the Wise Installation System application directory. Once you are in the EVENT HANDLER.WSE script, go to Script Editor, double-click the Custom Dialog Event Handler script line, and select Dialog Script Editor from the View menu. Note:
Before attempting to write a custom dialog script, you should familiarize yourself with at least the introductory material in Script Editor on page 139. Also see Conditionals and Loops on page 166 and Variables and Expressions on page 167.

Certain events are generated automatically as the end user works with the dialog on the destination computer. Built-in dialog events include first-time display of the dialog (INIT), updating of information displayed in the dialog (UPDATE), and verification of the validity of the contents of the dialog (VERIFY). Additional events, whose names you define, can be triggered by buttons in the dialog by choosing Execute Named Event as the buttons action. To handle the generated events, you create a conditional structure that tests the variable DLG_EVENT_TYPE for the appropriate value. If DLG_EVENT_TYPE is equal to INIT, for instance, the INIT event is being called. The script actions between the If statement that tests for this value and the End statement that goes with it should handle that event. Your script can handle multiple events in different ways by including multiple conditional blocks, one after the other. The script actions available in the Dialog Script Editor are a subset of the full WiseScript, with a few additions specific to dialogs. Here is a list of the available script actions: Call DLL Function. Calls an external program in a dynamically linked library. See Call DLL Function on page 186.

333

6: CREATING CUSTOM DIALOGS

Check Configuration. Tests aspects of the computers configuration such as amount of memory, OS type, display depth, and more. See Check Configuration on page 194. Check If File/Dir Exists. Determines if a particular file or directory exists on the destination computer or whether a particular directory is writable on the destination computer. See Check If File/Dir Exists on page 199. Display Message. Displays a message box on the screen; useful for error messages or alerts. See Display Message on page 221. Edit INI File. Edits your programs private .INI files as well as the WIN.INI and System.ini files. Editing with this script action does not force Windows to restart, and might corrupt the file. See Edit INI File on page 225. Edit Registry. Adds, edits, or deletes keys or values in the registry. See Edit Registry on page 227. Else Statement. Marks the beginning of a section of instructions. See Else Statement on page 231. ElseIf Statement. Marks the beginning of a block of code that is only executed if the condition checked by the If is false, all previous ElseIfs are false, and this ElseIf is true. See ElseIf Statement on page 231. End Statement. Marks the end of an If block or a While loop. See End Statement on page 232. Get Registry Key Value. Gets the value of a registry key and stores it in the specified script variable. See Get Registry Key Value on page 241. Get System Info. Retrieves date and time, Windows version, available RAM, owner name, company name, and more. See Get System Information on page 242. If Statement. Marks the beginning of a conditional block of script. See If Statement on page 247 and Else Statement on page 231. Parse String. Splits or edits a piece of text (any of which can be obtained from a variable) and places the results in two new variables. Also splits a string at any arbitrary character position. See Parse String on page 263. Prompt for Filename. Asks the end user for a path for opening or saving a file. See Prompt for Filename on page 268. Read INI Value. Reads an entry from an existing .INI file into a script variable, for example, to obtain the pathname to an existing version of a program or other file. See Read INI Value on page 272. Remark. Used to document the purpose of script sections; ignored by the computer. See Remark on page 276.

334

CREATING A CUSTOM DIALOG SCRIPT

Set Variable. Sets script variables to particular values and performs operations and calculations. See Set Variable on page 285. While Statement. Marks the beginning of a loop. See While Statement on page 288. The following script actions are available only in custom dialog scripts. These actions manipulate controls in the dialog programmatically. Any control you want to manipulate must be named in its settings dialog. Controls without names cannot be manipulated with these actions. Set Control Attributes. You can show and enable, disable, or hide a control in the current dialog. See Set Control Attributes on page 281. Set Control Text. You can set the text of any static text control or input field with this action. Variable substitution is permitted to include the values of variables. See Set Control Text on page 282. Set Current Control. Moves the input focus to the specified control. See Set Current Control on page 283. To learn more about scripting a dialog to handle mouse events, see Enabling, Disabling, and Marking Controls in a Dialog on page 402. Here are a few ideas for effects you can achieve with a custom dialog script. These ideas should give you some feel for the potential of this features power as well as some hints on how to go about implementing a feature you want. Have the INIT event enable certain buttons in the current dialog if the end user answered a previous dialog in a certain way. Check the variable containing the value returned from the previous dialog, then use one or more Set Control Attributes script actions to enable buttons. Have the INIT event disable certain buttons if they are not valid based on previous chosen options. Have the INIT event store the current amount of free memory in a static text control, then set the dialog to display the current amount of free memory in the lower left corner. Have the UPDATE event enable the Next button in a Wizard dialog when a password field contains the correct value. The UPDATE event is called whenever any field or control is changed, and the variable associated with each field or control contains its current value, suitable for testing in a script. Have the VERIFY event check the contents of one or more fields in the dialog and reject the end users entry if it is invalid. VERIFY is called when the end user attempts to exit the dialog. Set the DLG_EVENT_TYPE variable to an empty string within the handler to prevent the dialog from being closed. If all fields are correct, do not change DLG_EVENT_TYPE.

335

6: CREATING CUSTOM DIALOGS

Create a button in the dialog that generates a custom event. For instance, create an event called DISKSPACE, and set the events handler to display the amount of free disk space using a Display Message script event.

336

Chapter 7

Creating Custom Billboards


Billboards are a series of one or more graphics that present a slide show to the end user while files are being installed on the destination computer. These are typically used to encourage the end user to register the product, to promote related products, or to provide other useful information. The Custom Billboard Editor provides a basic set of drawing tools for creating billboards. Here you can create scalable, vector-based artwork that can be added to the billboards and displayed during installation. Although you can import graphics created in other drawing programs, there are advantages to using the Custom Billboard Editor. For example, the Scale to Screen option can resize native billboard objects so they look the same regardless of the resolution the end user is running. Editing graphics in the Custom Billboard Editor is easy because all objects can be moved, rearranged, recolored, or resized. For instance, Text remains editable once it has been added, making it easy to translate your billboards into multiple languages. If you import bitmaps created in other paint and draw programs, you can still use the Custom Billboard Editor to place other objects, such as editable text, over them. Topics in this section cover: Accessing the Custom Billboard Editor. Working with the Custom Billboard Editor.

337

7: CREATING CUSTOM BILLBOARDS

Accessing the Custom Billboard Editor


To access the Custom Billboard Editor: 1. Go to Script Editor. 2. At the bottom of the Actions List, click the Standard tab. 3. Double-click the Custom Billboard action to open the Custom Billboard Editor window.

All the tools you need to work in the Custom Billboard Editor are accessible from its menu bar or the icons on the toolbar. Note:
Although the graphics created by the Custom Billboard Editor can be added to the installation using Installation Experts Billboards page, the editor itself is only accessible through Script Editor.

338

WORKING WITH THE CUSTOM BILLBOARD EDITOR

Working with the Custom Billboard Editor


The Custom Billboard Editor includes a blue work area with black lines marking the boundaries of a monitor set for 640 x 480 resolution. The blue work area indicates that the background is transparent, so any objects you place here appear over whatever background is displayed by the installer. The background that displays during the installation can be specified on the Screen page of Installation Expert.

About Billboard Files


When you save a billboard from the Custom Billboard Editor, you are saving the entire blue screen area, including the text, lines, shapes, and graphics that are on the screen. Billboards are automatically assigned a .GRF file extension when saved. After creating the billboards for your installation, you can use the Billboards page in Installation Expert to select the ones you want to display and arrange the order in which they appear. Remember that the billboard itself is transparent, so unless you create a colored background on the billboard, only the objects (text and graphics) you place on it will be visible. The default background that displays during the installation is controlled by the Screen page in Installation Expert.

Opening and Saving Custom Billboards


All of the commands you need for creating, saving, exporting, and importing billboards can be accessed from the File menu in the Custom Billboard Editor. There is no New command in the File menu. A new blank billboard screen displays automatically whenever you open the Custom Billboard Editor. The four commands on the File menu are described below: Open. Opens a billboard from a .GRF file on disk, importing it to the current installation. Save As. Saves a billboard to a .GRF file on disk. You can then share the file with others, or re-use it on future projects by selecting it using the Open command. Exit Without Saving. Returns to Script Editor without saving any of the changes made to the billboard during this Custom Billboard Editor session. Save Changes and Exit. Saves the changes you have made to the billboard, then returns to Script Editor. If you choose this command, the graphic is saved as part of the installation. It is not saved in a separate file unless you use the Save As command.

339

7: CREATING CUSTOM BILLBOARDS

Adding Objects to a Billboard


The Custom Billboard Editor is object-based and lets you add text, line, rectangle, rounded rectangle, ellipse, polygon, and bitmap objects. To add an object: 1. Click the Add menu and choose the appropriate type of object from the menu list. OR Select the desired object directly from the toolbar. (You can see a tooltip description of each toolbar icon by holding the mouse pointer over it.) 2. Drag in the work area to create an object of that type. (The polygon tool requires that you click at each point of the polygon, then doubleclick at the last point.) After you place the object in the work area, a Settings dialog appears. 3. In the Settings dialog, set the objects initial characteristics. (line style, line color, fill color, etc.) Each type of object is covered separately in the sections that follow. For text objects, see Editing Billboard Text Objects. For line objects, see Editing Billboard Line Objects on page 342. For rectangles, rounded rectangles, and ellipses, see Editing Billboard Rectangles and Ellipses on page 343. For polygons, see Editing Billboard Polygon Objects on page 344. For bitmaps, see Editing Billboard Bitmap Objects on page 345. 4. Click OK to save the object settings, then position the object to the desired location on the billboard. See Resizing, Moving, and Aligning Billboard Objects on page 346.

Editing Billboard Text Objects


Text you place on a billboard using the Text tool remains editable and can be changed at any time. Each text object can use only one font, size, and style. When you select the Text tool from the Add menu or toolbar, you first drag the dimensions of the text object in the billboard editor. When you release the mouse button, the Text Settings dialog opens.

340

WORKING WITH THE CUSTOM BILLBOARD EDITOR

In the Text Settings dialog, you can specify the following: Text. The text to be displayed. No variables can be referenced here, except compiler variables. Extra Bold. Mark this checkbox to display text in an extremely bold version of the typeface. Shadow. Mark this checkbox to display text using a 3D effect. Alignment. Specify the alignment of the text within its bounding rectangle (specified by the Placement fields below): left, center, or right. Text Angle. Specify the angle at which text should be displayed. If a non-zero text angle is used, the text is always centered regardless of the alignment setting. This feature is available only if you have selected a TrueType font. Font Style. Click the Set Font button to choose the font, size, and style for this object. Text Color. Click the Pick button 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.

341

7: CREATING CUSTOM BILLBOARDS

Editing Billboard Line Objects


When you draw a line on a billboard, you define a box in which the line will fit. The line is drawn from one corner of the box (either the upper left or the lower left) to its opposite. After you draw a line in the Billboard Editor, the Line Settings dialog opens.

In the Line Settings dialog, you can specify the following: Line Style. Choose the desired texture for the line. Line Arrows. Determines which ends of the line will have arrowheads, if any. Line Direction. Determines whether the line should connect the lower left corner of the bounding rectangle to the upper right corner, or the upper left to the lower right. Line Width. The width of the line in pixels. Line Color. Click the Pick button to choose a color for the line using the standard Windows color picker. Placement. Specify the size and location of the object in pixels. The upper left corner is 0,0. The black rectangle on the billboard editor defines an area of 640 x 480 pixels.

342

WORKING WITH THE CUSTOM BILLBOARD EDITOR

Editing Billboard Rectangles and Ellipses


The procedure for editing rectangles, rounded rectangles, and ellipses are the same for all three objects. They have the same available properties except rectangles also have a 3D option. After you draw a new rectangle, round rectangle, or ellipse object in the billboard editor, the Object Settings dialog opens.

In the Object Settings dialog, you can specify the following: Line Style. Choose the desired texture for the line that outlines the shape. Fill Style. Choose from No Fill (line only), Solid Color, or a variety of crosshatch styles. 3D. Each option from this list gives the rectangle a different 3D effect. Line Width. The width of the objects outline in pixels. Line Color / Fill Color. Click the Pick button to open the standard Windows color palette, then select the color you want to apply to the objects outline or its interior. Placement. Specify the size and location of the object in pixels. The upper left corner is 0,0. The black rectangle on the billboard editor defines an area of 640 x 480 pixels.

343

7: CREATING CUSTOM BILLBOARDS

Editing Billboard Polygon Objects


The polygon object consists of a series of points that are connected by lines. The properties dialog for a polygon object is very similar to that for a rectangle, except it displays the list of points rather than height, width, and X-Y coordinates. After you draw a polygon, the Polygon Settings dialog opens.

In the Polygon Settings dialog, you can specify the following: Line Style. Choose the desired texture for the line that makes up the polygon. Fill Style. Choose from No Fill (line only), Solid Color, or a variety of crosshatch styles. Line Width. The width of the objects outline in pixels. Polygon Points. The list of points that define the polygons vertices. Click the Delete button to delete the selected points, or use the X and Y fields to move the selected points to new coordinates. Line Color / Fill Color. Click the Pick button to open the standard Windows palette, then select the color for the objects outline or its interior.

344

WORKING WITH THE CUSTOM BILLBOARD EDITOR

Editing Billboard Bitmap Objects


You can use the Bitmap object to import bitmap graphics created in other applications into your Custom Billboards. It is a good idea to use the text tool in the Custom Billboard Editor to add captions and content to the graphics, rather than making the text part of the bitmap itself. In this way, you can easily change the text later, for example, to translate it into a different language or update it for the next product release. 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.

After you draw the bitmap frame in the Billboard Editor, the Bitmap Settings dialog opens so you can specify the path of the bitmap. The Custom Billboard Editor supports 256-color and true-color bitmap images.

In the Bitmap Settings dialog, you can specify the following: Pathname. The pathname to the graphic on your system. Billboards support 256-color and true-color bitmap (BMP) files. Transparent. Mark this checkbox to make the color chosen below transparent. Transparent Color. Enter the RGB values of the desired transparent color here, or click the Pick button to open the standard Windows color palette and select the desired color. Every pixel in the image with this color becomes invisible on the billboard, meaning you can see everything behind it.

345

7: CREATING CUSTOM BILLBOARDS

Placement. Specify the size and location of the object. For best results, make the width and height equal to the actual width and height of the image.

Resizing, Moving, and Aligning Billboard Objects


You resize an object in the Custom Billboard Editor by dragging one of the eight handles that appear around the perimeter of the object. You move objects on the Custom Billboard Editor by clicking and dragging them. For fine placement of objects, use the arrow keys on the keyboard to nudge the currently selected object 1 pixel in the direction of the arrow. For example, to nudge the image vertically by 1 pixel, press the UP ARROW key once. When two or more objects overlap, you can choose which one appears in front (or on top) by selecting Bring to Front or Send to Back from the Edit menu. Use the commands on the Layout menu to position dialog controls precisely in relation to one another. First select all the objects you want to align, then, from the Layout menu, choose the desired Align command. 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, if desired. 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, if desired. To distribute three or more objects evenly across a space, first move two of the objects to the extreme positions. For example, if you are creating a row of bitmaps, move two bitmaps to the desired leftmost and rightmost positions, then place the other bitmaps somewhere between them. Then select the bitmaps (holding SHIFT while clicking the second and subsequent bitmaps) and choose a Space command from the Align menu.

346

WORKING WITH THE CUSTOM BILLBOARD EDITOR

Setting Billboard Properties


When you are done creating a billboard, use the Billboard Settings dialog to set the behavior of the entire billboard as a whole. Besides being able to specify where the billboard appears on the screen, you can control how it interacts with other billboards and choose from several fade-in or slide in effects. Access the Billboard Settings dialog by selecting Graphic Properties from the Edit menu in the Custom Billboard Editor. The options on this dialog are essentially the same as the settings for the Display Billboard script action.

In the Billboard Settings dialog, you can specify the following: X Position / Y Position. Use these fields to indicate the precise location on the screen where the upper left corner of the billboard should be positioned when it displays. The upper left corner of the screen is the 0,0 pixel coordinate. The standard VGA screen displays only 640 x 480 pixels, so it is a good idea to stay within these dimensions unless you are certain the end user is using a higher screen resolution. For more general placement of the billboard, use the checkbox options on this dialog to specify the location. To make the billboard automatically adapt itself to the end users screen resolution, mark the Scale to Screen checkbox. Erase Num. This field determines how many of the billboards currently being displayed should be erased before the new image is displayed. To display only one image at a time, set this field to 1. The oldest image, that is the one that has been displaying the longest, is removed first.

347

7: CREATING CUSTOM BILLBOARDS

Build Effect. Determines the transition effect used to display the image. You can use this drop-down list to cause the billboard to fade in, or to move onto the screen from any edge. Center Horizontal. Mark this checkbox to display your image centered horizontally. Place at Right. Mark this checkbox to display the Custom Billboard at the right edge of the screen. Due to rounding errors inherent in the Windows MetaFile format, this option can be slightly inaccurate when used with custom billboards that have been scaled to the screen. Scale to Screen. Mark this checkbox to scale the image so that it takes up the same proportional area of the screen regardless of screen resolution. When this checkbox is cleared, the billboard displays at its actual size in 640x480 mode. If your billboard contains imported bitmap graphics, they can appear distorted when scaled. This is not true of native objects created in the Custom Billboard Editor. Hide Progress Bar. Mark this checkbox to hide the progress indicator while this billboard is being displayed. You can substitute a series of billboards to replace the progress indicator. Center Vertical. Mark this checkbox to center the image vertically. Place at Bottom. Mark this checkbox to place the image at the bottom of the screen. Due to rounding errors inherent in the Windows MetaFile format, this option can be slightly inaccurate when used with billboards that have been scaled to the screen. Erase All. Mark this checkbox to remove all previous billboards from the screen before displaying the new one. You need to specify this on the last billboard in a group (of billboards) to clear it and any others from the display. Timed Display. Mark this checkbox to automatically display a series of billboards at evenly-spaced intervals during an installation. To make this work, place all of the timed Custom Billboard script actions in consecutive rows before the first Install File(s) action. The installation engine calculates how long to display each so that they are displayed for approximately the same amount of time during the installation process. To control the installation speed so that each billboard displays long enough to read, go to Installation Expert, open the Build Settings page, and check the Control Installation Speed checkbox. Otherwise, the billboards flash by too quickly to be read.

348

Chapter 8

Tools

The Wise Installation System includes three powerful tools that let you quickly start installations, saving you valuable time. You can use these tools to create a fully-functional setup program, or as a starting point for creating an installation file that you want to modify with Installation Expert or Script Editor. In this section, youll learn how to: Record another setup program, recreating it in the Wise Installation System. See SetupCapture on page 351. Create an installation that records the accessed files of an installed application. See ApplicationWatch on page 365. Import a Visual Basic project into an installation. Import Visual Basic Project on page 368.

349

8: TOOLS

About Tools
Access built-in tools by selecting them from the Tools menu or by clicking their icons on the toolbar. SetupCapture. Use SetupCapture to create a WiseScript version of an existing installation program. It records the changes that occur on your system during the installation of an application, including files and other system changes. From this, it recreates the installation in the Wise Installation System. Use this wizard on a computer that has a clean installation of the Windows operating system. See SetupCapture on page 351. Professional Edition only
SetupCapture is available only in the Professional Edition.

ApplicationWatch. This tool monitors an application while you run it and adds all .DLL, .OCX, and .EXE files that the application accesses to a new installation. For an application thats installed on your drive, this provides a starting point for a new installation. You can also use the new installation for informational purposes to determine what files an installation accesses. See ApplicationWatch on page 365. Import Visual Basic Project. Rather than starting your installation from scratch, this tool lets you start with a project you have already created in Visual Basic 5 or 6. When you import a Visual Basic project, the Wise Installation System automatically pulls all the files from that project. This is a convenient shortcut for creating setup programs for Visual Basic programs. See Import Visual Basic Project on page 368.

350

SETUPCAPTURE

SetupCapture
Professional Edition only
SetupCapture is available only in the Professional Edition.

SetupCapture lets you create a WiseScript-based installation from a standard compiled setup program for which you do not have the source files. SetupCapture works by scanning your system before and after you install the application and recording all the differences. It records not only new files that have been added, but also replaced files and changes within existing files. By comparing the differences between the pre-installation and post-installation scans, SetupCapture generates a new installation that reproduces the effects of the original installation program, including registry entries. Keep in mind that SetupCapture only looks at the before and after snapshots of your system; it does not monitor any internal logic that exists within the setup program and it does not replicate the user interface of the original setup program. It also does not capture deletions made to desktop shortcuts or directories.

Guidelines for Capturing an Application


Professional Edition only
SetupCapture is available only in the Professional Edition.

Before using SetupCapture for the first time, read the guidelines below to familiarize yourself with the process. They contain tips and tricks that help you understand details of how SetupCapture works. Run SetupCapture on a clean machine. Because SetupCapture works by comparing the contents of your hard disk before and after installation, you should run it only on a computer with a clean installation of Windows. Otherwise, some of the files required by the program being installed might already exist on your computer. For instance, if you already have an HP LaserJet 4050 printer driver on your machine and capture an HP printer driver setup program, SetupCapture will not record the HP LaserJet 4050 printer driver file because it existed prior to the pre-installation scan. Before running SetupCapture, exit all other applications. Otherwise, you might inadvertently capture the activities of other applications.

351

8: TOOLS

During SetupCapture, changes to .INI files are recorded as changes to .INI files only if the .INI file follows standard .INI file format. Otherwise the changes are recorded as a file change. Do not use SetupCapture to capture .MSI-based installations. MSIbased installations cannot be captured correctly with SetupCapture. You can edit .MSI files directory with Wise for Windows Installer, another Wise Solutions product. You can capture multiple installations to the same installation. Just run more than one installation while you have the Execute Installation dialog open during SetupCapture. SetupCapture lets you create a new installation from a setup program, but you must be able to run the setup program to use SetupCapture to capture it. For instance, if the setup program requires a serial number to install, you must have the serial number. SetupCapture bases a new installation on the before and after snapshots of your system; it does not monitor any internal logic that exists within the setup program and it does not replicate the user interface of the original setup program. If you want to capture an uninstall, you must mark the Include files deleted during capture checkbox, and the Include registry keys deleted during capture checkbox. These are located in the SetupCapture Configuration dialog, which you access by clicking the Settings button. In the captured installation, deleted items are located Remove File(s) and Edit Registry script actions in Script Editor. Wise Installation System does not copy files to or replace files on the root (C:\) directory. Because the root directory contains files that enable the computer to boot, changing files in this directory could cause failure to boot if a system file is incorrectly replaced. This limitation does not apply to directories created on the root; directories created on the root and all their contents are captured.

Running SetupCapture
Professional Edition only
SetupCapture is available only in the Professional Edition.

When you use SetupCapture to record an installation, the changes are added to the current installation. If you want to isolate the results of a SetupCapture, create a new installation based on a SetupCapture.

352

SETUPCAPTURE

To create an installation based on running an installation: 1. Start SetupCapture in either of two ways: If you want the results of the capture put into a new installation file, select New from the File menu, select the SetupCapture icon, and click OK. OR If you want the results of the capture added to the current installation file, select SetupCapture from the Tools menu. A Welcome dialog appears.

2. On the Welcome dialog, you must specify the configuration settings that govern how this SetupCapture works. Click the Settings button and a dialog with four tabs appears. See the following topics: Setting General Settings on page 355. Setting Directories to Watch on page 356. Setting File and Folder Exclusions on page 358. Setting Registry Exclusions on page 361. 3. After selecting settings to govern this SetupCapture, click Next on the Welcome dialog. The Begin Installation Capture dialog appears. 4. Click Next.

353

8: TOOLS

A scan of your system begins based on the settings you chose, which might take a few minutes. The Execute Installation dialog appears.

5. On the Execute Installation dialog, you specify and run an installation or multiple installations. See Executing Installations to Be Captured on page 362. If you only plan to run one installation, specify the installation .EXE to be run in the .EXE Name field, and optionally, any command line options to apply. Click Next. When the installation opens, run it as you want it to be recorded. If you plan to run multiple installations, specify the first installation .EXE to be run in the .EXE Name field, and optionally, any command line options to apply. Click the Execute button instead of the Next button. When the installation opens, run it as you want it to be recorded. Then specify a different .EXE and command line options, click Execute again, and run the second installation. Run as many installations as desired. Click Next only after you finish all installations. The End Installation Capture dialog appears. 6. Click Next on the End Installation Capture dialog. A scan of your system begins, which might take a few minutes, and then the Finish dialog appears. 7. Click Finish.

354

SETUPCAPTURE

You can see the results from the SetupCapture by exploring the Files page, Registry page, and other pages in the Installation Details page group in Installation Expert. To see exactly what the recreated script does, look at Script Editor.

Setting General Settings


Professional Edition only
SetupCapture is available only in the Professional Edition.

You should set general preferences for SetupCapture before running it. These preferences determine what kind of information is captured and how that information is interpreted in the Wise Installation System installation. Access the General Settings tab by clicking the Settings button on the Welcome dialog of SetupCapture. See Running SetupCapture on page 352.

Include files deleted during capture. Normally SetupCapture doesnt record the deletion of files by an installation, which helps protect the destination computer from damage. However, in some cases, you might want SetupCapture to record the deletion of files. Mark this checkbox if you want SetupCapture to record the deletion of files and to add the necessary deletion code in the resulting installation. In the resulting

355

8: TOOLS

script, files that are deleted will appear in Remove File(s) script actions in Script Editor. Include registry keys deleted during capture. Normally SetupCapture doesnt record the deletion of registry keys by an installation. Mark this checkbox if you want SetupCapture to record the deletion of registry keys and to add the necessary deletion code in the resulting installation. In the resulting script, files that are deleted will appear in Edit Registry script actions in Script Editor. Capture changes in hardware registry entries. Normally SetupCapture doesnt record changes to hardware registry entries, which are typically stored in HKEY_LOCAL_MACHINE\SYSTEM. Installing the same hardware information on destination computers that have different hardware could damage the system. Mark this option only if all target machines of the installation you are capturing will have identical hardware configuration.

Setting Directories to Watch


Professional Edition only
SetupCapture is available only in the Professional Edition.

Setting directories to watch is an important part of using SetupCapture. In SetupCapture, the directories you specify are scanned for changes and the changes are incorporated into a new installation script. Set directories to watch in the Directories to Watch tab in the SetupCapture Configuration dialog. Access this tab by clicking the Settings button in the Welcome dialog of SetupCapture. See Running SetupCapture on page 352. At a minimum, specify the \Program Files directory and the \Windows or \Winnt directory. These are the most common folders in which changes occur during installation of applications. The recommended settings are already entered for you, which provide the most complete record of file changes by capturing all changes made on the system. A problem that occurs when you capture the entire drive is that you might capture changes that have nothing to do with the installation, those that occur in the normal course of operating a computer. To avoid recording irrelevant changes, you can use the two Exclusions tabs in the SetupCapture Configuration dialog to specify items to ignore during a capture. See Setting File and Folder Exclusions on page 358 and Setting Registry Exclusions on page 361.

356

SETUPCAPTURE

Note:
Because making changes to files on the root can have undesirable results, changes to the top level of the root drive are not captured even if you select the root (C:\). This limitation does not apply to directories created on the root; directories created on the root and all their contents are captured.

To specify directories to watch during SetupCapture: 1. On the SetupCapture Welcome dialog, click the Settings button. Then click the Directories to Watch tab.

2. Click the Add button. The Select Folder dialog appears. 3. Click a directory and click OK to add it to the list of watched directories. If you want to watch all the subdirectories of the directory also, mark the Include Sub-Directories checkbox. Repeat the process to add additional directories.

357

8: TOOLS

Setting File and Folder Exclusions


Professional Edition only
SetupCapture is available only in the Professional Edition.

You specify files and folders to be ignored on the File and Folder Exclusions tab in the SetupCapture Configuration dialog. Access this tab by clicking the Settings button in the Welcome dialog of SetupCapture. See Running SetupCapture on page 352. Generally, you should exclude anything that is temporary, anything that is likely to be different based on the user or hardware, or anything that is not relevant to the installation. SetupCapture automatically ignores certain system files; see Files Ignored by SetupCapture on page 364 for a complete list. You can exclude the following: A file. You specify the directory where it is located and the file name. See Setting a File to Be Ignored on page 358. A directory. You can either exclude only the files in the top level of the directory, or exclude all contents of the directory, including subdirectories. See Setting a Directory to Be Ignored on page 359. Files in a directory based on a wildcard. For instance, you could choose to exclude all temporary files on the computer by entering C:\ for the directory, entering *.tmp for the wildcard, and choosing to also exclude files in the subdirectories of C:\. See Setting a File to Be Ignored Based on a Wildcard on page 360.

Setting a File to Be Ignored


Professional Edition only
SetupCapture is available only in the Professional Edition.

You can set files to be ignored during SetupCapture. Edit the list of files to be ignored from the File and Folder Exclusions tab of the SetupCapture Configuration dialog. Access this by clicking the Settings button on the SetupCapture Welcome dialog. To set a file to be excluded: 1. From the File and Folder Exclusions tab, click the Add button. The File Exclude dialog appears.

358

SETUPCAPTURE

2. Click the Browse button next to the File/Wildcard field to select a file. The Directory field is filled in for you automatically. 3. If you want the specified file to be ignored not only in the directory you selected, but also in all its subdirectories, mark the Exclude SubDirectories checkbox. 4. Click OK. Note:
To exclude the file or wildcard for all local drives, leave the Directory field blank.

If this file changes during an installation that you are capturing, it will be ignored. To edit the exclusion, double-click it in the list.

Setting a Directory to Be Ignored


Professional Edition only
SetupCapture is available only in the Professional Edition.

You can set directories to be ignored during SetupCapture. Edit the list of directories to be ignored from the File and Folder Exclusions tab of the SetupCapture Configuration dialog. Access this by clicking the Settings button on the SetupCapture Welcome dialog. To set the contents of a directory to be excluded: 1. From the File and Folder Exclusions tab, click the Add button. The File Exclude dialog appears.

359

8: TOOLS

2. Click the Browse button next to the Directory field to specify a directory. This causes SetupCapture to ignore only those files in the top level of this directory. 3. If you want to ignore files in this directorys subdirectories also, mark the Exclude Sub-Directories checkbox. 4. Click OK. If any files inside this directory change during an installation that you are capturing, they will be ignored. To edit the exclusion, double-click it in the list.

Setting a File to Be Ignored Based on a Wildcard


Professional Edition only
SetupCapture is available only in the Professional Edition.

You can set files to be ignored based on wildcards during SetupCapture. When you set wildcards, SetupCapture ignores changes to all files that match your wildcard criteria within a particular directory. Edit the list of files to be ignored from the File and Folder Exclusions tab of the SetupCapture Configuration dialog. Access this by clicking the Settings button on the SetupCapture Welcome dialog. To set the files to be excluded based on wildcard criteria: 1. From the File and Folder Exclusions tab, click the Add button. The File Exclude dialog appears.

360

SETUPCAPTURE

2. Click the Browse button next to the Directory field to select a directory, and click OK. The wildcard you set applies to files in this directory. 3. In the File/Wildcard field, enter a wildcard. The wildcard character * represents any number of characters, while the wildcard character ? represents a single character. You can enter multiple wildcards separated by semicolons. Examples: a*.exe excludes executable files starting with the letter a. *.exe;*.dll excludes .EXEs and .DLLs. File??.txt excludes all text files that start with the word File and end with any two characters. For instance, it would match File00.txt, File01.txt, File02.txt, and so on. 4. If you want to ignore files that match this criteria in this directorys subdirectories also, mark the Exclude Sub-Directories checkbox. If any files inside this directory change during an installation that you are capturing, they will be ignored. To edit the exclusion, double-click it in the list.

Setting Registry Exclusions


Professional Edition only
SetupCapture is available only in the Professional Edition.

You specify registry entries to be ignored in the Registry Exclusions tab in the SetupCapture Configuration dialog. Access this tab by clicking the Settings button on the SetupCapture Welcome dialog. See Running SetupCapture on page 352. Generally, you should exclude anything that is temporary, anything that is likely to be different based on the user or hardware, or anything that is not relevant to the installation. You can exclude the following:

361

8: TOOLS

A particular registry value. You specify the value by selecting it from your computers registry. A registry key and all its contents. You navigate to the registry key, then click the <ignore entire subtree> item in the values pane. To set a registry key or value to be excluded: 1. From the Registry Exclusions tab, click the Add button. The Exclude Registry Key dialog appears.

2. In the left pane, navigate to and select a registry key. To exclude the entire registry key, click the <ignore entire subtree> entry in the right pane. To exclude a particular value, click the value name in the right pane. 3. Click OK. If this value or key changes during an installation that you are capturing, it will be ignored. To edit the exclusion, double-click it in the list.

Executing Installations to Be Captured


Professional Edition only
SetupCapture is available only in the Professional Edition.

On the Execute Installation dialog in SetupCapture, you specify and run one or more installations. These installations are recorded and put into a new installation. For general information on the SetupCapture tool, see SetupCapture on page 351.

362

SETUPCAPTURE

To run only one installation, specify the installation executable in the .EXE Name field and, if necessary, specify command line options in the Command Line field. (Refer to the target applications documentation for applicable command line options.) Then click Next. The installation opens. Run the installation, installing the product as you want it to be captured, then return to SetupCapture when the installation is finished. To run multiple installations, specify the installation executable in the .EXE Name field and, if necessary, specify command line options. (Refer to the target applications documentation for applicable command line options.) Then click the Execute button. The installation opens. Run the installation, installing the product as you want it to be captured, then return to SetupCapture when the installation is finished. Then specify another executable in the .EXE Name field and repeat the process. All installations you run will be added to the resulting installation. Click Next when you are finished running installations. Tip:
Do not capture .MSI installations with SetupCapture because they cannot be captured correctly with SetupCapture. You can open and edit .MSI-based installations in Wise for Windows Installer, another Wise Solutions product.

363

8: TOOLS

Files Ignored by SetupCapture


Your computer typically contains system files that should not be included in the capture of an application or operating system. Some of these files are Wise Solutions-specific; others are machine-specific files that would be dangerous to install on another computer. SetupCapture always ignores such system files; you do not have to configure them to be ignored. Following is a list of the files that are ignored by SetupCapture. NTUSER.DAT NTUSER.DAT.LOG \BOOTLOG.TXT \PAGEFILE.SYS \386SPART.PAR Directory System\Config Windows\repacklog.log Windows\SetupHook.dll Windows\ShellIconCache Windows\SYSTEM.DA0 Windows\SYSTEM.DAT Windows\TTFCACHE Windows\USER.DA0 Windows\USER.DAT Windows\WIN386.SWP Windows\wise.ini Windows\wisepssc.ini Windows\System32\Config.log Windows\System32\shdocvw.dll Windows\System32\shfolder.dll Windows\System32\shlwapi.dll workbench\workbench.dll

364

APPLICATIONWATCH

ApplicationWatch
This tool helps you start an installation for an application thats installed on a local hard drive on your system. It monitors your system as you execute that application, automatically determining which .DLL, .OCX, and .EXE files are used by the application. It provides a basis for a new installation by adding these files to a WiseScript. You can also use this tool for informational purposes; if you want to learn what .DLL, .OCX, and .EXE files are accessed by an application or installation, run this tool during execution of the application or installation. If you want to completely recreate an installation, and you have the setup program that installed the application, use SetupCapture instead of ApplicationWatch. SetupCapture produces a complete record of the files and system changes made during installation while ApplicationWatch only records what .DLL, .OCX, or .EXE files are accessed during execution of an application. Before beginning this process, close all other applications that are running; otherwise files accessed by other applications are recorded. Note:
Items you enter in the System .DLLs to Exclude listbox in Preferences are ignored during the import process. See Setting Preferences on page 43.

To create an installation that records accessed files: 1. Exit all other applications so the files they access are not added to your installation. 2. Start ApplicationWatch. Select New from the File menu and double-click the ApplicationWatch icon. Use this method if you want the resulting installation to contain only the information from the application you watch. OR Select ApplicationWatch from the Tools menu if you want the watched applications information to be added to the current installation file. The Run Application dialog appears.

365

8: TOOLS

3. In the Application Path field, specify the full pathname of the application executable that you want to run. 4. If you want to add command line options to the executable, enter them in the Command Options field. (Refer to the target applications documentation for applicable command line options.) 5. Click the Execute button, which launches the target application. 6. In the target application, use all possible features offered by the application, except printing. If you are using ApplicationWatch to watch an installation, simply run the installation through to completion. As you use various features of the application, ApplicationWatch monitors your system to see which .DLL files, .OCX files, and .EXE files are accessed. Use as many of the applications features as possible to ensure that files used by rarely-used features are recorded. The exception is printing. Do not use your application to print, because printing accesses Windows operating system and printer-specific files. 7. After using all the features of the target application, exit the application, return to ApplicationWatch, and click Finish in the Run Application dialog.

366

APPLICATIONWATCH

Based on the files that were accessed by the target application, accessed files are added to the Files page in Installation Expert. You can use this information as a starting point for developing a complete installation, or simply use it for informational purposes. As with any installation, you should compile and test the installation thoroughly to make sure it operates correctly. Warning:
Check the files listed on the Files page carefully: they might be platformspecific or non-distributable Windows system files. As a general rule, you should not replace system files on the destination computer unless you have a specific reason for doing so. For instance, you might need to upgrade a particular Windows system file to ensure that a call your application makes will work correctly. Replacing system files blindly could adversely affect the performance of the destination computers operating system. If you are not sure about a file, check with Microsoft developer documentation.

367

8: TOOLS

Import Visual Basic Project


The Import Visual Basic Project tool lets you import a Visual Basic 5 or 6 project file into Wise Installation System. You specify information about the Visual Basic project file, and the tool extracts information from it and integrates it in a new installation. The Import VB Project tool reads your VB project file and searches for all files it refers to. Always verify that the necessary files and dependency files required by your VB application are available. Verify that the files that require self-registration are marked to self-register. To check this, look at the properties of the file, and if the version section contains Ole Self Register, then the file needs to be self registered. A file might fail selfregistration because it doesnt need to be registered, because its missing a dependent file, because it might require regsvr.exe to be run manually, or because it is corrupt. Visual Basic gives you the choice of several types of project files when you create a new Visual Basic project. Wises Import Visual Basic Project tool can import only ActiveX EXE, Standard EXE, and ActiveX DLL project types. This tool is not designed to set up a remote automation or a DCOM server automatically. Note:
Items you enter in the System .DLLs to Exclude listbox in Preferences are ignored during the import process. See Setting Preferences on page 43.

To create an installation based on a Visual Basic project: 1. Start the Import Visual Basic Project tool. Select New from the File menu and double-click the Import VB Project icon. Use this method if you want the resulting installation to contain only the information from the imported installation. OR Select Import Visual Basic Project from the Tools menu if you want the imported installations information to be added to the current installation file. This is the same as selecting Import > Visual Basic Project from the File menu. The Project File dialog appears.

368

IMPORT VISUAL BASIC PROJECT

2. In the VB Project File field, specify the path to the project (.VBP) file, then click Next. The Select Visual Basic Directory dialog appears.

3. In the VB Directory field, specify the path to the Visual Basic directory, then click Next. The VB directory contains the support files that must be included as part of the installer because they are needed by the Visual Basic program. The Dependency Files Not Found dialog appears. This lists the files referenced in the VB project file that are not available on your computer, such as .OCX files. This window might not appear if all the necessary files are available.

369

8: TOOLS

4. Mark the checkbox next to any common files that should already exist on the destination computer, then click Next. This causes the Wise Installation System to refrain from alerting you of these missing files in the future. If there are any missing files, the Files Not Found dialog appears.

5. If the Files Not Found dialog appears, click each file in the list, then click Browse to locate the file. 6. Click Next when you finish specifying the location of all missing files. The Select Files dialog appears, listing files referenced in the Visual Basic project file.

370

IMPORT VISUAL BASIC PROJECT

7. To add a new file to the list, click the Add button and locate the file. To remove a file from the list, select it and click the Delete button. 8. Click Next when you are finished adding or deleting files. The Application Installation Information dialog appears so you can enter details about the installation.

9. Provide the appropriate installation information in each field: Install Title. Enter a title for the installation. Install Directory. Enter the default install directory for the application.

371

8: TOOLS

Icon Name. Enter the name you want to assign to the .EXE files icon in the program folder. Start Menu Name. Enter a name for the folder that will appear in the Programs folder in the Windows Start menu. If you leave this blank, the folder is placed in the top level of the Start menu. Help File Icon Name. Enter a name for the icon assigned to your programs .HLP file. This field is disabled if the Visual Basic project contains no help file. 10. Click Finish to complete the import. The Visual Basic project is now integrated into your Wise Installation System installation file, and your installation contains all the information it needs to install the Visual Basic project. Options have been filled out on the Files, Shortcuts, and Product Details pages in Installation Expert. As with any installation, you should compile and test the installation thoroughly to make sure it operates correctly.

372

Chapter 9

Using WiseUpdate
The WiseUpdate feature, available in the Professional Edition only, offers an easy method for updating your software on your customers computers, ensuring that customers are always working with the most up-to-date version of your software. Based on settings you specify on the WiseUpdate page in Installation Expert, WiseUpdate installs a small client application along with your software. The end user can open this client application from the Start menu, or you can place it in their Startup group so that it opens at set intervals each time the computer boots or an end user logs on. The WiseUpdate Client checks for newer versions of your application at the Web location you specified. If it finds a new installation, it downloads and runs it. When you use WiseUpdate for the first time, you are really just preparing your current software for future updates. WiseUpdate, by itself, does not deploy the current version of your software; it simply adds a Web-based update mechanism to your end users machines, in the form of a small executable installed along with your application. Once WiseUpdate is integrated into your application, it simplifies the upgrade process for you and your end users for future updates to your software. See Configuring the WiseUpdate Page on page 376 for more details. Topics in this section cover: The WiseUpdate Process. Using WiseUpdate in Your Installation. Using the WiseUpdate Client. What to keep in mind when Configuring WiseUpdate for Subsequent Versions. Using WiseUpdate with WebDeploy and SmartPatch. WiseUpdate Tips and Troubleshooting.

373

9: USING WISEUPDATE

The WiseUpdate Process


Your Computer Distribution Wizard FTPs files (Does not work through proxy) Your Internet Host (FTP/HTTP Server)

Phase 1: When you first use WiseUpdate, you...

Develop installation Configure WiseUpdate:

Contains the WiseUpdate configuration file:

- Specify location of updates on Web - Specify version of current software Use Distribution Wizard to upload to FTP: - WiseUpdate configuration file - The installer

- Stores the current version number - Stores URLs to the installer Contains the installer - The installer is copied to the host but is not used yet

Your Users Computer

Phase 2: Your customer does this...

Obtains your software through your normal distribution channels Installs your software:

- The WiseUpdate Client is copied to the main application directory - A shortcut to the WiseUpdate client is placed in the Windows Start menu

Your Computer

Distribution Wizard FTPs files (Does not work through proxy)

Your Internet Host (FTP/HTTP Server)

Phase 3: When you update your software to a new version, you...

Develop installation for new version Configure WiseUpdate:

Contains the WiseUpdate configuration file:

- Specify new version of software - Specify location of updates on Web (location info must be identical to previous versions location info) Use the Distribution wizard (FTP) to: - Create / upload WiseUpdate config file - Upload the installer and its ReadMe

- Stores the new version number of software - Stores URLs to the new installer and ReadMe Contains the new installer and its ReadMe

Your Users Computer WiseUpdate updates files (HTTP Protocol)

Your Internet Host (FTP/HTTP Server)

Phase 4: When WiseUpdate Client is opened on the users computer, it...

Presents the user with an upgrade wizard Reads WiseUpdate configuration file on host Determines that a new version exists Displays ReadMe to user Downloads new version of installer Runs the installer Updates local version number

Contains the WiseUpdate configuration file:

- Stores the new version number - Stores URLs to the new installer and ReadMe Contains the new installer and its ReadMe

374

USING WISEUPDATE IN YOUR INSTALLATION

Using WiseUpdate in Your Installation


To fully use WiseUpdate in your installation, you must use it in two or more successive versions of your software. Using it in one version of your software only enables that version to check for later versions over the Internet. But to fully realize WiseUpdates potential, you must use it in each new version of the software. Professional Edition only
WiseUpdate is available only in the Professional Edition.

The steps below illustrate the process you go through to successfully use WiseUpdate. 1. On the WiseUpdate page in Installation Expert, mark the Include WiseUpdate Client option. This causes the WiseUpdate Client, a small executable file, to be included in your installation and installed in your main application directory along with your software. 2. Configure the WiseUpdate page. See Configuring the WiseUpdate Page on page 376 for details. In the Host fields, enter connection information for an HTTP (Web server) location where updated installer files are stored. The Update Filename field contains the name of a server configuration filethe Distribution Wizard creates and uploads this file to the Internet host (see next step). The Product Version is very important because the WiseUpdate Client on your end users machines uses it to determine if the end user needs an update. 3. When your installation is tested and ready for customers, click the Compile button and run the Distribution Wizard. See Using the Distribution Wizard to Upload WiseUpdate Files on page 379 for details. If your network setup requires that you use a proxy server to FTP files, you cannot use the Distribution Wizard. See Using WiseUpdate Without the Distribution Wizard on page 380. In the Distribution Wizard, you specify FTP (FTP Server) connection information that points to the same directory specified in the Host fields on the WiseUpdate page. The Distribution Wizard uploads the compiled installer files, a ReadMe file of your choice, and the server configuration file.

375

9: USING WISEUPDATE

Note:
Make sure that you use the Distribution Wizard to upload WiseUpdate information before deploying your software to your customers. If you do not, they see an error when they attempt to check for upgrades.

4. Test the WiseUpdate process as described in Testing WiseUpdate on page 381. 5. Distribute your software using your usual method, such as CD-ROM or WebDeploy. The next time you have an update to the software, customers who have the WiseUpdate-enabled version of the software on their computer can use the WiseUpdate Client to update their software over the Internet. See Configuring WiseUpdate for Subsequent Versions on page 385.

Configuring the WiseUpdate Page


The first time you use WiseUpdate, you are giving your software the ability to check a specified location on the Internet for updates. However, you must use WiseUpdate for each successive version of your software to enable the Internet updating capability. The first step to using WiseUpdate is to fill out the WiseUpdate page in Installation Expert. Filling out the WiseUpdate page is just one part of the WiseUpdate process. Marking the Include WiseUpdate Client option causes the WiseUpdate Client to be installed in your application directory on destination computers along with your software. Most of the fields you fill out on this page specify information to be embedded inside the WiseUpdate Client. This information tells it when, how, and where to check the Internet host for new versions. When your installation is ready for distribution, complete the next step, Using the Distribution Wizard to Upload WiseUpdate Files on page 379. Professional Edition only
WiseUpdate is available only in the Professional Edition.

To configure WiseUpdate for the first time: 1. On the WiseUpdate page in Installation Expert, mark the Include WiseUpdate Client option. Marking this option gives your application the ability to be updated over the Internet the next time you release an update. It causes the WiseUpdate Client executable to be installed into your main application directory along with your software. The information on this page, which

376

USING WISEUPDATE IN YOUR INSTALLATION

is embedded in the WiseUpdate Client, is used by the client to connect to a Web server location and check a file (specified by the Host fields and the Update Filename field) for a later version.

2. Fill out the fields below. Host Address. Enter the Web server address where the WiseUpdate Client looks for updated software. The WiseUpdate Client deployed on the destination computer uses this information when it checks for updates. The WiseUpdate Client communicates using HTTP, so the location you specify must be accessible through HTTP. For example: www.widget-ware.com. You can also enter the IP number of the server. Note:
The Internet location you choose must be accessible through both the FTP and the HTTP protocolyou use FTP (in the Distribution Wizard) to transfer files to it, and your customers use HTTP (WiseUpdate Client) to read and download files from it. See WiseUpdate Tips and Troubleshooting on page 387.

Host Username. If necessary, enter the username thats required to connect to the host address. Typically, Web servers dont require usernames and passwords. This is used for basic HTTP authentication. Host Password. If necessary, enter the password thats required to connect to the host address. Only fill this in if the host username is filled in. Typically, Web servers dont require usernames and passwords.

377

9: USING WISEUPDATE

Host Directory. Enter the directory name on the host that stores the WiseUpdate configuration file. Your installer and its ReadMe are also stored in this directory. Leave this field blank to put the files on the top level of the host. Update Filename. Enter a name for the configuration file for WiseUpdate. This can be any name you choose, because it is for a configuration file that has not yet been created, but keep in mind that you must use the same file name when you use WiseUpdate in the future. For example, enter WiseUpdate.INI for the file name. The file, which is created and uploaded by the Distribution Wizard, is in .INI file format and contains information you enter on the WiseUpdate page. See Using WiseUpdate Without the Distribution Wizard on page 380 for an example of the file. It resides on the host in the host directory you specified, and is read by the WiseUpdate Client to determine if a new version exists, and if so, where to find the new version and its ReadMe. Product Version. Enter the version of the current installation. This version is stored in the configuration file specified in the Update Filename field. Check Interval (days). This field works in conjunction with the Add client to StartUp group checkbox. If you place the WiseUpdate shortcut in the StartUp group on the destination computer, the WiseUpdate Client runs silently every time the destination computer is restarted or the end user logs into Windows. If the time interval has not been reached, is simply runs silently, checks the time interval, and quits. However, after the number of days you enter in this field have elapsed, instead of running silently and quitting, it runs with its normal interface and prompts the end user to check for updates. Alternate Web Page. If, for any reason, the WiseUpdate Client cannot check for updates or download the installer, it prompts the end user to open the browser to the Web page specified in this field. You might direct the end user to a technical support page, a page that contains upgrade information, or a page that discusses possible problems. Start Menu Icon. Choose a name for a shortcut to be created in the end users Windows Start menu. The shortcut opens the WiseUpdate client, giving end users the option to check for updates whenever they want. To let your end users know the function of this shortcut, give it a descriptive name, such as Update WidgetWare. This name cannot contain special characters such as /, :, *, or ?. If you leave this field blank, make sure you mark the Add Client to Startup group checkbox so that the WiseUpdate Client runs automatically.

378

USING WISEUPDATE IN YOUR INSTALLATION

Add client to StartUp group. Mark this checkbox if you want a shortcut for the WiseUpdate Client to be added to the Windows Startup group. If you place the WiseUpdate shortcut in the StartUp group on the destination computer, the WiseUpdate Client runs silently every time the destination computer is restarted or the end user logs into Windows. If the time interval has not been reached, is simply runs silently, checks the time interval, and quits. However, after the number of days you enter in the Check Interval field have elapsed, instead of running silently and quitting, it runs with its normal interface and prompts the end user to check for updates.

Using the Distribution Wizard to Upload WiseUpdate Files


After you fill out the WiseUpdate page and are ready to distribute your installer, you must use the Distribution Wizards FTP Server option to create and upload the configuration file you specified in the Update Filename field on the WiseUpdate page. Because FTP and HTTP are different protocols controlled by different servers, the connection information you entered on the WiseUpdate page might or might not be the same as the information you enter in the Distribution Wizard. Keep in mind that this process does not work through a proxy server. If you must access your FTP server through a proxy server, see Using WiseUpdate Without the Distribution Wizard on page 380. Using the Distribution Wizard does three things: it uploads your compiled installer files to the FTP server location you specified on the WiseUpdate page, it creates a WiseUpdate configuration file and copies it to the same FTP location, and it copies a ReadMe file of your choice to the FTP location. The configuration file specifies the current version of the software, the URL to the installer files, and the URL to the ReadMe. Professional Edition only
WiseUpdate is available only in the Professional Edition.

To use the Distribution Wizard with WiseUpdate: 1. First make sure your installation is compiled by clicking the Compile button. 2. Click the Distribute button. 3. Select FTP Server as the distribution method and click Next. The Upload WiseUpdate Information dialog appears. Most of the options are disabled.

379

9: USING WISEUPDATE

4. Mark the Upload WiseUpdate Client information radio button. The following two options become enabled: ReadMe File. If youre using WiseUpdate for the first time, you can leave this blank. However, if youve used WiseUpdate before and are now uploading a software update, specify a text or rich text format (RTF) ReadMe filethe ReadMe conveys release information to customers, such as the updated softwares new features. RTF files cannot contain embedded graphics. If youre using WiseUpdate for the first time, the Product Version field should contain the same value that is in Product Version field on the WiseUpdate page. If it does not, click Cancel and check the WiseUpdate page, or, just enter the correct value here. This is the value the WiseUpdate Client uses to determine if there is a new version, so it is very important that it is correct. 5. Click Next. The Upload Installation dialog appears. 6. In the Upload Installation dialog, enter FTP information that points to the same directory you specified on the WiseUpdate page and click Next. The installer, the ReadMe you chose, and a WiseUpdate configuration file are FTPed to the server you specified. If youve just used WiseUpdate for the first time, you should thoroughly test the WiseUpdate process to make sure that no network-specific problems occur. See Testing WiseUpdate on page 381. When you are ready to deploy a new version of your software, see Configuring WiseUpdate for Subsequent Versions on page 385. Technical Note:
The Distribution Wizard connects to the directory through FTP, and the WiseUpdate page contains HTTP logon information. The logon information for FTP might be different from that of HTTP even though both point to the same directory on the same host. This is because a Web server and an FTP server running on the same computer can have different sets of users and passwords and can use different aliases to refer to the same physical directory.

Using WiseUpdate Without the Distribution Wizard


Professional Edition only
WiseUpdate is available only in the Professional Edition.

380

USING WISEUPDATE IN YOUR INSTALLATION

The Distribution Wizard can only FTP files directly; if your network setup requires that you FTP files through a proxy server, or if your HTTP server does not support FTP uploads, you cannot use the Distribution Wizard to FTP the files to the Internet host. However, you can still use WiseUpdate, but you must manually do what the Distribution Wizard does automatically. You must place three items at the Internet location you specified on the WiseUpdate page: The compiled installer file or files. The ReadMe file that goes with the installer (optional). The configuration file for WiseUpdate. The configuration file is formatted exactly as follows:

[WiseUpdate] Version=2.0 Size=1095391 Install=http://www.widget-ware.com/updates/Widget2.exe ReadMe=http://www.widget-ware.com/updates/ReadMe.rtf where Version is the version of installer that is available on the server, Size is the size of the installer in bytes, Install is the URL to the installer, and ReadMe is the URL to the installers ReadMe file. If you
dont have a ReadMe file, omit the ReadMe line from this file. Note:
When you type the URLs to the installer and ReadMe, make sure they match the case of the actual path on the server. Some HTTP servers are casesensitive and display errors if the case does not match exactly.

Testing WiseUpdate
After youve configured the WiseUpdate page in Installation Expert and used the Distribution Wizard to upload files, you are ready to test the WiseUpdate process. You should fully test the entire WiseUpdate process before deploying your software. Follow the steps below to see how the process works from the customers point of view. You must have followed the steps in Configuring the WiseUpdate Page on page 376 and Using the Distribution Wizard to Upload WiseUpdate Files on page 379 before you can test WiseUpdate. Professional Edition only
WiseUpdate is available only in the Professional Edition.

381

9: USING WISEUPDATE

To test how WiseUpdate works when your customer has the latest version: 1. Install your application on a separate, testing computer (not your development machine). 2. On the testing computer, open the WiseUpdate Client by selecting the icon from the Start menu. It is named whatever you specified in the Start Menu Icon field on the WiseUpdate page in the Installation Expert. A WiseUpdate Client opens, customized with your softwares name.

3. Click Next. The WiseUpdate Client uses the HTTP connection information that you specified on the WiseUpdate page to read the server configuration file. If you are running the same version of your software as that on the server, the WiseUpdate client tells you that you have the latest version.

4. Close the WiseUpdate Client window. After testing the process when the customer version of the software equals the server version, test it again when the server version of the software is a later version than the customer version.

382

USING WISEUPDATE IN YOUR INSTALLATION

To test how WiseUpdate works when the customer needs an update: 1. To make the software on the server appear to be a later version, go back to your development machine, and on the WiseUpdate page, change Product Version to a higher version number. For instance, if it is 2.0, change it to 3.0. 2. Compile and run the Distribution Wizard again. This updates the server configuration file to indicate a new product version. 3. Back on the testing machine, open the WiseUpdate Client again, and click Next. Because the version on the server is now later than the version on the testing machine, the WiseUpdate Client first displays the ReadMe file, then gives the customer an option to download and run the installer.

4. Choose to download and run the installer by clicking Next. If you run the WiseUpdate Client again after the new software is installed, it indicates that you have the latest version. It continues to say you have the latest version until the version on the server is updated. 5. To restore the correct version information to the server, go to your development machine, change Product Version back to the correct number, and compile and run the Distribution Wizard again. If you had problems getting WiseUpdate to work correctly, see WiseUpdate Tips and Troubleshooting on page 387. If you see the Web page you entered in the Alternate Web Page field on the WiseUpdate page, then there was a problem connecting to the host via HTTP, or the necessary files were not found on the host.

383

9: USING WISEUPDATE

Using the WiseUpdate Client


Professional Edition only
WiseUpdate is available only in the Professional Edition.

Depending on how you configured the WiseUpdate page in Installation Expert, the WiseUpdate Client can be opened by different methods on an end users machine: The end user can open it by selecting its icon from the Start menu. The icon is named whatever you entered in the Start menu Icon field on the WiseUpdate page. If you marked the Add client to Startup group checkbox on the WiseUpdate page, then WiseUpdate Client silently checks the time elapsed since it last ran each time the end users computer boots up. If the number of days elapsed is greater than the number you entered in the Check Interval (days) field on the WiseUpdate page, then the WiseUpdate Client opens automatically. On the first window of the WiseUpdate Client upgrade wizard, customers have the option to change proxy server information or the check interval by clicking the Advanced button.

384

CONFIGURING WISEUPDATE FOR SUBSEQUENT VERSIONS

Configuring WiseUpdate for Subsequent Versions


Professional Edition only
WiseUpdate is available only in the Professional Edition.

When you configure WiseUpdate for subsequent versions of the same application, it is very important that the Host fields and the Update Filename field are the same as for the previous version. In other words, once you decide on a Web location for your updates, you cannot change that location very easily. This is because the WiseUpdate Client thats already on customers machines only knows to look at the Web location you set when you originally configured it. If you configure version 1.0 of the application to look at www.widget-ware.com/updates, then the WiseUpdate client that resides alongside the application only knows to look at www.widget-ware.com/updates. So it is imperative that you configure version 2.0 of your software to put updates at the same location.

385

9: USING WISEUPDATE

Using WiseUpdate with WebDeploy and SmartPatch


Professional Edition only
WebDeploy is available only in the Professional Edition.

You can easily use WiseUpdate in conjunction with WebDeploy or SmartPatch. If you want to use it in conjunction with WebDeploy, just make sure that the four host fields on the WebDeploy page (Host Address, Host Username, Host Password, and Host Directory) match the corresponding fields on the WiseUpdate page. Then, when you use the Distribution Wizard to move your files to an FTP server, they are created in WebDeploy format on the Internet host location you specify. Because WiseUpdate is meant to work for updates, you can easily use SmartPatch to create the updated version that end users download using WiseUpdate. That way end users only have to download the smaller patch file instead of the entire installer. Also see: WebDeploy on page 117 SmartPatch on page 108

386

WISEUPDATE TIPS AND TROUBLESHOOTING

WiseUpdate Tips and Troubleshooting


Professional Edition only
WiseUpdate is available only in the Professional Edition.

The WiseUpdate Client itself uses HTTP to connect to the server specified on the WiseUpdate page. The Distribution Wizards FTP Server option uses the FTP protocol to upload the installer .EXE, a ReadMe (optional), and a WiseUpdate configuration file. Both operations access the same location on the same server. Therefore both protocols must have access to the directory, and the host must be able to process both HTTP and FTP requests. Also keep in mind that the Host Directory, the Host Username, and the Host Password might be different for using the FTP protocol than for using the HTTP protocol. This is because the Web server and the FTP server might have different alias and user information, but point to the same directory. When you build the installer for your updated application, keep in mind that the end user might have your application currently open. Because this might interfere with installation, you can add scripting to your installer to force the end user to quit your application before they run the installer. See Killing an Application Using Windows .DLL Calls on page 410. You can configure your own application to run the WiseUpdate Client, either silently or actively. You can do this by providing a menu command in your product, or by automatically opening it when your application is opened using the Check Interval. To use the Check Interval, you should run the WiseUpdate Client silently, which you can do by adding the command line option /c to the calling command. Then the WiseUpdate Client only appears to the end user when the required number of days have elapsed since the last check. You can customize the WiseUpdate Client for your own needs. For instance, you can change the look of WiseUpdate Client dialogs, change graphics, or change icons. However, keep in mind that Wise Solutions cannot provide technical support for a WiseUpdate Client that you have modified in any way. The WiseUpdate Client executable is compiled from a WiseScript. In the WiseUPDT directory within the Wise Installation System application directory, youll find both the WiseUpdate Client .EXE (WiseUpdt.exe) and the installation script that compiles it (WiseUpdt.wse). Make a backup of the directory before you modify anything. Then, simply open

387

9: USING WISEUPDATE

WiseUpdt.wse in the Wise Installation System, make the desired changes, and recompile. The version of the currently-installed software is compared to the version in the configuration file on the host using an ASCII string comparison, so you can use letters in your version strings. For instance, in a string comparison, 1.0b is greater than 1.0a. When the WiseUpdate Client is installed on the destination computer, a registry entry is created to store the product version. This registry entry is compared to the version stored on the server in the WiseUpdate configuration file. If your customers have trouble viewing the ReadMe file in the WiseUpdate Client, make sure the ReadMe does not have embedded graphics. If see an error dialog titled Associated Application Not Found when you launch the WiseUpdate client, then you might not have entered a title in the Installation Title field on the Product Details page in Installation Expert. Make sure you enter a installation title name when using WiseUpdate.

388

Chapter 10

Advanced Scripting
The Samples directory is full of excellent resources for furthering your knowledge of the Wise Installation System and learning advanced techniques. It contains WiseScripts (.WSE files) that combine script actions to perform complex actions and provide interactivity to the end user. Most scripts are ready to test or compile when you open them, but some might need to have some pathnames changed to match the directory structure on your hard drive. It is important to realize that sample scripts do not provide step-by-step instructions on how to solve a particular problem. Instead they give you a good example that you can study and use as a basis for your own script. Topics in this section cover: Automating the Build Process. Using Script Samples. Learning About Script Samples. Troubleshooting Script Samples. Solving Problems by Using Sample Scripts. Manipulating Strings and Performing Calculations. Using Custom Dialog Examples. Performing Web and FTP Transactions. Using Sample Scripts that Call .DLLs. Checking System Configuration With Sample Scripts.

389

10: ADVANCED SCRIPTING

Automating the Build Process


You can use command line options in conjunction with other processes to create an automated build process. Command line options let you compile as well as set properties. To create an automated build process: 1. Enter the following command line statement into a batch file or any other program that has the ability to run command line statements:

C:\Program Files\Wise Installation System\Wise32.exe /c /s C:\Devel\MyApp.wse where C:\Program Files\Wise Installation System\Wise32.exe is the path to the Wise Installation System executable, and C:\Devel\MyApp.wse is the pathname for the
script to be compiled. 2. Use Scheduled Tasks (or another program that can schedule and run a process) to run the batch file at whatever time is convenient. Scheduled Tasks is in either the Control Panel or My Computer, and is not available on some older operating systems. Note:
To test the options without the scheduling program, open a command line window and type a command line statement. Click the Windows Start menu, select Run, type command (Windows 9x) or cmd (Windows NT), and click OK.

390

USING SCRIPT SAMPLES

Using Script Samples


The Samples directory within the Wise Installation System application directory contains a variety of scripts. Some are designed to be run as stand-alone scripts while others contain only snippets of code that you can copy and paste into your own script to achieve the desired effects. To use a script sample: 1. Select Open from the File menu, then navigate to a script within the Samples directory and open it. 2. If it opens in Installation Expert, click the Script Editor button to view the script. 3. Read the remark script lines (Rem) in the header and throughout the script to determine what the script does and what you need to know to use the script. See Learning About Script Samples. 4. To see what the script does, click the Test button. If you see an error message that warns of a missing file, or a file that could not be opened, check the following: Select Source Directories from the Edit menu, and edit the source directories to refer to your own Wise Installation System application directory as described in Changing Source Directories on page 29. You can fix each invalid path one at a time, but using Source Directories fixes most invalid paths simultaneously, saving you time. Go to the Compiler Variables page in Installation Expert, and fix any paths so that they refer to the directory structure on your machine. 5. If the script is a stand-alone script, it contains everything you need for an installation. Edit the script as necessary to refer to your own customized graphics, settings, installed files, and so on. 6. If the script is a Cut/Paste script, copy the script lines that perform specialized functions into your own installation script and edit the script line as necessary. For instance, on most of the sample scripts that contain custom dialogs, you can copy the Custom Dialog line and any other applicable lines to your own script. Look at the remark (Rem) script lines within the script to determine what functionality you want to copy and paste into your own script.

391

10: ADVANCED SCRIPTING

Learning About Script Samples


You can learn most of what you need to know about a script by reading the remark (Rem) script lines in a script. To open a script, select Open from the File menu, and open a script (.WSE file) from the Samples directory. Once you open a script, go to Script Editor and look at the REM statements. The header remarks follow this format: Rem Script Name. Contains the file name of the current script. Rem Author. Contains internal WiseScript information for tracking scripts. Rem Creation Date. Contains the creation date of the script. Rem Last Modified. Contains the date the script was last modified by Wise Solutions personnel. Rem VALID USE. Tells you if this script is a stand-alone script, a copy and paste script, or a demonstration script. If it says stand-alone script then this script has all the elements necessary for an installation. All you need to do is customize it for your purposes. That might include substituting your own bitmaps, adding billboards, and of course, installing your own files. When a sample script needs to contain an Install File(s) script line for demonstration purposes, it usually references a file inside the Wise Installation System application directory to ensure that the file exists. If it says CUT/PASTE then this script has only a few lines of code that perform a specialized function. If you want to add the functionality to your installation script, you should copy the designated lines from this script and paste them into your own script. After you paste them into your script, you might need to edit the lines as necessary to fix hard-coded pathnames, use different graphics, and so on. If it says "Demonstration" then this script is used to demonstrate a specific concept. The script may or may not compile correctly as-is, but should demonstrate the concept being described easily with ample in-line documentation. Scripts of this nature are intended primarily as a learning tool rather than as a cut and paste solution or as a stand-alone script. Rem Purpose. Tells you what this script does. Rem ACTIONS DEMONSTATED. Some scripts contain an ACTIONS DEMONSTRATED remark, which lists the script actions that are demonstrated within this script. Other Rem script lines. Look at other remarks that are placed at various locations within the body of the script. Often these script lines describe the next section of code or tell you what you need to know to get the lines to work in your own script.

392

TROUBLESHOOTING SCRIPT SAMPLES

Troubleshooting Script Samples


When you open or run a script sample, you might encounter error messages about converting the script or about missing files. If you get messages about converting the script, you should choose not to convert the script. If you see messages about missing files, they are probably caused because the directory structure on your computer is different from the computer on which the script was developed.

Messages About Converting the Script


When you create a new project, a default script automatically populates the Installation Script area of Script Editor. If you delete this script, then go to Installation Expert and back to Script Editor, the default script reappears. This is because the default script is built dynamically from default settings in Installation Expert. Most sample scripts are independent of the settings in Installation Expert. When you open a sample script and try to go to Installation Expert, you might see a message warning you that the script is not compatible with Installation Expert. This is because Script Editor does not contain the default script. If you see an error message that mentions incompatibility with Installation Expert, click No to preserve the custom script. Some error messages you might see are: This installation has custom script code, which is incompatible with Installation Expert. Click Yes to delete your custom code, or No to preserve it. If you click No, you have access to a limited set of pages in Installation Expert. You are attempting to open an installation in Installation Expert, which is not compatible with some custom scripts, so the script will be opened in Script Editor instead. To safely view Installation Expert without converting your script, select Installation Properties from the Edit menu while in Script Editor, or press CTRL-Z. This takes you to Installation Expert, but only shows you pages that do not affect the installation script.

Messages About Missing Files


Sometimes when you try to run or test a sample script, you see messages about files that cannot be opened. The most likely cause of these messages are invalid pathnames. The compiler displays error messages such as: Cannot open file. Please check spelling and try again.

393

10: ADVANCED SCRIPTING

The file C:\Wise\WISE.HLP could not be opened. Please check the spelling of the filename and that the file is accessible. In general, sample scripts only reference files that are located within the Wise Installation System application directory. But sometimes the pathnames for these files are different on your computer than on the computer where the script was developed. These kinds of problems are easily fixed by using the Source Directories menu command as described in Changing Source Directories on page 29, or by redefining compiler variable paths on the Compiler Variables page in Installation Expert.

394

SOLVING PROBLEMS BY USING SAMPLE SCRIPTS

Solving Problems by Using Sample Scripts


This section lists miscellaneous tasks you might need to solve while you are developing installation scripts. This section lists tasks that you can solve by studying or using a sample script. All scripts listed are located in the Samples directory within the Wise Installation System application directory.

Creating an Installer That Can Be Customized During Compile


You can use compiler variables to customize an installer at compile time. For instance, use compiler variables to create a debug version of your installer that displays messages with variable values. To do this, first you create a compiler variable, named _DEBUG_ for example, on the Compiler Variables page in Installation Expert. At the bottom of the Compiler Variables page, mark the Compiling from Within Wise checkbox. Then in your script, use Display Message script lines to display the value of variables. Enclose each Display Message script line between a Compiler Variable If and Compiler Variable End, and set the Compiler Variable If script line to check the value of _DEBUG_. See Building a Debug Version on page 164. For an example of compiler variables at work in a script, open the script Compvar.wse, located in the Samples directory. To see the compiler variable settings for _GRAPHIC_ and _OPTIONS_, go to the Compiler Variables page in Installation Expert. When you first run the script, you might need to fix the pathnames to refer to files on your computer. When the script runs, you are prompted to define the compiler variables in dialogs that appear. The first dialog asks you for the path to a bitmap file to be used as part of the installer, and the second asks you to decide if you want Sample Files and .DLL Source Code to be part of the installer. A Display Billboard script line uses the compiler variable _GRAPHIC_ instead of specifying a pathname to a file, and Compiler Variable If and End statements specify if Sample Files and .DLL Source Code should be installed.

Finding a File on the Destination Computer


The sample script Search.wse, located in the Samples directory within the Wise Installation System application directory, shows an example of how to search for a file with a given name on all local drives of the destination computer. Open the script and read the remark (Rem) script lines.

395

10: ADVANCED SCRIPTING

Finding a File in the PATH Environment Variable


The sample script Search.wse, located in the Samples directory within the Wise Installation System application directory, shows an example of how to search for a file with a given name in the PATH environment variable of the destination computer. Open the script and read the remark (Rem) script lines.

Finding an Application That Is Associated With an Extension


The sample script Search.wse, located in the Samples directory within the Wise Installation System application directory, shows an example of how to search for an application on the destination computer thats associated with a particular file extension. Open the script and read the remark (Rem) script lines.

Running a Program Once After Computer Restart


The sample script Runonce.wse, located in the Samples directory within the Wise Installation System application directory, shows you an example of how to cause an application to run one time after the destination computer has been restarted. For instance, suppose your installation script moves some in-use files to the Temp directory, replaces them with updated files, then forces a restart of the computer. You want to get rid of the files you moved to the Temp directory after the computer is restarted. You could develop a script that removes those files, but because the files are in use, the script cannot run until after restart. You could use the script lines in Runonce.wse to run the remove script after the computer restarts.

Forcing the Destination Computer to Restart


The sample script restart.wse, located in the Samples directory within the WiseScript Editor application directory, shows an example of how to force the destination computer to restart after installation is complete. It works by setting the variable RESTART to S.

Manipulating a Text File


The sample script TEXTFILE.WSE, located in the Samples directory within the WiseScript Editor application directory, shows you an example of a script that changes a text file by inserting lines, converting case, commenting out lines, and deleting lines.

396

SOLVING PROBLEMS BY USING SAMPLE SCRIPTS

Placing Shortcuts in Subfolders


The sample Shortcuts in Subfolders.wse, located in the Samples directory within the Wise Installation System application directory, shows how to install shortcuts inside hierarchical menus within the Programs folder in the Windows Start menu. If you use the Shortcuts page in Installation Expert to add shortcuts, you can only place them one folder deep, such as: Programs\WidgetWare\Readme This script shows how to make additional subfolders inside the main shortcut folder, so you can have shortcuts located in subfolders, such as: Programs\WidgetWare\Documentation\ReadMe

Creating a Connection Between a Database Client and Oracle Server


The sample script Add Tnsnames entry.wse, located in the Samples directory within the Wise Installation System application directory, shows an example of adding an entry to the TNSNAMES.ora file, which enables a connection from a database client to an Oracle server.

397

10: ADVANCED SCRIPTING

Manipulating Strings and Performing Calculations


You can use expression operators to parse strings and to perform calculations, such as addition. This section lists tasks that you can solve by using expressions. Sample scripts demonstrate the use of many of the expression operators. All scripts listed are located in the Samples directory within the Wise Installation System application directory.

Performing Calculations on Integer Values


The sample scripts Adding.wse and Division.wse, located in the Samples directory within the Wise Installation System application directory, show you examples of scripts that perform calculations on integer values. The scripts first prompt the end user to enter two numerical values, then they perform the calculation and display the result.

Parsing Strings Using Expression Operators


The Samples directory within the Wise Installation System application directory contains several sample scripts that demonstrate how to manipulate text strings by using expression operators. See Expression Operators on page 424 for a complete list and usage. Before.wse shows how to return the characters in a string that occur before another string. After$.wse shows how to returns the characters in a string that occur after another string. Concat$.wse shows how to concatenate one string with another string. Instr.wse shows how to determine if one string is present inside another string. Lcase$.wse shows how to change all characters in a string to lowercase. Left$.wse shows how to get the left portion of a string. Rtrim$.wse shows how to remove all spaces at the end of a string. Ltrim$.wse shows how to remove all spaces at the beginning of a string. Len.wse shows how to determine the length of a string.

398

MANIPULATING STRINGS AND PERFORMING CALCULATIONS

Putting User Input into Variables


The sample scripts Adding.wse, Instr.wse, Left$.wse, Division.wse, Concat$.wse, and Len.wse, located in the Samples directory within the Wise Installation System application directory, all show examples of scripts that prompt the end user for information and put the input into variables. Most then do something with the input, such as performing calculations on it or manipulating it in some way, then displaying the result.

Error Checking User Input


The sample script Division.wse, located in the Samples directory within the Wise Installation System application directory, shows an example of checking end user input for a particular condition. This script checks the input entered by the end user to see if it is zero; if it is zero, the prompt continues to appear until the end user enters a non-zero integer; if it is not zero, it performs a division calculation. The error checking takes advantage of a While Loop that continually checks the information entered by the end user.

Converting a String to Upper- or Lowercase


The sample script Lcase$.wse, located in the Samples directory within the Wise Installation System application directory, shows how to convert a string to all lowercase. You can easily change it to convert to all uppercase by using the expression operator Ucase$() instead of Lcase$().

399

10: ADVANCED SCRIPTING

Using Custom Dialog Examples


Some sample scripts come with complex dialogs built into them. Some of these dialogs show you advanced techniques like dialogs, using dialog sets, and handling mouse events. This section lists tasks that you can solve by studying or using one of these sample scripts. All scripts listed are located in the Samples directory within the Wise Installation System application directory.

Prompting the User to Insert a Floppy Disk


The sample script Newdisk.wse, located in the Samples directory within the Wise Installation System application directory, contains script lines that display a dialog prompting the end user to insert another floppy disk. You can edit this script so it prompts the end user for other removable media, such as a zip disk.

Configuring a Dialog to Handle Mouse Events


The sample scripts Event Handler.wse, License Agreement.wse, AutoPlay.wse, located in the Samples directory within the Wise Installation System application directory, all show examples of dialogs that exhibit different behavior based on end user input on the destination computer. Event Handler.wse and License Agreement.wse show examples of installation scripts that handle mouse events with scripted dialogs. Using scripting to handle mouse events gives you much more control over what happens in dialogs, but you can also handle mouse events without scripting. The script AutoPlay.wse shows one way of handling mouse events without scripting.

Handling Mouse Events Without Scripting


To see how AutoPlay.wse handles mouse events: 1. Open AutoPlay.wse in Script Editor. 2. In the installation script, double-click the Custom Dialog script line. The dialog opens in Custom Dialog Editor. 3. Double-click the text Install 8.0 Demo. The Push Button Properties dialog opens. Notice that in the Action section of the dialog, the Execute Program radio button is selected. Also in the Hot Text section of the dialog, the Display Button as Hot Text checkbox is marked. The text Install 8.0 Demo is actually a push button, but is set to display as clickable text. When the end user clicks the text, the program specified in the Execute

400

USING CUSTOM DIALOG EXAMPLES

Program field is executed. Each of the hot text options in the dialog have similar settings to initiate actions based on mouse clicks.

Handling Mouse Events With Scripting


To see how License Agreement.wse handles mouse events with a dialog script: 1. Open License Agreement.wse in Script Editor. 2. In the installation script, double-click the Custom Dialog script line. The dialog opens in Custom Dialog Editor. 3. Double-click the radio button control. 4. The Radio Button Control Settings dialog opens. Note that the variable is AGREEMENT. This means that if the end user clicks the first radio button (I Agree), the letter A is put into the variable AGREEMENT. If the end user clicks the second radio button (I Disagree), the letter B is put into the variable AGREEMENT. 5. Click Cancel in the Radio Button Control Settings dialog. 6. Now double-click the Next button. The Push Button Properties dialog appears. 7. Note the contents of the Control Name fieldthe control name for the Next button is AGREEand click Cancel. 8. Select Dialog Script Editor from the View menu. You see the script:

Disable Control AGREE If AGREEMENT Equals A then Enable Control AGREE End
In the script above, first the control AGREE (the Next button) is set to disabled. As soon as the end user clicks the first radio button (I Agree) the letter A is automatically put into the variable AGREEMENT. Once AGREEMENT equals A, the AGREE control (the Next button) becomes enabled. Once you understand the simple way that License Agreement.wse works, take a look at the dialog scripts for Event Handler.wse, also located in the Samples directory. The Custom Dialog script line in Event Handler.wse contains not one dialog, but a dialog set of three dialogs. To view each dialogs script, first double-click the Custom Dialog script line, then select each dialog name from the Window menu in Custom Dialog Editor.

401

10: ADVANCED SCRIPTING

Enabling, Disabling, and Marking Controls in a Dialog


The sample scripts Event Handler.wse, License Agreement.wse, and Subcomp.wse, located in the Samples directory within the Wise Installation System application directory, all show different examples of manipulating controls in a dialog. Event Handler.wse and License Agreement.wse both enable or disable controls by using dialog scripts. See Configuring a Dialog to Handle Mouse Events on page 400. Subcomp.wse shows how to present dialogs to the end user that have some checkboxes marked by default.

Viewing the Scripts


When you look at any of these three scripts, first run the scripts to see what they do, then look at the script to determine how they are designed. In Script Editor, read any remark script lines (Rem) for hints on what is happening in the script. Then double-click the Custom Dialog script line, which opens the dialog in Custom Dialog Editor. Do the following to see relevant settings: View the settings for checkboxes or radio buttons by right-clicking them and selecting Control Properties (while in Custom Dialog Editor.) View the scripts for dialogs by selecting Dialog Script Editor from the View menu (while in Custom Dialog Editor.) View the other dialogs of a dialog set by selecting the dialog names from the Window menu (while in Custom Dialog Editor.) See Handling Mouse Events With Scripting on page 401 to see how License Agreement.wse works.

Initializing Checkbox States


Subcomp.wse sets checkboxes to be initially marked or unmarked by initializing the variables COMPONENTS, SAMPLE_SUB, and DLL_SUB, which are the variables that are associated with specific controls in dialogs. For example, setting the variable DLL_SUB to AC causes the first and the third option in the checkbox on the DLL Source Files dialog to be marked by default. To see how the script Subcomp.wse marks checkboxes by default: 1. Open Subcomp.wse from the Samples directory in Script Editor. 2. In the installation script, find the script line:

Set Variable DLL_SUB to AC


The variable DLL_SUB determines the state of a control in a dialog named DLL Source Files.

402

USING CUSTOM DIALOG EXAMPLES

3. In the installation script, double-click the script line:

Custom Dialog Select Components


The dialog set opens in Custom Dialog Editor, but the DLL Source Files dialog is not displayed. 4. Select DLL Source Files from the Window menu. The DLL Source Files dialog appears. 5. Double-click the checkbox control. The Checkbox Control Settings dialog appears. Notice that the variable associated with this checkbox control is DLL_SUB, which was initialized as AC earlier in the script. A value of A in DLL_SUB means the first checkbox is marked, a value of B in DLL_SUB means the second checkbox is marked, and a value of C in DLL_SUB means the third checkbox is marked. Thus, when this dialog is first displayed to the end user, the first and third checkboxes are marked by default because A and C are in the variable DLL_SUB. If the script did not initialize DLL_SUB, then none of the three checkboxes would be marked. Conversely, if the end user, when presented with the dialog, marks the second checkbox and clears the first and third checkboxes, the value of DLL_SUB changes to B. 6. Click Cancel in the Checkbox Control Settings dialog when you are done.

Displaying a License Agreement Dialog


The sample script License Agreement.wse, located in the Samples directory within the Wise Installation System application directory, shows an example of a script that displays a license agreement dialog during installation. To see how it works, see Handling Mouse Events With Scripting on page 401.

Making an Installer Open Automatically (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 CD drive for a text file called AutoRun.inf. You can create this file in any text editor.

403

10: ADVANCED SCRIPTING

The AutoRun.inf file contains an [autorun] section, which identifies the lines that follow as AutoPlay commands. An [autorun] section is required in every Autorun.inf file. Following the [autorun] section, the open statement 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, you can enter just the file names. If the files are located inside a directory on the CD, enter a relative pathname, such as startup\installer.exe.

Example of an AutoRun.inf File


[autorun] open=MyProgram.exe icon=filename.ico
Where MyProgram.exe can be whatever Windows program you want to run. One of the sample scripts, AutoPlay.wse, shows you a typical dialog that you might display using the AutoPlay feature. See Handling Mouse Events Without Scripting on page 400 for a step-by-step demonstration of how AutoPlay.wse works. Go to msdn.microsoft.com and search for AutoRun or AutoPlay for more information. AutoPlay.wse opens a dialog containing choices for the end user including the option to install, to download an item from the Internet, to view a Web page, or to browse the installation CD. If you double-click the Custom Dialog line, you see the dialog in Custom Dialog Editor. Right-click each text option and select Control Properties to see the action that is performed if the end user clicks the option.

Showing or Skipping Dialogs Based on End User Input


The sample script Skipdialog.wse, located in the Samples directory within the Wise Installation System application directory, shows an example of a script that shows or skips dialogs based on end user input. First, the script presents the end user with a dialog containing three options. Then the wizard loop either skips or displays subsequent dialogs based on the options the end user chose. Whenever an end user selects an option in a dialog, it automatically puts letters into the variable COMPONENTS. If the first option in a set of radio buttons or checkboxes is selected, the letter A is put into COMPONENTS, if the second option is selected, the letter B is put into COMPONENTS, and so on. The contents of the COMPONENTS variable is used in the Wizard Loop statement to either skip or display dialogs.

404

USING CUSTOM DIALOG EXAMPLES

To see how this was accomplished, open Skipdialog.wse in Script Editor, double-click the Wizard Loop script line, click each of the dialogs listed, and look at the Skip Dialog section of the Wizard Loop Settings dialog. 1. Open Skipdialog.wse from the Samples directory in Script Editor. 2. In the installation script, double-click the script line:

Custom Dialog WidgetWare


The dialog opens in Custom Dialog Editor. 3. Double-click the radio buttons. The Radio Button Control Settings dialog appears. Note that the variable in the Variable drop-down list is COMPONENTS. This means that 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 Exit Without Saving from the File menu. 5. In the installation script, double-click the script line:

Wizard Loop
The Wizard Loop Settings dialog opens. 6. In the Dialog Boxes list, click Install2 to see its Skip Dialog settings. Notice that for the dialog Install2, the dialog is skipped if COMPONENTS is not set to B, that is, if the end user didnt mark the second radio button. Likewise, the dialog Install1 is skipped if COMPONENTS is not set to A.

Building a Components-Based Installation


The sample script Subcomp.wse, located in the Samples directory within the Wise Installation System application directory, shows an example of a script that performs a component-based installation. On the destination computer, first users are presented with a dialog where they can select features to be installed. They can also view and select the subcomponents that make up each feature. The results from checkboxes are put into variables, and If blocks are executed according to what checkboxes the end user marks. For information on how the Subcomp.wse script handles data from dialogs, see Enabling, Disabling, and Marking Controls in a Dialog on page 402.

405

10: ADVANCED SCRIPTING

Showing the Details of Optional Features to Users


The sample script Subcomp.wse, located in the Samples directory within the Wise Installation System application directory, shows an example of a script in which end users on the destination computer can view the subcomponents that make up components during installation. To see a particular components subcomponents, they click that components Options button to see what items make up the component. They can then select which subcomponents they want to install. For information on how the Subcomp.wse script handles data from dialogs, see Enabling, Disabling, and Marking Controls in a Dialog on page 402.

Letting the User Choose Subcomponents During Installation


The sample script Subcomp.wse, located in the Samples directory within the Wise Installation System application directory, shows an example of a script that gives the end user the ability to not only choose the components to install, but also to choose the subcomponents that make up each component. End users are presented with a dialog where they can mark the checkboxes for two components. Each component has an Options button that, when clicked, displays a dialog with the subcomponents that make up the component. Whenever end users select or mark controls in a dialog, such as radio buttons, checkboxes, or items in a list box, results in the form of alphabetical letters are added to the variable defined in the controls properties dialog. Some Custom Dialog script lines contain not one, but several dialogs, called a dialog set. To see how Subcomp.wse displays component and subcomponents: 1. Open the script Subcomp.wse, then display Script Editor. 2. Double-click the script line:

Custom Dialog Select Components


The Select Components dialog appears. 3. Double-click the checkboxes. The Checkbox Control Settings dialog appears. Note that the variable in the Variable drop-down list is COMPONENTS. This means than when the end user marks one or both checkboxes, the following is put into the variable COMPONENTS: A capital A if the end user marks the first checkbox A capital B if the end user marks the second checkbox.

406

USING CUSTOM DIALOG EXAMPLES

If there were a third checkbox, a C would be placed in into COMPONENTS, and so on. 4. Click Cancel in the Checkbox Control Settings dialog. 5. Select Sample Files Components from the Window menu. The Sample Files Components dialog appears. This is the dialog that appears to end users if they click the Options button next to the Sample Files checkbox in the previous dialog. 6. Double-click the checkboxes. The Checkbox Control Settings dialog appears. Note that the variable in the Variable drop-down list is SAMPLE_SUB. This means than when end users check one or both checkboxes, the 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 Exit Without Saving from the File menu, which brings you back to the Custom Dialog 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 above checks if A is in COMPONENTS, which would mean that the end user marked the Sample Files checkbox in the Select Components dialog. The second checks if A is in SAMPLE_SUB, which would mean that the end user marked the DLL Samples checkbox in the Sample Files Components dialog. If the end user did mark both, then both variables contain the letter A, and the Install File(s) script lines after the second If statement are executed.

Verifying User Input in a Field


The sample Verify User Input.wse, located in the Samples directory within the Wise Installation System application directory, shows how to verify characters that are entered into a field on a dialog. In this example, the dialog asks for an IP address. The script checks that only integers between 0 and 255 are entered.

407

10: ADVANCED SCRIPTING

Performing Web and FTP Transactions


You can build scripts that access the Internet to check for updates, download files, launch Web pages, and more. This section lists Internetrelated tasks that you can solve by studying or using one of these sample scripts. All scripts listed are located in the Samples directory within the Wise Installation System application directory.

Checking an FTP Site for Newer Files


The sample script Wiseup.wse, located in the Samples directory within the Wise Installation System application directory, checks an FTP site for newer files before performing the installation. If it finds newer files, it downloads and runs them to provide the end user with the latest version. If it does not, it displays a message that the current installation files comprise the latest version. Although this script shows how to create this functionality yourself, you can easily use the new WiseUpdate page in Installation Expert to accomplish the same functionality with no scripting involved.

Downloading a File from a Web Site During Installation


The sample scripts Wiseup.wse and Ftpcopy.wse, located in the Samples directory within the Wise Installation System application directory, both show examples of scripts that use Copy Local File(s) script lines to copy files from an FTP site during installation. Wiseup.wse shows how to check an FTP site for newer installation files, then download and run them, and Ftpcopy.wse shows how to download and run a ReadMe file from an FTP site.

Launching a Web Page from an Installer


The sample script Url.wse, located in the Samples directory within the Wise Installation System application directory, demonstrates launching a Web page from an installer. It first determines the default browser, then opens the URL specified in the Execute Program statement.

408

PERFORMING WEB AND FTP TRANSACTIONS

Using WebDeploy Through a Proxy Server


The sample script Proxy.wse, located in the Samples directory within the Wise Installation System application directory, shows the script lines necessary to get WebDeploy to work through a proxy server on the destination computer . A proxy server is a firewall that, for security purposes, limits certain kinds of communications between a client residing inside a company and the Internet. Users on an intranet with a firewall sometimes have to designate a proxy server to enable certain kinds of communications, such as FTP. If you are using WebDeploy to distribute your software, customers who install your application need to FTP files from an FTP site that you specify. If those customers might have to FTP through a proxy server, you can use the example of the Proxy.wse sample script to add functionality to your own script that enables end users to enter proxy server information during installation.

409

10: ADVANCED SCRIPTING

Using Sample Scripts that Call .DLLs


The Call DLL script action lets you call a .DLL during installation to perform specialized functionality. You can call a .DLL that has been written specifically for the WiseScript, a .DLL that youve written, or a Windows .DLL. You can pass a .DLL a parameter list, and can obtain return values from the .DLL for use in the script. See Call DLL Function on page 186. This section lists two sample scripts that use the Call .DLL action, one that calls a WiseScript-specific .DLL, and another that calls a Windows .DLL. If you have having trouble getting your own Call .DLL script line to work, study the examples in this section. All scripts listed are located in the Samples directory within the Wise Installation System application directory.

Branching a Script Based on the .DLL Return Value


The sample script Prompt.wse, located in the Samples directory within the Wise Installation System application directory, demonstrates how you can use Call .DLL script lines to branch based on the value returned to the installer from the .DLL. You can set a Call .DLL script line to function like an If statement, where it executes a block of code based on the value returned from the .DLL.

Killing an Application Using Windows .DLL Calls


The sample script Application Kill.wse, located in the Samples directory within the Wise Installation System application directory, demonstrates forcing an application to quit from within the installer. The Application Kill.wse shows how to kill the application Microsoft Word by using information obtained from executing Windows system .DLLs.

Using .DLL Calls to Determine System Configuration


The sample script Colors.wse, located in the Samples directory within the Wise Installation System application directory, shows you an example of a script that calls system .DLLs to obtain system configuration information. In this script, it obtains color palette information about the destination computer.

410

CHECKING SYSTEM CONFIGURATION WITH SAMPLE SCRIPTS

Checking System Configuration With Sample Scripts


You can use the Call DLL script action to check the system environment on the destination computer. Using the Call DLL script action to call Windows system .DLLs gives you more power and flexibility than using the built-in system checks. This section lists system configuration settings that you can determine by studying or using sample scripts. All scripts listed are located in the Samples directory within the Wise Installation System application directory.

Checking for 256 Color Display


The sample script Checkvga.wse, located in the Samples directory within the Wise Installation System application directory, shows an example of a script that checks the color depth of the destination computer.

Determining the Destination Computers Color Palette


The sample script Colors.wse, located in the Samples directory within the Wise Installation System application directory, demonstrates how to check the color palette on the destination computer. It calls Windows system .DLLs and puts the resulting return value in a WiseScript variable that you can use in conditional statements. Note:
The Display control panel Settings tab indicates what color palette is set on the computer.

Checking Disk Space by Calling a Windows .DLL


The sample script CheckDiskSpace.wse, located in the Samples directory within the Wise Installation System application directory, shows an alternative way to check disk space on the destination computer. While you can use a Check Disk Space script action to see if adequate disk space exists, the Check Disk Space script action does not put the information in a variable that you can display to the end user. If you use the example script CheckDiskSpace.wse to get the free disk space, you can put the information you get into a variable, as well as getting much more detailed information about the free space.

411

10: ADVANCED SCRIPTING

Detecting the Presence of Internet Explorer


The sample script DetectIE4or5.wse, located in the Samples directory within the WiseScript Editor application directory, detects the registry key values that are normally present when Microsoft Internet Explorer 4.0 is installed.

Detecting QuickTime Version


The sample Detect QuickTime Version.wse, located in the Samples directory within the Wise Installation System application directory, shows how to check the version of QuickTime installed on a machine. In this sample, it first searches for a QuickTime file, then gets the version of the file. It puts the version number in a variable.

412

Chapter 11

Troubleshooting Installations
You can choose from several options when you debug your installations. You can use the installation log to determine what is really happening during your installation, including what fails. You can use the built-in debugger, as described in Debugging Scripts on page 162. Or, you can use compiler variables to build a debug version of your installer .EXE that displays values of variables and other useful information while it is executing. The compiler itself helps ensure stability because it checks that all required information is present before it builds an installer .EXE. Topics in this section cover: Using the Installation Log to debug your script. How to handle File Replacement Problems in System32.

413

11: TROUBLESHOOTING INSTALLATIONS

Using the Installation Log


The installation log is a text file that can help you debug your script. You can enable or disable it, and choose its location on the Installation Log page in Installation Expert. As your script runs on the destination computer, each action it performs is logged in Install.log. Install.log records everything, including failures of actions to execute and the reasons for failure. This is particularly useful when you run your installationthe log lists what changes on your system. Carefully study the contents of the installation log to determine where problems occur and why. Before you actually run your installation, you can fix any problems noted in the log and try again. The log is the most complete record you have of exactly what the installation is doing. Your testing group can use it to check the accuracy of the entire installation. It also helps with your technical support efforts because customers who have problems installing can simply e-mail you the installation log. Use the Add Text to Install.log script action to add commands of your own to the log. You can use it to comment the install log or to customize your uninstall. See Add Text to Install.log on page 178.

414

FILE REPLACEMENT PROBLEMS IN SYSTEM32

File Replacement Problems in System32


In some cases, you might find that files you assign to the application directory or to the Windows directory incorrectly install to the System or System32 directory. Or you might find that a later version of a system file does not replace an earlier version. Both of these symptoms can be caused by version checking code, which is executed if a file is set to be replaced based on version number. The code that does version checking also checks such things as OS type and language, and it wont replace files if the OS or language does not match, regardless of version. To check if a file is replaced based on version, double-click the file on the Files page in Installation Expert, or double-click its Install File(s) script line. In the dialog that appears, if the option in the Replace Existing File dropdown list contains the word version, then version checking occurs for the file. To troubleshoot file replacement problems, you can do one of the following: If the problem occurs because your file coincidentally has the same name as an already existing system file, rename your file. If the problem occurs because your file is a later version of a system file, but you are trying to install it to a different location than the existing system file, consider installing it to the existing location and changing your application to look for it in the existing location. You can turn off version checking for the file (not recommended). Do this by selecting an option in the Replace Existing File list that does not mention version. Bypass the default version checking code. By default, WiseScript calls a Microsoft .DLL for version checking. You can use the Wise Installation Systems version checking method instead of Microsofts. To change the version checking method to the Wise Installation System method, set the variable VER_CHECK_TYPE to 1 directly before the Install File(s) line that exhibits the problem. Then reset VER_CHECK_TYPE to null after the line, which re-enables Microsoft version checking. Example:

Set Variable VER_CHECK_TYPE to 1 Install File C:\Program Files\MyApp\country.sys Set Variable VER_CHECK_TYPE to

415

11: TROUBLESHOOTING INSTALLATIONS

416

Chapter 12

Quick Reference
This section contains reference material that you might need when you are developing installations. It contains lists of variables, language codes, and command line options.

417

12: QUICK REFERENCE

Standard Variables
The following variables are set automatically by the Wise Installation System or by the script generated by Installation Expert. Many of these variables can be modified by a script, but their initial values are set before the script executes.

Automatic Compiler Variables


Compiler variables are set before the installation is built and cannot be changed by an installation script. Pathnames are relative to the build machine, not the destination computer. Compiler variables can be created and initialized by adding an entry to the Compiler Variables page in Installation Expert. See Compiler Variables on page 64.

Variable _ALIASNAME_ _ALIASPATH_ _ALIASTYPE_ _BDEWIN16DIR_ _BDEWIN32DIR_ _BDEWIN32INST_ _BDEWIN32LANG_ _BDEWIN32OPT_ _LOGFILE_PATH_ _ODB16_ _ODBC32_ _SYS_ _VAR_LIST_

Description BDE Alias name. BDE Alias path. BDE Alias type. BDE directory for 16-bit systems. BDE directory for 32-bit systems. BDE custom directory for use on systems that previously did not have BDE installed BDE language code BDE options. Path to the Install.log file. ODBC directory for 16-bit systems. ODBC directory for 32-bit systems. The Windows system directory (on build machine). Contains all the variables defined in this installation file (does not contain compiler variables). Visual Basic directory for 16-bit systems. Visual Basic options for 16-bit systems. Visual Basic DAO directory. Visual Basic directory for 32-bit systems. Visual Basic options for 32-bit systems.

_VB4WIN16DIR_ _VB4WIN16OPT_ _VB4WIN32DAO_ _VB4WIN32DIR_ _VB4WIN32OPT_

418

STANDARD VARIABLES

Variable _VFOXPRODIR_ _VFPOPTIONS_ _WIN_ _WISE_

Description Visual FoxPro directory. Visual FoxPro options. Windows directory (on build machine). The directory containing the Wise Installation System.

Automatic Runtime Variables


These variables are set by the Wise Installation System on the destination computer just before the script begins executing. Some variables should not be changed.

Variable BACKUPDIR

Description 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. The directory where the BDE configuration file is stored on the destination computer. This is the directory where idapi32.dll is installed and registered. It is used by the BDE runtime script for installing new aliases and for ensuring that updates to the BDE get installed into the correct directory. It is not recommended that you modify this variable. The command line options passed to the installation .EXE. Holds a carriage return/linefeed character for use in making lists and separating items in lists. The number of the disk currently being used by the installation. It is not recommended that you modify this variable. Used for custom dialog scripts; can be INIT, UPDATE, VERIFY (see Creating a Custom Dialog Script on page 333). Pathname to directory where fonts should be installed.

BDE_CONFIGDIR

CMDLINE CRLF DISK_NUMBER (read-only) DLG_EVENT_TYPE

FONTS

419

12: QUICK REFERENCE

Variable HELPFILE

Description Used by custom dialogs to display a help context. Set to full pathname of help file. It is not recommended that you modify this variable. Pathname to directory containing installation .EXE. It is not recommended that you modify this variable. Full path to place Install.log at end of installation Holds the result of the last action performed for Install File(s), Copy Local File(s), Edit INI, and Execute Program actions. (This variable is identical to PROCEXITCODE.) Install File(s) and Copy Local File(s) return: V = Version. Replacement option was set to check version, and the version being installed was not newer. D = Date. Replacement option was set to check Date/Time and the condition was not met. E = Exists. Replacement option was Never, and the file exists. I = Install on reboot. The file was in use and will be installed on reboot. (RESTART variable also set to S) A null value signals success. If the file specification was a wildcard, the value represents the last file copied or installed. Edit INI File returns E if the file could not be written, or null if the edit was successful. Execute Program returns the numeric exit code (return code) code from the called application. The language the end user selects on the destination computer in a multi-language installation. It is not recommended that you modify this variable. Set to the password to be used for passwordprotected files. Setting this variable disables the password prompt; it can be set for distributions where prompting is not desired.

INST

INST_LOG_PATH INSTALL_RESULT (read-only)

LANG

PASSWORD

420

STANDARD VARIABLES

Variable PROCEXITCODE (read only)

Description Holds the result of the last Execute Program action. (This variable is similar to INSTALL_RESULT.) After an Execute Program script action, this returns the exit code (return code) code from the called application. At the end of your script, set this variable to S to perform a full system boot at script completion. On Windows NT/2000/XP, if the current user does not have administrator privileges, S only logs the user out. On Window 9x or 3.1, or on Windows NT/2000/XP with administrator privileges, S performs a full system reboot at completion of the script. Set to W to restart Windows on Windows 9x or 3.1. On Windows NT/2000/XP, W logs the user out. If you set this variable to E and follow it with a DOS command, Windows restarts and executes the command in a DOS shell during boot. This only works under Windows 3.1. When this is left blank, it turns off the RESTART function. For usage, see the sample script restart.wse in the Samples directory inside the Wise Installation System application directory. Windows System directory pathname. It is not recommended that you modify this variable. Pathname to system directory for Win32 files under Windows NT/2000/XP. It is not recommended that you modify this variable. Windows temporary directory pathname. It is not recommended that you modify this variable. Language information to make the UNWISE.EXE language match the installation language. Location to place UNWISE.EXE. Pathname to Windows directory. It is not recommended that you modify this variable.

RESTART

SYS SYS32

TEMP UNINSTALL_LANG UNINSTALL_PATH WIN

421

12: QUICK REFERENCE

Runtime Variables
The following runtime variables might be set and/or used by script actions generated by Installation Expert. Some variables might not have values assigned, depending on settings you chose in Installation Expert.

Variable APPTITLE BACKUP BRANDING

Description The title of the installation as entered in Installation Expert. Pathname to the end users selected backup directory on the destination computer. If set to 1, end user information is written to CUSTDATA.INI in the directory containing the installation .EXE. Common desktop directory for adding shortcuts to desktop. Path to the directory where shortcuts for all users are stored on Windows NT/2000/XP operating systems. Common files directory. A list of the components the end user selects for installation on the destination computer (A for first component, B for second, etc.). Common Start menu directory for adding shortcuts to Start menu. Common StartUp directory for adding shortcuts to StartUp group. Desktop directory for adding shortcuts to desktop. Used by Wizard Loop action to control direction of motion through dialogs. Holds the name of the current Wizard dialog (read-only). Holds the end users choice as to whether to back up replaced files. If set to 1, this is the first time the installation has been branded and user information is written to CUSTDATA.INI.

CDESKTOPDIR CGROUPDIR

COMMON COMPONENTS

CSTARTMENUDIR CSTARTUPDIR DESKTOPDIR DIRECTION DISPLAY DOBACKUP DOBRAND

422

STANDARD VARIABLES

Variable EXPLORER

Description If set to 1, the end user has a Windows 95-style user interface on the destination computer (95/ 98, NT 4 or later). Default group (or Start menu Programs group) for application shortcuts. Path to directory where application shortcuts should be created (corresponds to GROUP variable). Directory for application files. Used for branding and registration. Windows Program Files directory. Directory of the Start menu for adding shortcuts. Directory of the StartUp group for adding shortcuts. Setting this to 1 causes the installation to use Wises simple version checking method instead of the standard Microsoft version checking method. This sometimes fixes problems where files are not being replaced as you expect. Set this variable to 1 before the Install File(s) script line that exhibits the problem. See File Replacement Problems in System32 on page 415. 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 WISE_ERROR_RTN. If, at the end of the installation, WISE_ERROR_RTN is not blank, the return code from the installation is set to the contents of WISE_ERROR_RTN. This lets you write conditional code based on the results of an external program. This value overrides the value set by the Exit Installation script action.

GROUP GROUPDIR

MAINDIR NAME PROGRAM_FILES STARTMENUDIR STARTUPDIR VER_CHECK_TYPE

WISE_ERROR_RTN

423

12: QUICK REFERENCE

Expression Operators
In conditionals, loops, and Set Variable commands, you can use symbols like + and for addition and subtraction, functions like Left$ to work with bits of text, and logical (Boolean) operators like AND and OR to combine several conditions into one. Operators can operate on a variable or on a constant. There are two types of constants: numeric and string. Numeric constants must be a positive or negative integer, such as 234 or -100. Strings must be enclosed in double quotes. If you enter a variable name instead of a number or string in any of the functions below, do not enter the percent signs (%) around the variable name. Variables must follow the standard naming conventions, described in Variables and Expressions on page 167. To read about a script that demonstrates using expression operators, see Parsing Strings Using Expression Operators on page 398.

Operator + * / Left$(str, position)

Description Addition Subtraction Multiplication Division For taking left portion of string, where str is the string, and position is number of characters from the left to return. For instance, Left$(windows,3) returns win. For taking right portion of string, where str is the string, and position is the number of characters from the right to return. For instance Right$(windows,3) returns ows. For taking middle portion of string, where str is the string, position is the number of characters from the left to start, and length is the number of characters to return. For instance Mid$(windows,2,3) returns ind. For appending two strings together.

Right$(str,position)

Mid$(str,position, length)

Concat$(str1,str2)

424

EXPRESSION OPERATORS

Operator Instr(str1,str2)

Description For determining if a substring (str2) is present within an original string (str1). Do not include the $ character because this operator does not return a string. For taking the portion of a string (str1) before the indicated substring (str2). For instance, Before$(windows,d) returns win. For taking the portion of a string (str1) after the indicated substring (str2). For instance, After$(windows,d) returns ows. Returns the length of a given string. Do not include the $ character because this operator does not return a string. Converts all characters in a string to lowercase. Converts all characters in a string to uppercase. Deletes all leading spaces. Deletes all trailing spaces.

Before$(str1,str2)

After$(str1,str2)

Len(str)

Lcase$(str) Ucase$(str) Ltrim$(str) Rtrim$(str)

Logical Operator And Or Not > < >= <= = <>

Example A And B A Or B A Not B X>Y X<Y X>=Y X<=Y X=Y X<>Y

Description True only if expression A and B are both true. True if either expression, A or B, are true, or if both A and B are true. True only if one expression is true. For instance, A but not B. True if expression X is numerically greater than Y. True if expression X is numerically less than Y. True if expression X is numerically greater than or equal to Y. True if expression X is numerically less than or equal to Y. True if expression X is numerically equal to Y. True if expression X is not numerically equal to Y.

425

12: QUICK REFERENCE

Windows Language Codes


Language Greek Russian Turkish Polish Czech Slovak Hungarian Danish Dutch (Standard) Belgian (Flemish) English (American) English (British) English (Australian) English (Canadian) English (New Zealand) English (Ireland) Finnish French (Standard) French (Belgian) French (Canadian) French (Swiss) German (Standard) German (Swiss) German (Austrian) Icelandic Italian (Standard) Italian (Swiss) Norwegian (Bokmal) Norwegian (Nynorsk) Portuguese (Brazilian) Code ELL RUS TRK PLK CSY SKY HUN DAN NLD NLB ENU ENG ENA ENC ENZ ENI FIN FRA FRB FRC FRS DEU DES DEA ISL ITA ITS NOR NON PTB Script Other Cyrillic Latin 2 Latin 2 Latin 2 Latin 2 Latin 2 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1 Latin 1

426

WINDOWS LANGUAGE CODES

Portuguese (Standard) Swedish Spanish (Standard/Traditional) Spanish (Mexican) Spanish (Modern)

PTG SVE ESP ESM ESN

Latin 1 Latin 1 Latin 1 Latin 1 Latin 1

427

12: QUICK REFERENCE

Command Line Options


You can set command line options when you run the Wise Installation System, the installer executable, and the uninstaller executable. These are especially useful if you want to run an installer as part of a batch file or other automated installation system. If you compile from the command line, compile errors generate return codes. To see the error message associated with the return code, run the compile directly from the Wise Installation System. When compile errors occur, a dialog appears during compile with a specific error message.

Wise Installation System (Wise32.EXE)


The following command line options can be applied to the Wise Installation System executable file.

Option /c file.wse /c /s file.wse /r /u


/c /d_VAR_=value

Function Compile. The installation script indicated is compiled. Compile silently. The installation script indicated is compiled. This can also be used with the /d option. Opens application in SetupCapture mode. Checks for updates on the Wise Solutions Web site. Defines one compiler variable for this run only. Additional compiler variables require additional /d switches. You cannot have a space between the /d and the compiler variable name. You can use the /s option with this option. See example below. Defines compiler variables from text file for this run only. The format for the text file is _VAR_=value, one entry per line. You can use the /s option with this option. See example below.

/c /d=file.txt

Example of compiling a .WSE file while defining a compiler variable named _MYPATH_:

"C:\Program Files\Wise Installation System\Wise32.exe" /d_MYPATH_=C:\TEST /c "C:\Devel\MyApp.wse"


Example of compiling a .WSE file while setting compiler variables defined in a text file named CompVar.txt:

428

COMMAND LINE OPTIONS

C:\Program Files\Wise Installation System\Wise32.exe /c /d=C:\Devel\CompVar.txt C:\Devel\MyApp.wse

WiseScript Installations (Setup.EXE)


The following command line options can be applied to .EXE files that you compile from Wise Installation System projects.

Option /T /X pathname /Z pathname /M /M=filename

Function Install in Test mode. Extracts files to pathname. Extracts files to pathname, then reboots. Runs installation in manual mode, prompting for system directories such as Windows, System, etc. Specifies a value file for installation. See Set Variable on page 285 for more information on reading variables. Displays the name of each self-registering .OCX or .DLL as it is registered. Reserved for internal use by the Wise Installation System during debugging sessions. During installation, temporary files are written to the hard drive. On some locked-down machines with restricted privileges, these temporary files might fail to write, resulting in a failed installation. Use this command line option to specify a directory name for a directory to which the end user has write privileges. Silent mode, automatic mode with no end user choices.

/M1 /M2 /M5=dir_name

/S

Uninstall (Unwise.EXE, Unwise32.EXE)


The following command line options can be applied to the Wise Installation System uninstall executable file, which is named unwise.exe or unwise32.exe.

429

12: QUICK REFERENCE

Option /Z /A

Function Remove empty directories, including one with Unwise itself. Automatic mode. The Wise splash screen appears on the destination computer, then the uninstall proceeds immediately with no end user choices, except for questions about uninstalling shared files. Silent mode. The uninstall proceeds silently with no splash screen, no dialogs, and no end user choices. Rollback mode. This option removes the Select Uninstall Method dialog, which means the end user does not see options for a custom, automatic, or repair uninstall.

/S /R /U

When you use command line options for the uninstall program, you must send it the path to the log file as a parameter. It must be the log file that is in the same folder as unwise.exe. If the path to the log file contains spaces, it must be surrounded by quotation marks. Example:

"C:\Program Files\My App\UNWISE.EXE" /A "C:\Program Files\My App\INSTALL.LOG" Widget Uninstall


You can specify the title of the Uninstall dialog that appears. Just type the title at the end of the command line after all other options. In the example above, the title would be Widget Uninstall.

430

Index
Extensions
.386 69 .ASP 266 .AVI 265 .CAB 122 .CAB file 64 .DLL calling Windows .DLL 411 check if loaded 199 checking system config 411 self-registering 281 shared 79, 210, 254 using to find colors 410 using to kill app 410 .DLL file accessed by application 365 .DRV 69 .EXE getting pathname 243 running silently 234 self-registering 281 .FON 81 .GRF 339 .INI 272 .INI file creating 82 editing 82, 225 .MIF file 87 .OCX 281 .OCX file accessed by application 365 .PDF 87, 88 .REG 92, 227 .RPT 101 .SMS 88 .SYS 69 .TLB 281 .TTF 81, 276 .VXD 69 action adding to script 146 creating 153 customizing list 151 list 142 user-defined 153 user-defined, procedure 154 user-defined, tutorial 156 Add BDE Alias dialog 174 .WAV 265 _ALIASNAME_ 418 _ALIASPATH_ 418 _ALIASTYPE_ 418 _BDEWIN16DIR_ 418 _BDEWIN32DIR_ 418 _BDEWIN32INST_ 418 _BDEWIN32LANG_ 418 _BDEWIN32OPT_ 418 _LOGFILE_PATH_ 418 _ODB16_ 418 _ODBC32_ 418 _SYS_ 418 _VAR_LIST_ 418 _VB4WIN16DIR_ 418 _VB4WIN16OPT_ 418 _VB4WIN32DAO_ 418 _VB4WIN32DIR_ 418 _VB4WIN32OPT_ 418 _VFOXPRODIR_ 419 _VFPOPTIONS_ 419 _WIN_ 419 _WISE_ 419 Add BDE Alias script action 174 add command to Autoexec.bat 54 Add Command to AUTOEXEC.BAT dialog 55, 180 Add Command to CONFIG.SYS dialog 67, 182 Add Device to SYSTEM.INI dialog 184 Add Directory to PATH dialog 175 Add Directory to Path script action 175 Add ProgMan Icons script action 176 Add Text to Install.log dialog 179 Add Text to Install.log script action 178 Add to Autoexec.bat script action 180 Add to Config.sys script action 182 Add to System.ini script action 184 Add/Remove control panel 53 Add/Remove Programs page 53 administrator repair 34 uninstall 34 After$ 425 386Enh 69, 184, 225 4-digit year 243 After$ example 398 All page groups view 38 Allow Floppy Disk Change script action 185 Apollo 98 Append Data 95 application executing 233 killing with DLL 410 monitoring 365 repair 35 running after restart 396 Application Exit Code 235

Numerics

431

INDEX

Application Installation Information dialog 371 ApplicationWatch using 365 ApplicationWatch wizard exclude files 45 APPTITLE 422 association detail 73 Association Details dialog 73 association, setting up 72 authenticode 71 auto-adding icon 44 Autoexec.bat 175, 249 Autoexec.bat page 54 automated build process 64, 390 AutoPlay 403, 403 AutoRun 403

exporting 339 importing 339 moving object 346 opening 339 overlapping object 346 resizing object 346 saving 339 scalable 337 scaling to screen 61, 348 setting properties 347 slowing down 348 specify location 347 timing the display 348 working with 339 Billboard Settings dialog 60, 219, 347 Billboards page 59 binary file read from 274 write to 274 bitmap adding to billboard 345 displaying in background 217, 219 Bitmap Settings dialog 345 blank line, insert in Edit Text control 310 in script 276 in static control 304 blank script 37, 140 Borland Database Engine changing language 57, 207 configure during installation 206 create alias in 174 setting aliases 58 BRANDING 422 branding/registration 238 branding/serializing 70 Browse for Directory script action 185 Browse for Directory Settings dialog 185 BUFFERS 284 build settings 62 Build Settings page 62 build, automated 64, 390

CAB wizard 122 cabinet file 64 CabWiz.exe 122 calculations 398, 398 Call DLL Function example 410 example using structure 192 Call DLL Function dialog 186 Call DLL Function script action 186 Cancel event 144 carriage return in Edit Text control 310 in static control 304 CDESKTOPDIR 422 CD-ROM copy files from 62, 208 store installation on 87 CD-ROM drive, getting 243 CE application 125 Ceappmgr.exe 126 CGI 266 CGROUPDIR 422 Change Source Directories dialog 29 Change SubDirectories 30 Check Configuration script action 194 Check Disk Space script action 196 Check Disk Space Settings dialog 196 check for updates 17 Check HTTP Connection dialog 199 Check HTTP Connection script action 198 Check If File/Dir Exists script action 199 Check If File/Dir Exists Settings dialog 199 Check In Use File Settings dialog 201 Check In-use File script action 201 Check Service script action 202 Check Service Settings dialog 202 Check System Configuration dialog 194 checkbox

B
background of installer 102 background, displaying images in 219 backing up replaced files 70 BACKUP 422 BACKUPDIR 419 BDE 206 BDE Alias Settings dialog 58 BDE Runtime 57 BDE Runtime page 57 BDE_CONFIGDIR 419 Before$ 425 Before$ example 398 Begin Installation Capture dialog in SetupCapture 353 billboard about 59, 339 adding bitmap 345 adding ellipse 343 adding line 342 adding object 340 adding polygon 344 adding rectangle 343 adding to script 217, 219 arranging object 346 choose transition 347 determine how many display 347 editing text 340

C
CAB File page 64

432

INDEX

disabling 330, 400 enabling 330, 400 greying 400 checkbox control 315 Checkbox Control Settings dialog 315 checking for updates 15 Chinese 86 CMDLINE 419 color checking with .DLL 411 finding with DLL 410 in script 44 combo box control 317 Combo Box Control Settings dialog 317 Command Line field in SetupCapture 354, 363 command line option Wise executable 428 Wise project 429 command line options 390, 428 commenting out lines 147 comments in scripts 276 COMMON 422 company name, getting 243 compile automated 64, 390 halt 246 using command line 428 Compile button 21, 28, 162 compiler variable about 203 automatic 418 description 418 example 164, 395 kinds of 168 setting 64 Compiler Variable If Settings 204 Compiler Variable If/Else/End 203 Compiler Variable Settings dialog 65, 164 Compiler Variables page 64 component-based script 406 COMPONENTS 171, 197, 262, 422 components add to WinCE 258 adding to installation 66 creating for WinCE 127

dialogs 70 installing for WinCE 125 using for WinCE 125 Components page 66 Concat$ 424 Concat$ example 398 conditionals 166 Config ODBC Data Source script action 204 Config.sys 249 Config.sys file, adding lines 67 Config.sys page 67 configuration 194 Configure BDE dialog 206 Configure BDE script action 206 Configure ODBC Data Source dialog 88, 204 configuring ODBC data source on destination computer 88 Contained within structure 192 control about 300 adding to dialog 301 aligning and spacing 302 disabling 402 enabling 402 graphic 322 group box 322 hot text 306 in dialog 304 marking by default 330 Play AVI 324 rectangle 323 static 304, 322 text 304 convert script message 21, 393 Copy Local File(s) script action 208 Copy Local Files Settings dialog 208 CRC checks 63 Create Directory dialog 211 Create Directory script action 211 Create Service script action 212 Create Service Settings dialog 104, 212 Create Shortcut dialog 215 Create Shortcut script action 215 CRLF 419

Crystal Decisions 101 Crystal Reports 101 about 101 adding runtime support 101 Crystal Reports page group 38 CSTARTMENUDIR 422 CSTARTUPDIR 422 current date/time 242 Custom Action List Settings dialog 151 Custom Billboard Editor about 337 accessing 338 defined 20 Custom Billboard Editor window 338 Custom Billboard script action 217 Custom Dialog Editor about 293 accessing 294 defined 20 Custom Dialog script action 217 Custom tab 142, 151 customization of environment 37 Customize Pages dialog 40 customizing installation steps 39

D
DAO 98 data source 204 database client, connecting 397 date/time getting 242 getting 4-digit 243 date/time file modified 243 DCOM server 92 debug version, building 164 debugging go 163 script 162 scripts 28, 162 set breakpoint 163 single step 163 default directory 91 default script changing 37, 38 editing 38

433

INDEX

Delete File(s) dialog 218 Delete File(s) script action 218 Delphi page groups 38 dependencies for group 105, 213 desktop icon 105 DESKTOPDIR 422 destination computer requirements 110, 110 destination directory dir exists message 329 append directory problem 328 setting default 91 user-selectable 70 device 184 dialog adding button 312 adding checkbox 315 adding combo box 317 adding control 301, 301 adding drop-down 317 adding list box 319 adding radio button 314 adding to your script 295 adding wizard dialog 217 aligning and spacing 302 branding/registration 238 change default image 327 changing controls text 282 control 300 control, configuring 304 creating 217, 295 display to user 221 displaying rich text 309 displaying text file 224 edit text field 309 editing 296, 299 editing control 301 editing defaults 297 enabling,disabling controls 333 executing program from 326 font problems 86 handling mouse event 330, 400 installation wizard 70 list box 309 listing Program group 320 movie 324 push button 312 script 333 scripting 281, 283, 330, 401 setting tab order 302 settings 299

showing or skipping 404 simple dialog 221 solving common problems 327 static control 304 stop dir exists message 329 stop appending to path 328 text box 309 text control 309 to get filename 268 to get text input 269 to let user browse 185 toolbar 301 Web link 309 wizard loop dialogs 290 Dialog Box Properties dialog 295, 299 dialog set creating 331 custom 331 defined 331 example 331 Dialog Set Properties dialog 332, 332 Dialog Templates 297 Dialogs page 70 Digital Signature page 71 DIRECTION 422 Directories to Watch in SetupCapture 356 directory appends to directory 328 changing 29 check if exists 199 creating empty 211 predefined for WinCE 127 rename 277 setting default 91 DirectX 100 disabling checkbox 400 disabling control 330 disabling radio button 329 disk space checking with .DLL 411 free disk space 196, 243 DISK_NUMBER 419 DISPLAY 422 Display Billboard script action 219 Display Message example 164 Display Message script action 221

Display Message Settings dialog 221 Display Progress Message 222 Display Progress Message script action 222 Display Progress Message Settings dialog 222 Display Text File script action 224 Display Text File Settings dialog 224 Display Variable 332 Distribute button 21 Distribution Wizard about 46 copying .EXE to floppies 46 copying .EXE to network 48 copying to FTP server 50 dividing numbers 398 DLG_EVENT_TYPE 419 DLL Parameter Settings dialog 190 DLL, see .DLL DLLRegisterServer 281 DOBACKUP 422 DOBRAND 422 document types 72 documentation, using 12 Also see manual DOS version, getting 242 double-byte language 86 download installation 117 Download Runtimes 16 drive CD-ROM, getting 243 getting first network drive 243 type, getting 243 driver defining device drivers 69 MDAC 98 ODBC 256 Duplicate Files Report 150 dword 190 dword pointer 190

E
Edit INI File script action 225 Edit INI File Settings dialog 82, 83, 225

434

INDEX

Edit Registry script action 227 Edit Registry Settings dialog 227 Edit Text Control Settings dialog 309 ellipse in billboard 343 Else 247 Else script action 231 ElseIf 247 ElseIf script action 231 ElseIf Settings dialog 231 empty project 25, 37, 140 enabling checkbox 400 enabling control 330 enabling radio button 329 End Installation Capture dialog in SetupCapture 354 End script action 232 environment variable 54, 175, 235, 237 reading 242 error checking user input 399 error message about converting script 393 about missing files 393 Also refer to online Knowledgebase changing text for 41 compiler variable 43 for script samples 393 version errors 44 Evaluate Expression 286 Evaluate Windows Installer Condition 232 Event drop-down 143 Event field 142 Events drop-down 143 Exclude Registry Key in SetupCapture 362 exclusion list editing files 358 exclusion types 358 EXE Name field in SetupCapture 354, 363 Execute Installation dialog in SetupCapture 354, 362 Execute Program script action 233 Execute Program Settings dialog 233, 326, 326

Exit event 143, 235 Exit Installation script action 235 Exit Without Saving 339 EXPLORER 423 expression about 167 examples 398 operators 424 operators, example 398 Expression True 232, 247, 289 extension finding app for 396 setting up 72

File and Folder Exclusions in SetupCapture 358, 358, 359, 360 File Associations page 72 file extensions .386 69 .ASP 266 .AVI 265 .CAB 122 .DRV 69 .FON 81 .GRF 339 .INI 272 .OCX 281 .PDF 87 .REG 92, 227 .RPT 101 .SYS 69 .TLB 281 .TTF 81, 276 .VXD 69 .WAV 265 File Properties dialog 132 file type, associating with program 72 files excluding 358 self-repair 79, 108, 217, 255 Find command 147 Find File in Path dialog 235 Find File in Path example 396 Find File in Path script action 235 Find Text in Installation Script dialog 147 Finished dialog 70 firewall 409 First element of structure 192 floppies copying to 46 floppy disk 87, 185 folder, excluding from SetupCapture 359 font 81, 276 FONTS 419 Fonts page 81 Frame/Rectangle Control Settings dialog 323 FTP 117 FTP files 208 FTP Server dialog 50

F
features 66 file 4-digit modified date 243 adding to installation 74 associating file type with program 72 association 72 auto-addition of associated 74 check if exist 199 converting short to long 286 copying from CD-ROM 62 copying to destination computer 253 date/time modified 242 downloading during install 408 downloading from Web 208 extension 72 finding on target computer 395 FTPing from Web 208, 408 getting size 243 getting version of 243 in use 201 installation options 77 long filename 286 removing 218 rename 277 replace in System32 415 replace on destination computer 79, 210, 255 require password 78 search for 277 searching drives for 395 setting attributes 284 short filename 286 troubleshoot replacement 415 version checking 79, 210, 255

435

INDEX

FTP server, copying installation to 50 FTP transaction 408 FTP, passive 50 function .DLL function 186 example 192 passing simple params to 190 passing structure to 192

group for service 105, 213 group box 322 Group Box Control Settings dialog 322 GROUPDIR 423

Visual Basic Project 368 Import VB Project using 368 importing Visual Basic project files 350 include file tabs 44 Include script 144 include script 143 adding 248 editing 144, 144 replacing text 149 saving 144 searching text 148 selecting 144 Wise-created 144 Include Script dialog 249 Include Script script action 248 INI file, see .INI file INI Files page 82 INI, see .INI initialization splash screen 92 Insert Line into Text File dialog 250 Insert Line into Text File script action 249 INST 420 INST_LOG_PATH 420 Install DirectX dialog 252 Install DirectX script action 251 Install File Settings dialog 77, 254 Install File(s) script action 253 Install ODBC Driver dialog 257 Install ODBC Driver script action 256 Install WinCE Component script action 258 Install WinCE Component Settings dialog 258 Install WiseUpdate Client script action 259 Install WiseUpdate Client Settings dialog 259 Install.log 84, 414 INSTALL_RESULT 233, 420 installation adding file 74 adding font 81 adding registry entry 92 adding shortcut 105

H
Halt Compilation script action 246 Halt Compilation Settings dialog 246 hardware and software minimum requirements 110 hardware registry entries 356 help about 12 contents 13 getting help 13 HELPFILE 420 Hidden attribute 284 hot text appearance 306 link to Web 309 hot text control 306 Hot Text Control Settings dialog 306 HTTP 117, 198 HTTP POST 266 HTTP protocol 50

G
General Information page 81 General Settings in SetupCapture 355 Get Environment Variable dialog 237 Get Environment Variable script action 237 Get Name/Serial Number script action 238 Get Name/Serial Number Settings dialog 238 Get ProgMan Group script action 240 Get Registry Key Value dialog 241 Get Registry Key Value script action 241 Get System Information dialog 242 Get System Information script action 242 Get Temporary Filename dialog 244 Get Temporary Filename script action 244 Get Wind32 System Directory dialog 290 Get Windows Installer Property 245 Getting Started Guide 12 Global Options 43 graphic displaying in background 217, 219 Graphic Control Settings dialog 322 Graphics support 195 greying out radio button 329 GROUP 423

I
icon see also shortcut add to WinCE 137 adding 215 for installer 63 icon group name 70, 105 Icons page, see Shortcuts Idapinst.dll Path 174 If 231, 231, 232 If script action 247 If Statement Settings dialog 247 ignore entire subtree 362 image displaying in background 217, 219 import

436

INDEX

assigning serial number 90 building 28 capturing 351, 352 capturing uninstall 352 changing messages 41 components-based 406 copying from CD-ROM 208 copying to floppies 46 copying to FTP server 50 copying to network 48 creating 24, 24 creating for WinCE 121 creating from installed application 365 creating from VB 368 creation options 25 customize during compile 395 debug version 164 default directory 91 detecting previous 112 displaying images during 219 executing for SetupCapture 362 from FTP server 208 from Internet 408 from network 208 from Web 408 FTP 408 getting started 23 how to create 23 icon for 63 import VB project 368 log file 84 managing 24 media 87 naming 63 necessary information 22 over Internet 117 patching 79, 210, 255 progress bar 91 recording activity 414 reducing traffic 63 setting background 102 single-file EXE 87 starting with wizard 349 temp directory 63 template 25, 37 title 91 troubleshooting 413 verify authenticity 71 version info 81 installation dialogs 70 Installation Expert about 26 customizing page groups 39 customizing steps 39

defined 20 getting help 26 navigating to 21 page navigation 26 Pages menu 38 relation to Editor 140 Windows Runtime page 97 Installation Expert pages Add/Remove Programs 53 Autoexec.bat 54 BDE Runtime 57 Billboards 59 Build Settings 62 CAB File 64 Compiler Variables 64 Components 66 Config.sys 67 Dialogs 70 File Associations 72 Files 74 Fonts 81 General Information 81 INI Files 82 Installation Log 84 Languages 85 Media 87 ODBC 88 Online Registration 90 Password 90 Product Details 91 Progress Bar 91 Registry 92 Screen 102 Services 103 Shortcuts 105 SmartPatch 108 Status MIF 87 System Requirements page 110 System Search 112 Uninstall 115 WebDeploy 117 WinCE 121 WinCE Files 130 WinCE Platform 134 WinCE Registry 135 WinCE Shortcuts 137 Windows Runtime 100 WiseUpdate 373 WiseUser 138 Installation Expert pages, resetting 26 installation log 115, 178, 262, 414 Installation Log page 84 installation options 77

installer messages 41 name 63 opening automatically 403 installer .EXE pathname 243 installer icon 63 Installer Messages dialog 41 Installer Messages Editor 41 Instr$ 425 Instr$ example 398 integer in script 398 integer, calculations on 398 international 85 Internet registration via 90 transaction 408 Internet check 198 Internet Explorer 412 Internet-based installations 117 intranet installation 117 in-use files 62

J
Japanese 85, 86

L
LANG 420 language changing for Borland 57, 207 copying text between dialogs 86 defining 85 messages 41 name of 42 specifying 142 using another INI for 63 Windows codes 426 Language directory 41 Language Number 175 languages font problems 86 Languages page 85 Lcase$ 425 Lcase$ example 398 Left$ 424 Left$ example 398 Len$ 425

437

INDEX

Len$ example 398 license agreement 403 line adding to billboard 342 in static control 304 insert in Edit Text control 310 Line Settings dialog 342 list box control 319 List Box Control Settings dialog 320, 328 list box with checkboxes 320 logging 84, 115, 414 logon name, getting 243 long 190 long pointer 190 loops 166 lowercase, converting 286, 399 Ltrim$ 425 Ltrim$ example 398

N
NAME 423 Network Directory dialog 48 network drive 243 Network Installation 63 network traffic reducing 63 new features Refer to Release Notes New Installation File dialog 154, 156 newsgroups 13 non-properties view 21

Parse String example 398, 398 Parse String script action 263 passive FTP 50 PASSWORD 420 password 78 Password page 90 patch installation 79, 210, 255 patching 108, 253 PATH variable 54, 175, 235 pathname changing directory 29 predefined for WinCE 127 relative path 32 UNC path 30 Pause script action 265 Pause Settings dialog 265 Personal Group 178 Play a Multimedia File script action 265 play AVI control 324 Play AVI Control Settings dialog 324 Play Multimedia File dialog 266 polygon in billboard 344 Polygon Settings dialog 344 Post to HTTP Server script action 266 Post to HTTP Server Settings dialog 267 Preferences 43 Previous Version page see System Search Processor 195 Product Details page 91 product registration 90 ProgMan 105, 176 Program Files directory 328 Program Manager adding icon 176 adding shortcut to 105 getting program group 240 Program Manager Groups Settings dialog 240 Program Manager Settings dialog 176 program, executing 233 program, running silently 234 PROGRAM_FILES 423

O
Object Settings dialog 343 ODBC 204, 256 define data source 88 ODBC page 88 OLE2 Support 100 OLESelfRegister 281 Online Registration page 90 Open Software Description 216 Open/Close INSTALL.LOG dialog 263 Open/Close Install.log script action 262 operating system requirements 110 Operating systems 195 options for command line 428 Oracle Server 397 OSD 216 owner name, getting 243

M
MAINDIR 112, 423 Mainline 143 manual accessing online 12 getting printed manual 12 MDAC 98 Media page 87 memory, finding 242 merge error 208 message, changing text for 41 MFC 100 Microsoft SMS page 87 Mid$ 424 Minimum System Requirements dialog 110 Modify Component Size dialog 262 Modify Component Size script action 262 movie on dialog 324 MSDE 98 MSJet 98 multimedia 195, 265

P
package definition file 87, 88 page groups customize 39 pages resetting 26 Pages menu about 38 Parameter Type 190 Parse String dialog 264

438

INDEX

progress bar calculation 91 placement 91 Progress Bar page 91 progress message about 222 displaying 223 removing 223 Prompt for File Name dialog 268 Prompt for Filename script action 268 Prompt for Text script action 269 Prompt Settings dialog 270 properties getting 245 setting 286 Properties page groups 38 proxy server information 17 push button control 312 Push Button Control Settings dialog 312 Push Button Properties dialog 312

ReadMe display file 70 readme See release notes reboot automatically at script completion 275, 421 forcing 396 message, turning off 62 Reboot System dialog 275 Reboot System script action 275 rectangle control 323 rectangle in billboard 343 reference manual See manual REG_EXPAND_SZ 242 RegEdit 227 register .OCX/.DLL/.EXE/.TLB 79, 210, 254 Register Font script action 276 Register Font Settings dialog 276 Register OCXs/DLLs Settings dialog 281 registration 90 registry see also registry key adding on WinCE 135 excluding 361, 362 hardware entries 356 importing .REG files 92 importing file key 93 specifying entries on destination computer 92 values, multi-line 241 Registry Exclusions in SetupCapture 361 registry file, see registry registry key adding 96 append to 95 creating 93 editing 93, 97 empty 96 getting value of 241, 334 removing from destination computer 94, 229 removing from installation 93, 228, 228 self-repair 95, 228, 230 settings 93, 228

Registry Key Settings dialog 93, 96, 135, 228 Registry page 92 registry value self-repair 108, 217 registry value, see registry key REGSVR32.EXE 281 relative path 32 release notes REM statements in default script 38 Remark script action 276 Remark Settings dialog 276 reminder interval 17 removable media 87 Removable Media dialog 46 removing registry key from destination computer 94, 229 removing registry key from installation 93, 228, 228 Rename File/Directory dialog 277 Rename File/Directory script action 277 repair about 34 application 79, 95, 108, 217, 228, 230, 255 during uninstall 34, 115, 119 turning on 108, 217 using 35 Replace command 149 Replace Text in Installation Script dialog 149 Require Password 254 Reset Page 26 resetting pages 26 RESTART 421 restart automatically at script completion 275 forcing 396 running program after 396 restarting the computer 421 rich text, displaying in dialog 309 Right$ 424 rollback.wse script 144 Rtrim$ 398, 425 Run Application dialog 365

R
radio button disabling 329, 400 enabling 400 enabling,disabling 330 greying 400 greying out 329 radio button control 314 Radio Button Control Settings dialog 314 Radio Button Dialog script action 271 Radio Button Settings dialog 271 Read INI Value dialog 113, 272 Read INI Value script action 272 Read Only attribute 284 Read Registry Value dialog 114 Read/Update Text File script action 273 Read/Update Text File Settings dialog 273 Read/Write Binary File script action 274 Read/Write Binary File Settings dialog 274

439

INDEX

Run button 21, 28, 162 run program 233 runtime variable 168 runtimes Apollo 98 BDE 57 Crystal Reports 101 DAO 98 database 97, 98 downloading 16 MDAC 98 MSDE 98 MSJet 98 updating 16 Visual Basic 99 Visual C++ 99 Visual FoxPro 99 Windows 100

S
sales number, Wise Solutions 12 Samples directory 391 Save Changes and Exit 339, 339 scaling billboard 61 screen color requirements 110 Screen page 102 screen resolution requirements 110 script include script, see include script see also script actions adding actions to 146 basic concepts 166 colors 142 commenting out lines 147 comments 276 converting 21 debugging 28, 162, 162 editing 144 explained 170 find 147 place new lines after 44 referencing compiler variables 64 replacing 149 samples 391 saving 144 script actions Add BDE Alias 174 Add Directory to Path 175 Add ProgMan Icons 176

Add Text to Install.log 178 Add to Autoexec.bat 180 Add to Config.sys 182 Add to System.ini 184 Allow Floppy Disk Change 185 Browse for Directory 185 Call DLL Function 186 Check Configuration 194 Check Disk Space 196 Check HTTP Connection 198 Check If File/Dir Exists 199 Check In-use File 201 Check Service 202 Config ODBC Data Source 204 Configure BDE 206 Copy Local File(s) 208 Create Directory 211 Create Service 212 Create Shortcut 215 Custom Billboard 217 Custom Dialog 217 Delete File(s) 218 Display Billboard 219 Display Message 221 Display Progess Message 222 Display Text File 224 Edit INI File 225 Edit Registry 227 Else 231 ElseIf 231 End 232 Evaluate Windows Installer Condition 232 Execute Program 233 Exit Installation 235 Find File in Path 235 Get Environment Variable 237 Get Name/Serial Number 238 Get ProgMan Group 240 Get Registry Key Value 241 Get System Information 242 Get Temporary Filename 244 Get Windows Installer Property 245 Halt Compilation 246 If 247 Include Script 248 Insert Line into Text File 249 Install DirectX 251 Install File(s) 253 Install ODBC Driver 256 Install WinCE Component 258 Install WiseUpdate Client 259 Modify Component Size 262 Open/Close Install.log 262 Parse String script action 263 Pause 265

Play a Multimedia File 265 Post to HTTP Server 266 Prompt for Filename 268 Prompt for Text 269 Radio Button Dialog 271 Read INI Value 272 Read/Update Text File 273 Read/Write Binary File 274 Reboot Sustem 275 Register Font 276 Remark 276 Rename File/Directory 277 Search for File 277 Select Components 279 Self-Register OCXs/DLLs 281 Set Control Attributes 281 Set Control Text 282 Set Current Control 283 Set File Attributes 284 Set Files/Buffers 284 Set Variable 285 Set Windows Installer Property 286 Start/Stop Service 287 While 288 Win32 System Directory 289 Wizard Loop 290 Script Editor about 27, 139 action list 142 creating action 153 customized list 151 defined 20 Events drop-down 143 line colors 44 navigating to 21 relation to Expert 140 toolbar 141 window 141 window described 27 working with 140 script samples documentation 392 missing file messages 393 opening 392 REM statements 392 solving problems with 395 troubleshooting 391, 393 using 391 scripting a dialog 401 Search for File dialog 113 Search for File script action 277 Search for File Settings dialog 278 Search.WSE 395

440

INDEX

searching for files 395 sections 82 Select Component Settings dialog 280 Select Components script action 279 Select Dialog to Edit dialog 298 Select File from Installation dialog 69, 72, 103, 106 selecting components 70 self register (WinCE) 133 Self-Register 210, 254 Self-Register OCXs/DLLs script action 281 self-repair about 34 files 79, 255 registry value 95, 228, 230 turning on 108, 217 using 35 serial number 90 serial number, getting from user 238 server, Internet 117 service checking 202, 202 controlling behaviour 104 creating 103, 212 starting 287 stopping 287 service pack number, getting 243 Services page 103 Set Control Attributes dialog 282 Set Control Attributes script action 281 Set Control Text dialog 282 Set Control Text script action 282 Set Current Control dialog 283 Set Current Control script action 283 Set File Attributes dialog 284 Set File Attributes script action 284 Set Files/Buffers dialog 285 Set Files/Buffers script action 284 Set Variable dialog 285 Set Variable script action 285 Set Windows Installer Property 286

Set Windows Installer Property Settings dialog 287 setup program capturing 353 setup program, changing 64 SETUP.DLL (WinCE) 134 Setup.EXE 429 SetupCapture capturing .MSI 352 capturing deletions 355 capturing multiple installations 352, 354 directories to watch 356 excluding a file 358 excluding a folder 359 excluding registry key 362 excluding registry value 362 executing installations 362 files ignored 364 guidelines 351 procedure 351 uninstall, capturing 352 using 351, 352 using wildcards 360 SetupCapture wizard 350 Share Support 100 shared .DLL 79, 79, 210, 210, 254, 254 Shared Directory 45 shared file keeping track of 79, 254 shared file (WinCE) 133 shared workstations 138 shell execute 233 shell link 105, 215 shell link (WinCE) 137 short 190 short pointer 190 shortcut adding 105, 215 creating 215 details 107 for WinCE 137 Shortcut Details dialog 107 Shortcuts page 105 silent compile 428 silent install 428 silent mode 429 size of file 243 SmartPatch 79, 210, 253, 255

SmartPatch page 108 SMS creating .MIF file 87 sound support requirements 110 source directories 29 source files changing location 29 relative path 32 UNC path 30 specify proxy server information 17 specifying system requirements 110 Standard tab 142 Start menu 105, 215, 320 Start menu (WinCE) 137 Start/Stop Service Details dialog 287 Start/Stop Service script action 287 starting installation 70 STARTMENUDIR 423 STARTUPDIR 423 static control 304, 322 Status MIF see Microsoft SMS string 263 string buffer 190 string pointer 190 structure complex 192 passing params example 192 passing to DLL 191 support 14 newsgroups 13 online support 13 searchable knowledgebase 13 SYS 421 SYS32 421 System attribute 284 system configuration, checking with .DLL 411 System Requirements page 110 system requirements, Wise Installation System Refer to Getting Started Guide System Restore Snapshots, in Windows ME 62 System Search page 112

441

INDEX

system sleep 265 System.ini 69, 184, 225, 272 System32 installing files 415 replacing files 415 Systems Management Server 87

capturing 352 initiating repair 34 Repair option 115, 119 Uninstall page 115 uninstall using command line 428 UNINSTALL_LANG 421 UNINSTALL_PATH 421 uninstaller customizing 115 customizing with log file 262 deleting files 116 deleting registry keys 116 executing programs 116 logged installation 84 using installation log 178 Unwise.EXE 430 unwise.exe 35, 115 Unwise32.EXE 430 update, checking for 15, 45 upgrades 108 upgrading 112 uppercase, converting 286, 399 URL check 198 user-defined action creating 154 described 153 tutorial 156

Visual Basic 99 project types 368 starting installation from 350 Visual Basic page groups 38 Visual C++ 99 Visual FoxPro 99 volume label 243 VSHARE.386 100

T
tab order in dialogs 302 tabs in Script Editor 144 technical support 14 newsgroups 13 online support 13 searchable knowledgebase 13 Temp 244 TEMP variable 421 template for creating installations 25 import VB project 368 template, creating and editing 37 Test button 21, 28, 162 text adding to billboards 340 manipulating 263 read from file 273 update in file 273 text control 304, 309 Text Control Settings dialog 304 text file displaying in dialog 224 editing 180, 182 manipulating 396 Text Settings dialog 340 Title field, Installation Expert 141 title of installation 91 translation see language troubleshooting installations 413 TrueType font 81, 276

W
Watch Application Wizard, see ApplicationWatch Wceload.exe 122 Web page, launching from installer 408 Web transaction 408 WebDeploy distributing 120 process overview 120 using through Proxy 409 WebDeploy page 117 Welcome dialog 70 SetupCapture 353 While 232 While script action 288 While Statement Settings dialog 288 wildcards examples 361 using to exclude 360 WIN 421 WIN.INI 82, 225, 272 Win16 SDK 191 Win32 System Directory script action 289 Win32s version, getting 243 WinCE assigning files 130 overview 121 platforms 123 platform-specific installation information 134 predefined paths 127 procedure 124 shortcuts 137 WinCE Components 125 WinCE Files page 130 WinCE installation directories 126

V
values file 286 variable automatic run-time 419 compiler 168, 418 decrementing 285 defined 167 filling from file 286 incrementing 285 list of 418 runtime 168, 422 setting the value of 285 standard 418 VB project, importing 368 VER_CHECK_TYPE 423 Verisign 71 version checking 79, 210, 253, 255 version number, getting 243 Version Resource see General Information

U
Ucase$ 425 UNC path 30 UNC pathname, getting 243 uninstal.wse script 144 uninstall 34

442

INDEX

WinCE Installation pages 121 WinCE Platform page 134 WinCE Registry page 135 WinCE Shortcuts page 137 window background 102 Windows language codes 426 logon name, getting 243 runtime components 100 version, getting 242 Windows 2000 page see Add/Remove Programs Windows 2000 service 103, 202, 212, 287 Windows CE Components dialog 127 Windows CE Shortcut Properties dialog 137 Windows NT service 103, 202, 212, 287 Windows Runtime page 97, 100 Windows XP 287

Windows XP service 212 WinExec 233 WinSock.dll 198 Wise include scripts 144 Wise Installation System launching 24 Wise scripting language 173 Wise Solutions getting updates 15 sales number 12 technical support 14 WISE_ERROR_RTN 235, 423 Wise32.EXE, run from command 428 WiseUpdate about 373 configuring 376 customizing 387 process overview 374 running from your app 387 running silently 387 troubleshooting 387 Update Filename 381

using Distribute with 379 using with SmartPatch 386 using with WebDeploy 386 WiseUpdate page 373 WiseUser page 138 wizard ApplicationWatch, about 365 SetupCapture 351 wizard dialog changing image 327 for installation 70 Wizard Loop script action 290 Wizard Loop Settings dialog 291, 327 Wizard Loop, adding dialog 217 wizards (Wizard view) about 350 defined 20 for creating installation 350 Import VB Project 350 word 190 word pointer 190

443

INDEX

444

You might also like