+ All Categories
Home > Documents > Wise Script Editor

Wise Script Editor

Date post: 14-Oct-2014
Category:
Upload: arvindgaba
View: 12,342 times
Download: 1 times
Share this document with a friend
Description:
The Complete Wise 7 SCripting Guide
Popular Tags:
211
Transcript

WiseScript Editor (Wise Package Studio 5.5)

Copyright© 1994-2004 Wise Solutions, Inc. All Rights Reserved.

This documentation and the accompanying software are copyrighted materials. Making unauthorized copies is prohibited

by law. No part of the software or documentation may be reproduced, transmitted, transcribed, stored in a retrieval system or translated into any human or computer language without prior written permission of Wise Solutions, Inc. Wise Solutions, Inc. asserts its �Moral Right� to be identified as the author of this work, in all jurisdictions which recognize the �Moral Right.�

NoticeUnless 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.

TrademarksWise Solutions, Inc. owns a number of registered and unregistered Trademarks and Service Marks (the �Marks�). These

Marks are extremely valuable to Wise Solutions, Inc. and shall not be used by you, or any other person, without Wise Solutions, Inc.�s express written permission. The Marks include, but are not necessarily limited to the following: Application Isolation Wizard�; ApplicationWatch�; ConflictManager®; ExpressBuild�; Installation Development Life Cycle�; InstallBuilder®; InstallMaker®; InstallManager®; InstallTailor�; MSI Debugger�; MSI Script�; PackageManager�; Preflight Deployment�; SetupCapture®; SmartMonitor�; SmartPatch®; Software Distribution Made Easy�; Software Installations Made Easy®; Visual MSIDiff�; Virtual Capture�; WebDeploy�; Wise Installation System®; Wise Package Studio®; Wise Software Repository�; Wise Solutions®; WiseScript�; WiseScript Express�; WiseUpdate®; WiseUser®; and the Wise Solutions logo.

In addition to Wise Solutions, Inc.�s Marks, some Wise Products may include Trademarks or Service Marks owned by other corporations. These other Marks include, but are not necessarily limited to Microsoft® Windows® and Microsoft® Visual Studio® .NET, which are registered Trademarks of Microsoft Corporation.

You shall not use any of the Trademarks or Service Marks of Wise Solutions, Inc., Microsoft Corporation, or any other entity, without the express written permission of such Trademark or Service Mark owner.

Wise Solutions, Inc.47911 Halyard Drive; Plymouth, Michigan 48170 USAPhone: 734-456-2100 � Fax: 734-456-2456 � [email protected] � www.wise.com

2

Contents

1 Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Documentation Roadmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9Getting Help and Product Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2 WiseScript Editor Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12WiseScript Editor Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Navigating Between Views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Creating a New Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Opening a Microsoft SMS Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Using Installation Expert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Using Setup Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Compiling, Testing, and Running the Installation . . . . . . . . . . . . . . . . . . . . . 16

Installation Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Changing Source Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Converting to UNC-Based Source File Paths. . . . . . . . . . . . . . . . . . . . . . . . . 18Converting to Relative Source File Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Using Self-Repair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Customizing Your Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . 21Creating and Editing Installation Templates . . . . . . . . . . . . . . . . . . . . . . . . . 21Customizing Installation Expert Page Groups . . . . . . . . . . . . . . . . . . . . . . . . 21Changing Installer Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Setting Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3 Installation Expert Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Active Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Add/Remove Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Autoexec.bat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Build Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Compiler Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Config.sys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Digital Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34File Associations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40General Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41INI Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Installation Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Languages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Microsoft SMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Password. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

3

Product Details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Progress Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51SmartPatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53System Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54System Search. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Uninstall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57WebDeploy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

4 Setup Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62About Setup Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

The Setup Editor Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Choosing a Script to Edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Editing the Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Adding New Actions to a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Finding Text in a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Replacing Text in a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Checking for Duplicate Files in Include Scripts . . . . . . . . . . . . . . . . . . . . . . . 68Customizing the List of Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

About User-Defined Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Creating a User-Defined Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Creating a User-Defined Action Tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

About Debug Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Using the Debug Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Building a Debug Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

Basic Scripting Concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78Conditionals and Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78Variables and Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Compiler Variables vs. Runtime Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 80Anatomy of a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81About Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

5 WiseScript Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83WiseScript Editor and Wise Installation System Script Actions . . . . . . . . . . . . 83Add Directory to PATH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Add ProgMan Icons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Add Text to INSTALL.LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Add to AUTOEXEC.BAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86Add to CONFIG.SYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87Add to SYSTEM.INI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87Allow Floppy Disk Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Browse for Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Call DLL Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Check Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Check Disk Space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Check HTTP Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Check If File/Dir Exists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Check In-use File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

4

Check Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96Compiler Variable If/Else/End . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Config ODBC Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Copy Local File(s). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Create Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Create Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Create Shortcut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Custom Billboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Custom Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Delete File(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Display Billboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Display Message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103Display Progress Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Display Text File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Edit INI File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Edit Registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Else Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107ElseIf Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107End Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Evaluate Windows Installer Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Execute Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Exit Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109Find File in Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110Get Environment Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110Get Name/Serial Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Get ProgMan Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Get Registry Key Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Get System Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112Get Temporary Filename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Get Windows Installer Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Halt Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114If Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Include Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115Insert Line Into Text File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115Install File(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116Install ODBC Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118Modify Component Size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Open/Close Install.log. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Parse String. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120Pause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120Play Multimedia File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120Post to HTTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121Prompt for Filename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122Prompt for Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122Radio Button Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Read INI Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Read/Update Text File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Read/Write Binary File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Reboot System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125Register Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125Remark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125Rename File/Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

5

Search for File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Select Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Self-Register OCXs/DLLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127Set Control Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127Set Control Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Set Current Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Set File Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Set Files/Buffers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Set Variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Set Windows Installer Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130Start/Stop Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130While Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Win32 System Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Wizard Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

6 Creating Custom Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134About the Custom Dialog Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

Adding a Dialog to the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135Editing Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Editing Dialog Templates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Setting Dialog Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137Using the Right-Click Menu in the Dialog Editor . . . . . . . . . . . . . . . . . . . . . 137

About Dialog Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Adding and Editing Dialog Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Aligning and Spacing Dialog Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152Setting Tab Order of Dialog Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

Solutions for Dialog Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155Changing the Default Graphic on Wizard Dialogs . . . . . . . . . . . . . . . . . . . . 155Disabling the Appending of the Program Files Directory . . . . . . . . . . . . . . . 155Disabling the Directory Already Exists Message . . . . . . . . . . . . . . . . . . . . . 156Keeping Disabled Controls From Reactivating . . . . . . . . . . . . . . . . . . . . . . 156Dialogs and End User Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

About Custom Dialog Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157Creating a Dialog Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157Configuring Dialog Set Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

About the Dialog Script Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159Creating a Custom Dialog Script. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159Dialog Script Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159Dialog Script Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

7 Creating Custom Billboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162Accessing the Custom Billboard Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163About the Custom Billboard Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164Opening and Saving Custom Billboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165Adding Objects to a Billboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

Editing Billboard Text Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166Editing Billboard Line Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Editing Billboard Rectangles and Ellipses . . . . . . . . . . . . . . . . . . . . . . . . . . 167Editing Billboard Polygon Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168Editing Billboard Bitmap Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168Resizing, Moving, and Aligning Billboard Objects . . . . . . . . . . . . . . . . . . . . 169

6

Setting Billboard Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

8 Advanced Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172Automating the Build Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173AutoPlay. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174About Sample Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

Using Sample Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175Sample Scripts That Perform Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177Sample Script That Searches for Files or Applications . . . . . . . . . . . . . . . . . 178Sample Scripts That Restart the Destination Computer . . . . . . . . . . . . . . . . 178Sample Scripts That Use Expression Operators . . . . . . . . . . . . . . . . . . . . . 178Sample Scripts That Use Complex Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . 179Sample Scripts That Perform Web and FTP Transactions . . . . . . . . . . . . . . . 183Sample Scripts That Call .DLLs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184Sample Scripts That Check System Configuration. . . . . . . . . . . . . . . . . . . . 184

9 Troubleshooting Installations . . . . . . . . . . . . . . . . . . . . . . . . . . . 186Using the Installation Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187File Replacement Problems in System32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

10 Quick Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189Standard Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

Automatic Compiler Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190Automatic Runtime Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190Runtime Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

Expression Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195Windows Language Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197Command Line Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

WiseScript Editor (Wise32.EXE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199WiseScript Installations (Setup.EXE). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199Uninstall (Unwise.EXE, Unwise32.EXE) . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

7

Chapter 1Welcome

WiseScript Editor is an application development system for creating and editing installation packages based on the Wise Solutions scripting language (WiseScript�). Use WiseScript Editor to edit and refine installations that you've imported from WinINSTALL installations, or that you've recreated with SetupCapture or ApplicationWatch.

With WiseScript Editor�s 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. The installation options that you define generate a script that is run when an end user installs your product.

For advanced customization, you can edit the generated installation script in the Wise scripting environment, called Setup Editor. The Wise scripting language, WiseScript, is powerful, yet easy to learn. 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 Setup Editor, and vice versa.

WiseScript Editor is available as a tool in Wise Package Studio®. For more information about Wise Package Studio, see Wise Package Studio Basics in the Wise Package Studio Help.

Topics in this section cover:

! Documentation Roadmap.

! Getting Help and Product Support.

! How to Check Online Help.

8

Documentation Roadmap

Documentation Roadmap

The WiseScript Editor documentation assumes that you are proficient in the use of the Windows operating system. If you need help using the operating system, consult its user documentation.

Use the following sources of information to learn WiseScript Editor.

Online Help

The online help contains detailed technical information and step-by-step instructions for performing common tasks. For details on using help, see Check Online Help on page 10.

Reference Manual

All the material in the online help is also available in a .PDF-format reference manual, which you can access by selecting Help menu > Reference Manual.

Getting Started Guide

The printed Wise Package Studio Getting Started Guide contains system requirements, installation instructions, and a tutorial. You can access a .PDF copy of the Getting Started Guide from Wise Package Studio by selecting Help menu > Getting Started.

Release Notes

A release notes document, in .HTM format, covers new features, enhancements, bug fixes, and known issues for the current version of this product. It also contains links to release notes for other versions. Access the release notes in the following ways:

! Browse the product CD.

! In Wise Package Studio, select Help menu > Release Notes.

! If you are a registered user, visit http://support.wise.com to enter the Support Center, and then click the Downloads link.

9

Getting Help and Product Support

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 registered Wise Solutions customer.

Check Online Help

You can access help in the following ways:

! To display context-sensitive help for the active page or dialog, press F1.

! To select a help topic from a table of contents, index, or search, select Help menu > Help Topics.

If you need help and cannot find the answer in the documentation, read about our technical support options below.

Use the Wise Solutions Technical Support Center

Registered Wise Solutions customers can use the Technical Support Center, located at www.wise.com/support.asp, to submit online support requests, register products, manage customer information, download updates, or search the Knowledgebase. The Knowledgebase contains how-to procedures, answers to common support questions, and workarounds.

Visit Our Newsgroups

Visit Wise Solutions Newsgroups at www.altiris.com/support/forum/default.asp. Newsgroup postings by your peers contain answers, tips, analysis, and other comments. Contribute your own expertise to help others.

Subscribe to TechInfo

TechInfo is a free e-mail newsletter that contains technical tips, product updates, and other important technical information. To subscribe or to read back issues, visit www.wise.com/techinfo.asp.

Ask Our Support Team

If you can�t find an answer in our online resources, you can obtain support by phone or online at www.wise.com/support.asp. Wise Solutions offers flexible payment options to meet your support needs. For additional details about our support services, visit www.wise.com/supportoptions.asp or call 1-734-456-2600.

Before you contact technical support, obtain the following:

! Serial number and product version, which you can find by selecting Help menu > About.

! Operating system version and service pack version if applicable.

! A description of what you do before the problem occurs.

! The text of any error messages that appear.

! Your name, company name, and how to contact you.

! Contract number or payment information, if applicable.

Take Advantage of our Consulting and Training Services

When you have a challenging repackaging or installation problem, turn to Wise Solutions. Our consultants can help with script writing, repackaging, installation

10

Getting Help and Product Support

development, and other solutions that are fully customizable to fit your project and budget. Visit www.wise.com/consulting.asp for details.

To upgrade your installation and packaging skills, consider Wise Solutions training. Our certified instructors draw from practical experience to provide relevant course content. Visit www.wise.com/training.asp for course descriptions and schedules.

Contact Wise Solutions Sales

Contact Wise Solutions� Sales department to purchase additional products, upgrades, support services, or consulting and training services.

U.S.: 1-800-554-8565

Europe/Netherlands: +31 70 392 72 20

Other International: 734-456-2100 (in U.S.)

Web Site: www.wise.com/ordercentermain.asp

11

Chapter 2WiseScript Editor Basics

Read this overview before you create an installation. It discusses the process of creating and maintaining installations.

Topics include:

! WiseScript Editor Views.

! Creating a New Installation.

! Installation Management.

! Customizing Your Development Environment.

12

WiseScript Editor Views

WiseScript Editor Views

WiseScript Editor has two views, Installation Expert and Setup Editor, which provide different development environments. Installation Expert lets you build an installation by pointing and clicking to fill out options. Setup Editor lets you develop more complex installations using WiseScript, an easy-to-learn scripting language. These two views are interrelated. As you build an installation using Installation Expert, a script is also created in Setup Editor. Example: When you add a new file to the installation using Installation Expert, a line appears in the script with installation instructions for that file. When the installation is run, the script installs the file.

Navigating Between ViewsTo navigate between Installation Expert and Setup Editor, click the navigation buttons at the bottom left.

You might see the following messages when navigating:

! 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.

This message appears if you create a custom script from scratch in Setup Editor, then attempt to switch to Installation Expert. Click No to preserve the custom script.

! 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 Setup Editor instead.

This message appears if you open a custom script while in Installation Expert view. To safely view Installation Expert without converting your script, select Edit menu > Installation Properties from Setup Editor, or press Ctrl+Z. When Installation Expert opens, only the pages that do not affect the script appear.

13

Getting Started

Getting Started

Following is a broad outline of possible steps for building and distributing an installation:

1. Create a new installation. See Creating a New Installation on page 14.

2. Set options on the Installation Expert pages to create basic installation functionality. See Using Installation Expert on page 15 and Installation Expert Pages on page 26.

3. Edit the script in Setup Editor to create advanced installation functionality. See Setup Editor on page 62 and WiseScript Actions on page 83.

4. Create or modify dialogs. See Creating Custom Dialogs on page 134.

5. Test and debug the installation. See Compiling, Testing, and Running the Installation on page 16 and Using the Debug Commands on page 75.

6. Explore options for outputting the installer .EXE file and prepare it for distribution. See Media on page 43 and WebDeploy on page 58.

7. Use the Package Distribution tool in Wise Package Studio to distribute the installation into a variety of formats. To simply create a compiled .EXE, click Compile. See Package Distribution in the Wise Package Studio Help.

Creating a New InstallationWiseScript Editor is a tool in Wise Package Studio that creates installations or custom .EXEs that can be run during another installation. When you create a new installation, you can start with an installation template or a blank script. With a template, the basics of an installation are configured. With a blank script, you build an installation or custom .EXE entirely in Setup Editor by using the Wise scripting language (WiseScript).

1. In Wise Package Studio, do one of the following:

� On the Projects tab, click the Run link to the right of the task or tool associated with WiseScript Editor. The installation associated with the current project might open by default. This tool might open to a different view based on command line options defined in Process Templates Setup.

� On the Tools tab, double-click WiseScript Editor.

2. Select File menu > New.

The New Installation File dialog appears.

3. Select the Empty Project icon.

The Empty Project icon creates an installation project file with a predefined script that has most of the elements of an installation already scripted.

Project files do not store the files you add to an installation but the paths to the files. If you move files, the pathnames will break. For information on how to fix broken pathnames, see Changing Source Directories on page 18.

NoteThe Blank Script icon creates a blank script, which you code from scratch. If you select it, you cannot see all the pages in Installation Expert. See Navigating Between Views on page 13.

4. Click OK.

The installation opens, and you can edit it on the pages in Installation Expert or by adding script actions in Setup Editor.

14

Getting Started

Opening a Microsoft SMS InstallationYou can open Microsoft SMS files (.IPF) and edit them just as you edit .WSE files. For information about SMS, visit www.microsoft.com and search for SMS.

1. Select File menu > Open.

The Open dialog appears.

2. In Files of Type, Select SMS Installer Files (*.IPF).

3. Specify the .IPF file.

The installation script appears in Setup Editor. Edit and compile the file in the same manner as a .WSE file.

Using Installation ExpertTo display Installation Expert, click Installation Expert at the bottom of the WiseScript Editor main window.

Each page of Installation Expert controls a specific aspect of the installation. On the Files page, you determine what files are included in the 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 and listed in the order in which you usually use them. However, you can fill out pages in any order and use only those you need. You can create a customized view of page groups and pages as described in Customizing Installation Expert Page Groups on page 21.

Use ( ) in the toolbar to navigate from page to page, or click the page name in the

list of pages. To expand or collapse a page group, click its name. To return a page to its last saved state, select Edit menu > Reset Page.

When you select different page names, this area changes to display the page�s options.

Page groups with pages.

Click to compile, test, and run an installation.Click to change views.

15

Getting Started

Using Setup EditorAs you specify settings in Installation Expert, WiseScript Editor generates a WiseScript with the steps to be performed by the installation. Setup Editor provides actions that duplicate functionality in Installation Expert, as well as additional actions that aren�t possible with Installation Expert alone.

Installation Expert and Setup Editor are simply different views of the same installation, providing a different development environment. Use Setup Editor to tweak the installation you built in Installation Expert, or to build an entire installation or utility program from scratch. It is also useful for troubleshooting installations using built-in debugging tools such as breakpoints and single-stepping. A set of tabs at the bottom of the Installation Script pane let you quickly switch between include scripts.

Add script lines by double-clicking an action, and then selecting options for the action on a dialog. The script is displayed in English-like terminology to help with testing and troubleshooting. For details, see Setup Editor on page 62 and WiseScript Actions on page 83.

Compiling, Testing, and Running the InstallationTo test an installation use the Compile, Test, and Run buttons at the bottom of the main window.

NoteYou can also use Setup Editor�s debugging functions to test the script. See About Debug Commands on page 75.

Click to compile, test, and run an installation.Click to change views.

The Installation Script contains the commands to be executed when you run the installation.

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

List of available script actions. Double-click a script action to insert it in the script.

Include script tabs. Click tabs to switch between scripts.

16

Getting Started

! CompileClick Compile to build a single executable file that contains the installation script as well as all the files needed for the installation. This is the installer .EXE that you distribute to end users. If any files are absent or not readable, error messages appear when compiling. The installation is saved each time you compile unless you mark the Prompt to Save checkbox in Preferences; see Setting Preferences on page 23.

! TestClick Test to compile and run the installation in test mode. In test mode, the installation performs all script actions without actually installing or modifying files. However, if any script lines are dependent on files being installed by previous script lines, then test mode might fail. Example: If an Install File(s) line copies a ReadMe to the Temp directory and a second script line attempts to launch ReadMe, the second script line fails because the ReadMe is not in the Temp directory.

! RunClick Run to execute the installation. The entire installation is executed just as it would be on the destination computer.

17

Installation Management

Installation Management

There are several management tools to help maintain installations:

! To globally change source file directories, see Changing Source Directories on page 18.

! To change the format of pathnames, see Converting to UNC-Based Source File Paths on page 18 and Converting to Relative Source File Paths on page 19.

! To use self-repair, which enables an application to repair itself, see Using Self-Repair on page 19.

Changing Source DirectoriesWhile creating an installation, you might change the directory structure on your computer, which can cause the paths to files on the Files page to become invalid. This can happen if you move:

! Files that are part of the installation to a new directory on your computer or network.

! The installation file (.WSE) from your computer to another computer.

! The installation file (.WSE) and use relative pathnames.

If the paths are invalid, you see messages when compiling 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.

1. Select Edit menu > Source Directories.

The Change Source Directories dialog appears with a list of all the directories referenced in the installation.

2. Select 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. If you have moved the entire directory tree containing the installation files, you might only need to edit the root directory to change all the references.

4. Mark Change Sub-Directories to update the paths of all the files in the sub-directories of the directories you�re changing.

5. When you are done editing directories, click OK.

All parts of the installation that reference these directories are updated.

Converting to UNC-Based Source File PathsYou 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 by converting mapped drive paths to standard UNC-based paths.

Example: If you add files to an installation from your Y:\ drive, which is mapped to a file server, the paths in Setup Editor appear starting with Y:\. If a co-worker opens and compiles your script on another computer that doesn�t have its Y:\ drive mapped to the same file server, the compilation fails because the script cannot find the source files on the Y:\ drive. However, if you first convert all network paths to UNC-based paths, co-workers on the same network can open and compile your script without encountering errors.

1. Select Edit menu > Source Directories.

18

Installation Management

The Change Source Directories dialog appears with a list of all the directories referenced in the installation.

2. From Type, select Change source paths to UNC paths, and click OK.

A warning appears because this action cannot be undone.

3. Click Yes.

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

Converting to Relative Source File PathsYou can convert the paths of source files to relative paths. You might do this to keep the source files in a central version and source control system, such as Microsoft Visual SourceSafe. In Microsoft Visual SourceSafe, if you copy the installation files to a different directory each time you perform a Get, you can use this feature to ensure that the paths stay valid, though the directory structure changes.

A relative pathname uses .\ to indicate the current directory, and it uses ..\ to indicate one directory up. All paths are relative to where the installation (.WSE) file is located.

1. Select Edit menu > Source Directories.

The Change Source Directories dialog appears with a list of all the directories you have referenced in the installation.

2. From Type, select Change source paths to relative paths, and click OK.

A warning appears because this action cannot be undone.

3. Click Yes.

Converting paths to relative paths does a one-time conversion of all the relative paths in the 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 Type is set to Change source paths to relative paths, all files you add subsequently are converted to relative paths. If you change Type back to Do not modify source paths, the converted pathnames stay converted, but new files you add do not have relative paths.

Using Self-RepairYou can enable an application to repair itself. There are two ways to implement repair. One is passive, and is included in every installation you create. The other is proactive, and requires you to define files and registry entries that are crucial to the application. When these files or registry entries are absent and the application is launched via its shortcut, a self-repair process is initiated.

Both self-repair and uninstall can only be run under the same user account under which the application was originally installed. During self-repair, the installation re-edits the registry, re-edits or recreates .INI files, reinstalls all files, and re-self-registers files. Self-repair works only if the destination computer is running a Win32 operating system.

Application Repair Initiated by the End UserEvery installation you create contains a repair option available to the end user. It is part of the uninstall wizard.

19

Installation Management

To run this repair option, the end user chooses the application in the Add/Remove Programs Control Panel and chooses the Repair option. If files need to be reinstalled, the end user is prompted for the media or network location of the original installation.

Configuring an Application for Automatic Self-RepairYou can configure any installation you create for automatic self-repair. The advantage of automatic self-repair is that it does not depend on the end user to initiate it. Whenever the end user launches the application via its shortcut, files and registry entries that you specify are checked. If they are missing, the end user is prompted to repair the application. If files need to be reinstalled, the end user is prompted for the media or network location of the original installation.

To configure you application for self-repair, follow these general steps:

1. Determine the files and registry entries that are crucial for the application to run properly.

During the application�s launch, these files and registry keys are checked, so limit the number of items to check to prevent the launch time from increasing.

2. On the details dialogs for each of these files and registry entries, mark the checkbox that flags them 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. On the Install File Settings dialog, mark Repair application if this file is missing.

� For a registry entry, double-click the value in the lower right list box on the Registry page and mark Repair application if this registry value is missing on the dialog that appears. In Setup Editor, multiple registry values are contained in one Edit registry keys script line. Double-click the Edit registry keys script line, navigate to the required registry value and select it, then mark Repair application if this registry value is missing.

3. Create a shortcut that runs the application, either on the Shortcuts page in Installation Expert or with the Create Shortcut script action in Setup Editor. While filling out the Shortcut Details dialog, mark Check self-repair items when this shortcut is opened. See Shortcuts on page 51 or Create Shortcut on page 101.

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 the 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 opens the application. The end user sees none of this, and if the number of required items is few, the extra time to launch is negligible. If the required items are not present, 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.

20

Customizing Your Development Environment

Customizing Your Development Environment

You can customize your development environment to fit the way you work:

! Create your own installation templates so that each time you create a new installation, options you set frequently are already pre-configured. See Creating and Editing Installation Templates on page 21.

! Change the page groups by either selecting a pre-defined view of page groups or creating your own view.

! Change prompts and error messages displayed by the installation.

! Set preferences for Setup Editor and the compiler.

! Set the actions list in Setup Editor to display only those actions you use most frequently and add your own actions to the list. See Creating a User-Defined Action on page 70.

! Change the dialogs that display during installation by editing default dialogs. See Editing Dialog Templates on page 136.

Creating and Editing Installation TemplatesWhen you create a new installation, it gets its configuration from a template file. Predefined templates contain logical defaults and commonly used settings. You can also create your own templates. Example: If all your installations have the same system configuration requirements and document file extensions, you can create a template with all these changes preconfigured.

1. Select File menu > New.

The New Installation File dialog appears.

2. Select Empty Project and click OK.

3. Make all the changes that should appear in installations created with this template.

4. Select File menu > Save As and name and save the installation (.WSE) file in the Template directory.

The template directory is in the WiseScript Editor application directory.

CautionPredefined templates are read-only. Editing them is not recommended, because they might be overwritten during upgrades. Instead, save customized templates with new names.

5. To test your new template, select File menu > New.

The New Installation File dialog appears and includes the template you just created.

6. Select the template and click OK.

7. Verify that the changes you made in the installation template are present in this new installation file.

Example: If you changed the screen color, go to the Screen page and verify that the screen preview displays the new color screen instead of the default blue screen.

Customizing Installation Expert Page GroupsBy default, Installation Expert displays all page groups and all pages within each group.

From the Pages menu, you can select one of the following page groups:

21

Customizing Your Development Environment

! AllDisplays all page groups and all pages associated with each group.

! PropertiesDisplays only the pages that do not add or change script lines in the script. This page group also appears when you select Setup Editor > Edit menu > Installation Properties.

You can add your own sets of page groups to the Pages menu. This lets you customize your work environment so you only see the pages you frequently use. You can edit any set of page groups you create, but not the predefined sets. You also cannot edit page names.

1. Select Pages menu > Customize.

The Customize Pages dialog appears.

2. From Name, select <new>.

3. On the dialog that appears, specify a name for your new set of page groups. Include an & before a letter to set it as a keyboard shortcut.

The name appears in the Name drop-down list.

4. To add a new page group, click the Add button on the left and specify a name for the page group.

The name appears in the Page Groups list.

5. To add a page to a page group, select the page group, and click the Add button on the right.

The Select Pages to Add dialog appears.

6. Select the page or pages and click OK.

7. Add more page groups and pages as appropriate.

8. Click OK.

Your new set of page groups appears under the Pages menu.

Buttons for editing page groups. They are disabled for the predefined sets of page groups.

Buttons for editing pages. They are disabled for the predefined sets of page groups.

Pages in the selected page group.

Defined page groups.Customized page groups appear here.

22

Customizing Your Development Environment

Changing Installer MessagesYou can edit prompts and error messages displayed by an installation. Editing the installation messages modifies the wise.ini file, which is located in the system directory. To back up the text strings, back up the wise.ini file before editing installer messages.

To change wording in a non-English dialog, choose the language from the Language drop-down list under the toolbar in Setup Editor, and then double-click a Custom Dialog statement. The Language directory, located in the WiseScript Editor application directory, contains text for the uninstaller dialogs.

1. To edit the installation messages, select Edit menu > Installer Messages.

The Installer Messages dialog appears.

2. Complete the dialog:

� Language NameThe name of the language as it appears in WiseScript Editor.

� Translated NameThe name of the language as it will appear in installations you create.

� Language CodeA three-letter code that matches the Windows-defined language to WiseScript Editor. See Windows Language Codes on page 197.

� MessagesSelect the message to edit.

� Message TextEnter or edit the message here.

� Select Language DialogWhen end users run an installation that supports multiple languages, the first dialog that appears is a Select Language dialog, where they choose the language they want.

" Dialog TitleThe title of the Select Language dialog.

" Dialog TextThe text that appears on the Select Language dialog. If the installer supports multiple languages, enter instructions in all supported languages here.

Setting PreferencesIn Preferences, customize options for script development and compiling. Also specify .DLLs to ignore for ApplicationWatch and the Import Visual Basic Project tool.

1. To access Preferences, select Edit menu > Preferences.

2. Complete the dialog:

� Prompt to SaveMark this to have Setup Editor prompt you to save the installation script each time you build a new installer .EXE. If you do not mark this checkbox, the script is always saved before compiling.

� Prompt for Changed Compiler VariablesMark this to receive a warning if the compiler variables _WISE_ or _ODBC32_ have changed from the last time the installation script was opened.

Example: If you develop an installation script where the WiseScript Editor application directory is C:\Wise, the compiler variable _WISE_ is set to C:\Wise. If you then open the same script on a different computer, where the application

23

Customizing Your Development Environment

directory is C:\Program Files\Wise, then you are prompted to redefine the compiler variable _WISE_ to the new WiseScript Editor application location. Compiler variables are set on the Compiler Variables page.

� Add Associated Icons and Registry KeysIf you mark this, when you add a file on the Files page in Installation Expert, icons and registry keys that are associated with that file are added also.

� Append New Script LinesIf you mark this, when you add a new script action in Setup Editor, it is inserted after the currently selected script line, rather than before.

� Listbox Compatible ModeIf your computer has certain video drivers, you might have problems selecting items from list boxes within WiseScript Editor. If items you choose from list boxes are continually misinterpreted, mark this checkbox to eliminate list box problems.

� Create Backup Copy During SaveMark this to create a new backup file every time you save. The names of the backups are the current file name plus a number. (Example: If the current file name is Application.wse, the backups are Application1.wse, Application2.wse, and so on.) Use caution with this checkbox because a new file is created every time you save. This option can also be set from Wise Package Studio Preferences; use this checkbox to override the Package Studio setting.

� Show Tabs for Wise Include ScriptsMark this to show tabs for Wise Solutions� include scripts in Setup Editor.

� Color SelectionSelect the colors for the types of script actions recognized by Setup Editor. Select the type of script action, then click Set Color to select the color.

� Suppress Version ErrorMark this to suppress errors that normally occur when version checking is performed on files that do not have version resources.

� Background ProcessingMark this to allow other applications to run when compiling. This slows compiling by about 50%. If cleared, user input is ignored when compiling.

� Smart CreateMark this to rebuild the installer .EXE whenever any file in the installation changes. If this is marked, the time you wait after clicking the Run button increases slightly because the compiler checks the modified dates and sizes of all files in the installation to determine if they have changed. Mark this checkbox only when testing and clear it for the final build.

� Fast CreateMark this to speed up compiling 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. Mark this checkbox only when testing and clear it for the final build.

� Run in Manual ModeMark this to have the installer .EXE prompt for the locations of all directories to be used for installations (Windows, System, and so on) whenever the installer is run from within WiseScript Editor.

� Shared DirectoryNormally, user-defined actions are stored in WiseScript Editor�s 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

24

Customizing Your Development Environment

appear in the Actions list in Setup Editor in addition to the ones in the Actions sub-directory.

� System .DLLs to ExcludeEnter the names of .DLL and .OCX files that should not be included when you create a .WSE file with ApplicationWatch or Import VB Project from Wise Package Studio. Enter one file name on each line with no other delimiter. Example: If you are watching a Visual Basic application, you could ignore VBRUN300.DLL because that file is accessed by Visual Basic applications, but is not necessarily installed with the Visual Basic application.

25

Chapter 3Installation Expert Pages

In Installation Expert, the pages are organized into logical groups and listed in the order in which you usually use them. For quick reference, the pages here are arranged alphabetically. See Using Installation Expert on page 15.

Active DirectoryUse the Active Directory page to create a .ZAP file. You need a .ZAP file to distribute .EXEs through Microsoft Active Directory. The .ZAP file is created in the same directory as the installation .EXE. Microsoft Active Directory uses the information in the .ZAP file to distribute the .EXE.

NoteComplete the Product Details and Add/Remove pages before completing the Active Directory page. Three of the fields on the Active Directory page obtain their values from fields on those pages.

! Do Not Create Zap File During CompileMark this to create an installation without a .ZAP file.

! Create Zap File During CompileMark this to add a .ZAP file to the installation and enable the following fields:

� Friendly NameThis field obtains its value from the Installation Title field on the Product Details page.

� Command Line(Optional.) Enter a command line to apply to the installation .EXE. For information on command line options, see WiseScript Installations (Setup.EXE) on page 199.

� Display Version(Optional.) This field obtains its value from the Software Version field on the Add/Remove programs page.

� Publisher(Optional.) This field obtains its value from the Publisher field on the Add/Remove Programs page.

To distribute the .ZAP file with the installation using Package Distribution in Workbench, select Network and Installation (.exe) on the Distribution Method dialog. If you distribute the installation to the share point directory and import it into Software Manager, the installation and the .ZAP file are copied to the share point Available Packages directory when you change its status to Available.

26

Add/Remove ProgramsWindows 2000 and Windows XP have an Add/Remove programs window that supports a rich display of application information. Use the Add/Remove Programs page to enter the information necessary to support these capabilities.

NoteThe Add/Remove Programs page applies only when the application is installed on the Windows 2000 or XP platform.

! Display IconSelect an icon to appear next to the application name in the Add/Remove Programs window. Click Browse to select a file from the installation.

! Icon NumberEnter the resource index for the icon in the selected .EXE or .DLL file.

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

! Hide Change/Remove buttonMark this 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.

! PublisherEnter the name of the company that publishes the application.

! Contact PersonEnter the name of a person or department that end users can contact if they have questions. Examples: a support technician or the support department.

! Phone NumberEnter the phone number of the contact person specified above.

! Online Support URLEnter a URL where end users can get online support for the application.

! Software VersionEnter the version number of the application.

! Help URLEnter the path to a help file that will be installed on the destination computer.

! CommentsEnter any additional comments for the end users.

Autoexec.batUse the Autoexec.bat page to specify command lines to add to the destination computer�s AUTOEXEC.BAT file during installation. If the AUTOEXEC.BAT file changes, the end user is prompted to restart the computer to initiate the changes.

! Directory to add to PATHEnter the pathname of the directory to be added. To build the directory path, use one of the built-in WiseScript Editor runtime variables. Example: %MAINDIR% for the

27

Application directory or %SYS% for the Windows System directory. See Compiler Variables vs. Runtime Variables on page 80.

! Location of new directorySpecify whether the installation should place the new directory at the beginning or at the end of the PATH variable.

! Path selectionSpecify whether the installation should edit just the first PATH statement in the AUTOEXEC.BAT file or all path statements.

! Commands to add to AUTOEXEC.BATThis section lists commands to be added to the AUTOEXEC.BAT file.

To add a command line to the AUTOEXEC.BAT file, click Add and enter the command line on the dialog. To specify how to add the command line to the AUTOEXEC.BAT file, select it and click Details. See Specifying How to Add Commands AUTOEXEC.BAT. To remove an existing command line, select it and click Delete.

Specifying How to Add Commands AUTOEXEC.BATThis dialog lets you specify how a command line is added to the AUTOEXEC.BAT file: at a specific line number or by searching for specific text.

1. Select Installation Expert > Autoexec.bat page.

2. Double-click a command line.

The Add Command to AUTOEXEC.BAT dialog appears.

3. Complete the dialog:

� Text to InsertEnter the line to add to Autoexec.bat. If the line refers to an application file, use a pathname (example: %MAINDIR%\Application\Application.exe). The PATH variable might not be set when the command is executed, so always use a pathname.

� Line NumberEnter the line number at which the new line should be inserted. Enter 0 (zero) to append the command to the end of the file. The Search for Existing Text area in this dialog overrides the line number specified here. The line number applies only when the text is not found or when you do not specify any text.

� Search for TextEnter the text to search for here. The installation scans Autoexec.bat looking for a line that begins with, ends with, or contains the text, depending on what you set in Match Criteria. The line is inserted at the first found match.

� Comment TextEnter text to insert at the beginning of the line that is found. Insert �REM � (with the trailing space but without the quotation marks) to comment out the line, which lets you replace an existing command with a new command while leaving the existing command in place but inactive. If this is the case, set Insert Action to insert before the existing line so that a subsequent installation finds and edits the active command, not the commented line.

� Insert ActionSelect where to insert the new line in relation to the found line.

� Match CriteriaSelect how the found line matches the Search for Text.

� Ignore White SpaceMark this to ignore spaces and tab characters.

28

� Case SensitiveMark this to match case.

� Make Backup FileMark this to make a copy of Autoexec.bat before editing it.

4. Click OK.

Build SettingsUse the Build Settings page to specify options for compiling the installation.

! Maximum CompressionMark this to make the installation file as small as possible before compiling an installation for distribution. Since it takes longer to compile an installation when maximum compression is enabled, disable it during development.

! Use Internal 3D EffectsThis causes the installation to display 3D-style dialogs and controls, even if the destination computer does not have the CTL3D.DLL file. This option is applicable only when installing to a 16-bit Operating System. If you select TrueWin32 from Destination Platforms, this option is disabled.

! No Reboot Message During Silent InstallsNormally, when an installation is run in silent mode, it displays a message that the system must be restarted after installation. Mark this to not display the warning message and to reboot the system without warning. You can run an installation in silent mode by running it from the command line and adding a /s option.

! Create Windows Me System Restore SnapshotsMark this to have the installation add system snapshot entries to the Windows Millennium (Me) System Restore utility. This lets end users restore their system to the state it was in before the application�s installation. The installation takes longer to perform when this is marked. This works only if you enable it in the Windows Millennium operating system.

! Replace In-Use FilesMark this to have the installation force the replacement of in-use files by performing a reboot of the system. Otherwise, the end user is notified that the installation cannot be completed and the installation aborts.

! Convert CD-ROM to FloppyWhen creating a CD-ROM-based installation, you can use the Copy Local Files script action to copy files from the CD-ROM to the end user�s hard disk, rather than embedding these files in the installer .EXE. Mark this to have these files included in the installer .EXE so the installation can be placed on floppy disk(s). (You can exclude individual Copy Local Files script actions from conversion by marking their Don�t Convert To Floppy checkbox. See Copy Local File(s) on page 98.)

! Beep on New Disk PromptMark this to cause the compiled installation to beep when requesting a new disk.

! ZIP CompatibleMark this to make the compiled installation compatible with the ZIP archive format. If you make the installation ZIP compatible, end users can extract files from it using any unzip utility, such as WinZip. They must open the installation by selecting File menu > Open in the ZIP utility. Double-clicking the installation launches it normally.

! Network InstallationMark this if you are creating a network installation and want to reduce network traffic. If this is marked, a CRC (Cyclic Redundancy Check) is performed on existing files. If the file exists and is identical to the new installation file, the file is not copied

29

down, reducing traffic. However, because CRC checks are time-intensive, this can slow down the installation, so limit this option to installations that are performed without end user intervention.

! Destination PlatformsSelect the operating system for running the installation.

� Windows 3.1x, 95, and NT (Win16/Win32)The installation can run under both Win16 and Win32 but is slower.

� Windows 95 and NT (True Win32)The installation can run only under Win32 but is faster.

For the Pathname fields, click Browse to simplify path and file selection.

! Installation .EXE NameSpecify a name and location for storing the executable file after it is compiled. If left blank, the name of the installation executable defaults to the name of the installation file (*.WSE).

! Language .INI NameTo use a language that is not built into WiseScript Editor, specify the path to an .INI file that contains translation resources.

! Setup Icon PathnameSpecify the path to the icon to be used for the installation .EXE file.

! Dialogs DirectoryIf you created a directory containing customized versions of dialogs and dialog templates, specify the path to that directory.

! Temp. Files DirectorySpecify the path to a directory where WiseScript Editor can store temporary files while building the installation. If this directory is not specified, the Windows temporary directory is used.

Compiler VariablesUse the Compiler Variables page to set compiler variables that change the compiled setup program. There are many uses for compiler variables. You could use a compiler variable to determine which files are included in the compiled .EXE file or to create either a Win16 or a Win32 version of the application. You could also use them to build a debug version of the installation, see Building a Debug Version on page 76.

To see a sample script that uses compiler variables, open the file COMPVAR.WSE from the Samples directory in the WiseScript Editor application directory. See Creating an Installer That Can Be Customized During Compile on page 177.

When you reference a compiler variable name in the script, you must surround the name with percent signs. (Example: %_DEBUG_%.) For information about variables, see Variables and Expressions on page 79. For automated build processes, you can specify compiler variable values from the command line, by entering the value directly on the command line or by storing the values in a text file. For information on using command lines, see WiseScript Editor (Wise32.EXE) on page 199.

To add a compiler variable, click Add and complete the Compiler Variable Settings dialog. This dialog also appears if you double-click a variable to edit it. See Setting Compiler Variable Settings. To remove a variable, select it from the list and click Delete.

There are 2 options for being prompted for compiler variables:

! Compiling from Command LineMark this to be prompted for the value of compiler variables when you compile an installation from the command line.

30

! Compiling from Within WiseMark this to be prompted for the value of compiler variables when you compile an installation from WiseScript Editor. If you mark this, then a Select Compile Settings dialog appears at compile time that lists this compiler variable�s values. A dialog appears for each compiler variable you define. Value length is limited by the amount of text that displays on the dialog. The Do not prompt for value checkbox on the Compiler Variable Settings dialog overrides this setting.

Setting Compiler Variable Settings1. Select Installation Expert > Compiler Variables page.

2. Click Add.

The Compiler Variable Settings dialog appears. Use it to set compiler variable properties.

3. Complete the dialog:

� Variable NameEnter the name of the compiler variable. By convention, compiler variables begin and end with an underscore (_) character. Although Installation Expert does not enforce this convention, it is useful when reading scripts to be able to distinguish between compiler variables and regular script variables.

� Default ValueEnter the default value of the compiler variable.

� DescriptionEnter a brief description of how the variable is used. This information appears on the dialog when you are asked to choose a new value for the variable.

� Value ListFor 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 76.

� Data Entry TypeChoose 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 ValueIf this is marked, you are not prompted for the value of this variable when compiling an installation even if Prompt for Compiler Variables is marked on the Compiler Variables page. Mark this for variables you do not expect to change frequently.

4. Click OK.

ComponentsUse the Components page to add components to the installation. Components let you add optional pieces, such as a spell checker, a tutorial, sample files, and other add-ons. When the installation is run, end users can choose which components they want to include. For information on building a component-based installation, see Letting the End User Select Components and Subcomponents on page 182.

The current set of components is shown on this page in the same order that the components are listed in the installation. Any component that is marked as being installed by default is enabled in the component list during installation. (The end user can still deactivate this component.)

31

Use the buttons to the right of the list to add, edit, delete, or rearrange components. The Component Details dialog appears, if you click the Details or Add button. This dialog lets you name or rename the component and specify whether it should be installed by default. To remove a component select it and click Delete.

If you use components in an installation, you must assign the appropriate program files to each component on the Files page.

Once created, the component is added to the Components drop-down list in Installation Expert. Selecting a particular component from this list indicates that the settings you make apply only to that component and are implemented only if that component is installed.

NoteWhen an end user selects one or more optional components to be installed, a letter corresponding to each component is placed in a variable called COMPONENTS. Selecting the first component places an �A� in the variable, the second adds a �B,� and so forth. You can add up to 26 components this way. You can edit the installation script and use conditional statements to determine which files are installed when each component is selected.

Config.sysUse the Config.sys page to specify command lines to be added to the destination computer�s CONFIG.SYS file during installation. If the CONFIG.SYS file changes, the end user is prompted to restart the computer to initiate the changes.

To add a command line to the CONFIG.SYS file, click Add and enter the line on the dialog. To specify how to add the command line to the CONFIG.SYS file, select it and click Details. See Specifying How to Add Commands to CONFIG.SYS on page 32. To remove an existing line, select it and click Delete.

Specifying How to Add Commands to CONFIG.SYSYou can specify how a line is added to the CONFIG.SYS file: at a specific line number or by searching for a specific piece of text.

1. Select Installation Expert > Config.sys page.

2. Double-click a command line.

The Add Command to CONFIG.SYS dialog appears.

3. Complete the dialog:

� Text to InsertEnter the line to add to Config.sys. If the line refers to a file, use a pathname. Example: %SYS%\Application.DLL. %SYS% refers to the active system folder.

� Line NumberEnter the line number at which the new line should be inserted. Enter 0 (zero) to append the command to the end of the file. The Search for Existing Text area in this dialog overrides the line number specified here. The line number applies only when the text is not found or when you do not specify any text.

� Search for TextEnter the text to search for here. The installation scans Config.sys looking for a line that begins with, ends with, or contains the text, depending on the setting of the Match Criteria field. The line is inserted at the first found match.

32

� Comment TextEnter text to insert at the beginning of the line that is found. Insert �REM � (with the trailing space but without the quotation marks) to comment out the line, which lets you replace an existing command with a new command while leaving the existing command in place but inactive. If this is the case, set Insert Action to insert before the existing line so that a subsequent installation finds and edits the active command, not the commented line.

� Insert ActionSelect where to insert the new line in relation to the found line.

� Match CriteriaSelect how the found line matches the Search for Text.

� Ignore White SpaceMark this to have the search operation ignore spaces and tab characters.

� Case SensitiveMark this to ignore spaces and tab characters.

� Make Backup FileMark this to make a copy of Config.sys before editing it.

4. Click OK.

DevicesThe Devices page lets you define device drivers to be installed under Windows 3.1x and Windows 9x. The specified devices are added to the [386Enh] section of the System.ini file. The driver usually has one of the following file extensions: .386, .drv, .vxd, or .sys. The driver file must already be added to the installation on the Files page.

1. Select Installation Expert > Devices page.

2. Click Add.

The Select File from Installation dialog appears.

The list on the left displays the installation�s components with their directories. The list on the right displays the device files in the selected directory.

3. To add a device to System.ini, select it from the list on the right and click OK.

To remove a device driver from the installation, select it from the list and click Delete.

If you choose a device driver that is part of an optional installation component, the System.ini entry is added only if that component is installed.

DialogsUse the Dialogs page to choose and edit the dialogs that make up the wizard end users navigate through during installation. The dialogs you choose determine the level of control the end user has over the installation. The wizard dialogs include:

! WelcomeWelcomes the end user to the installation, suggests exiting other running applications, and warns of the software copyright.

! ReadMeDisplays the ReadMe file for the application. When you select this dialog, the Pathname field is enabled in the Settings section where you specify the .TXT file for the Readme text.

! Branding/RegistrationPrompts for the end user�s name, company name, and, optionally, a serial number.

33

! Destination DirectoryLets the end user choose a destination directory for the installation. The directory the end user chooses is stored in the variable %MAINDIR%.

! Backup Replaced FilesLets the end user choose whether to back up files that are replaced during the installation and where to store the backups.

! Select ComponentsLets the end user choose which optional components to install.

! Select Icon Group NameLets the end user choose the group name for icons installed in the Program Manager or Start menu.

! Start InstallationGives the end user a final chance to cancel the installation before installation begins.

! FinishedThis dialog informs the end user that the software was successfully installed.

Adding and Editing Dialogs

To add a dialog:1. Select Installation Expert > Dialogs page.

2. Click Add.

The Dialog Box Properties dialog appears.

3. Name the new dialog and set its default properties.

4. Click OK.

The Custom Dialog Editor opens. For information on using the Custom Dialog Editor, see Creating Custom Dialogs on page 134.

5. Configure the new dialog.

6. Close Custom Dialog Editor.

The new dialog is added to the Dialogs page.

To edit a dialog:

1. Select Installation Expert > Dialogs page.

2. Mark the dialog�s checkbox and click Edit.

The Custom Dialog Editor opens. For information on using the Custom Dialog Editor, see Creating Custom Dialogs on page 134.

3. Edit the dialog.

The changes you make affect only the dialogs in this installation.

Digital SignatureUse the Digital Signature page to add an Authenticode digital signature to an installation so its integrity and authenticity can be verified. You must have a valid VeriSign commercial certificate to use this feature. For information about digital signatures, visit the VeriSign Web site at www.verisign.com and search for authenticode. The digital signature protocol of Internet Explorer 4.0 is used.

You have 2 options for adding a digital signature:

34

! Add a digital signature externallyMark this to leave space in the installation for a digital signature without actually adding it to the installation. This is useful if the installation must be digitally signed under a higher security environment by a different individual. Extra space is reserved to allow for the digital signature information. If an installation does not have extra space (approximately 5K), and a digital signature is added, errors occur when CRC checks are performed because of the resulting size increase. This option eliminates those errors.

! Add a digital signatureMark this to add a digital signature to the installation and to enable the following fields:

� Web URLEnter your company�s Internet Web address.

� Descriptive NameEnter the name of your application. This name is embedded in your Authenticode certificate to let end users verify the name of the software they are installing.

� TimeStamp URLSelect or enter the URL you use for your timestamping service. Timestamping lets end users distinguish between a certificate that�s expired but was valid when it was used to sign the installation, and a certificate that was used to sign an installation while it was expired. The timestamping service must be available to build the installation but does not need to be available to the end user running the installation.

� Credentials File, Private Key FileSpecify your VeriSign credentials file and private key file. They must be located in the Windows directory.

File AssociationsUse the File Associations page to associate a file extension with an application that can open a file with that extension. Example: If your application generates documents with a unique file extension, you can associate that file extension with your application. Then, when an end user double-clicks that document file, the operating system launches the associated program and opens the file.

To add a file association:

1. Select Installation Expert > File Associations page.

2. Click Add.

The Select File from Installation dialog opens.

3. At the bottom of the dialog, enter the three-letter document extension of the file type.

4. In the left list box, select the directory containing the program file to associate with this file type.

The names of all .EXE files in that directory display in the right list box.

5. Select the program file to associate with this file type.

6. Click OK.

The new file association appears on the Document Types page.

To remove a file association, select it and click Delete. To edit an existing file association, select it and click Details. See Editing Association Details.

35

If you choose an .EXE file that is part of an optional installation component, the association is created only if that component is installed.

Editing Association Details1. Select Installation Expert > File Associations page.

2. Double-click a file association.

The Association Details dialog appears.

3. Complete the dialog:

� Document ExtensionEnter the three-character extension that is associated with the program.

� Document Identifier, Identifier Full NameIdentify the program that can open files of the type listed in the Document Extension field.

� Print OptionsEnter the command line options to be passed to the application to cause it to print the file instead of just opening it. This adds a Print menu option to the right-click menu for files of that document type.

� Source PathnameThis is the path to the .EXE program associated with the specified document extension. You cannot edit this field.

4. Click OK.

FilesUse the Files page to specify the files and directories to be installed on the destination computer. When you add files, Installation Expert does not actually copy or store the files, but records the location of the files. The files are not copied until you compile and build the installation. Therefore, if you change a file�s name or location, you must update its path, otherwise you get error messages when you compile. See Changing Source Directories on page 18.

When you add a program file to the Files page, Installation Expert searches the registry for related information, such as file associations and icons. This information is added to the installation and entered on the corresponding Installation Expert pages.

NoteIf you inadvertently add multiple instances of the same file (with the same path), only one copy is compiled into the installation .EXE. Use Setup Editor > Edit menu > Duplicate Files Report, to find duplicate files.

The upper two list boxes display the directories and files available to your computer. The lower two list boxes represent the directory structure and files that will be installed on the destination computer.

Use the following buttons:

! Add ContentsAdd entire directories. When you add an entire directory you can filter it using wildcards. See Adding Contents of Directories to the Installation on page 38.

! Add FileAdd single or multiple files. See Adding Files to an Installation.

36

! New FolderCreate directories to be installed on the destination computer.

! Delete Folder, Delete FileRemove a directory or file from the installation.

! DetailsEdit file settings. See Specifying Installation File Settings.

Adding Files to an Installation1. Select Installation Expert > Files page.

2. If the directory where the file is to be added is not listed in the lower left list box:

� Select the directory under which the new directory should be created.

� Click New Folder, enter a directory name, and click OK.

3. In the lower left list box, select the directory to which the file will be added.

You must assign all files to either the Application directory, a Windows directory, or a subdirectory that you create. If the installation contains more than one component, the list box contains directories for each component.

� Application directoryThis represents the default installation directory for the program. This is where the executables, ReadMe files, and other non-system files are typically assigned.

� Windows directorySystem level files, such as fonts and certain .DLLs, should be assigned to the appropriate Windows directory. The main system directories are already created, and you can add new ones.

4. In the upper left list box select the directory containing the file or files to add.

All the files in the selected folder are listed in the upper right list box.

5. From the upper right list box, select the files to add and assign them to the destination directory:

� To assign a single file to the destination directory, double-click the file.

� To assign multiple files, select them and click Add File.

6. To add the contents of an entire directory or to use wildcard filters to add only specified files in the directory, select the directory in the upper right list box and click Add Contents. Complete the fields on the Add Wildcards dialog and click OK. See Adding Contents of Directories to the Installation.

7. Repeat the preceding steps to assign all application files to the proper destination directory.

You can also 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 the file�s location, click OK.

To review file assignments, select a destination directory in the lower left list box. All files assigned to that directory are listed in the lower right list box. To delete a file from the installation, select it in the lower right list box, and click Delete File. To set advanced installation options for a particular file, double-click it in the lower right list box. This opens the Install File Settings dialog. See Specifying Installation File Settings on page 38.

If you assign files to a directory that is part of an optional installation component, those files are installed only if that component is installed.

37

Adding Contents of Directories to the InstallationYou can add the entire contents of a directory to an installation or use wildcard filters to add only specified files in the directory.

1. Select Installation Expert > Files page.

2. In the upper left list box, select the directory whose contents you want to add.

3. In the lower left list box, select the directory where you want to add the contents.

4. Click Add Contents.

The Add Wildcards dialog appears.

5. Complete the Add Wildcards dialog:

� Dest. DirectoryEnter the name of the installation directory that will hold the contents of the directory you�re adding. If you don�t enter a directory name, the contents are added to the directory that�s selected in the lower left list box.

� Include Wildcard, Exclude WildcardTo include or exclude files based on specific criteria, enter a semicolon-delimited list of wildcards. (Example: Enter *.EXE for all .EXE files or *.DLL for .DLL files.) If you leave the wildcard fields blank, all files in the directory are added.

� Include SubdirectoriesMark this to add all the subdirectories within the directory you�re adding. The wildcard settings apply to the subdirectories also.

� Add as a wildcard instead of adding the filesMark this to have the lower right list box display wildcard settings (as specified in the Include Wildcard field or *.* if no wildcards are specified) instead of the actual file names. This lets you add other files to the source directory later. When the installation is compiled, all files matching the wildcard filter are copied to the destination computer. With this option, the program does not automatically create icons and file associations.

6. Click OK.

The contents of the directory in the upper left list box are added to the directory you selected in the lower left list box or to the directory you specified in the Dest. Directory field. If you specified wildcards, only files that match the wildcard criteria are added.

Specifying Installation File Settings1. Select Installation Expert > Files page.

2. In the lower right list box, select a file or files and click Details.

If you selected a single file, the Install File Settings dialog appears. If you selected multiple files, the Multiple File Settings dialog appears.

3. Complete the dialog:

� Source PathnameSpecify the pathname of the file on your computer.

� Destination PathnameSpecify the pathname the file will have on the destination computer. Use variables to start the pathname (example: %MAINDIR%\Dev\file.txt). This field has a drop-down list with common variables. Do not include wildcards in this field.

38

� DescriptionEnter text to appear in the progress bar while this file is installed.

� Require PasswordIf you entered a password in Installation Expert > Password page, and you mark this, the end user is prompted for the password before this file is installed.

The password prompt appears only once, for the first password-protected file in an installation, regardless of the number of password-protected files. If no password-protected files are slated for installation, the prompt does not appear.

� Include Sub-DirectoriesIf you specify a directory in Source Pathname, mark this to include all subdirectories and their contents.

� Shared DLL CounterIf this is marked, and the file is a .DLL or .VBX, Windows tracks the file to prevent its removal if an installed application is still using it.

� No Progress BarTo hide the progress bar, mark this for every file in the installation. If you mark it for some files, but not others, the progress bar seems to display continuously because the screen does not refresh between files.

� Self-Register OCX/DLL/EXE/TLBAll .OCXs and .TLBs and some .DLLs and .EXEs support self-registration. Mark this so the file registers itself in the Windows registry before it is used.

� Do Not Download With WebDeployThis checkbox is available if you click Complete support for Internet-based installation on the WebDeploy page. In an Internet-based installation, files are stored as separate files in the same directory as the installation .EXE on the Web server and are downloaded only as they are needed.

Mark this checkbox to put the file in the installation .EXE rather than storing it as a separate file.

� Repair application if this file is missingMark this checkbox to initiate self-repair if this file is missing during application launch. This prevents your application from failing if this file is accidently deleted. For information on setting up self-repair, see Configuring an Application for Automatic Self-Repair on page 20.

� Replace Existing FileSpecify when to replace existing files on the destination computer.

" AlwaysThe new file always replaces the old file.

" NeverThe file never overwrites an existing file. Select this for files that should be installed if they are not present, but which might be customized by the end user and should therefore not be replaced on re-installation (example: configuration files).

" Check FileThe existing file is only replaced if the requirements you set in File Version and File Date/Time are true.

� File Version, File Date/TimeThese become enabled if Check File is selected from Replace Existing Files.

" Doesn�t MatterSelect this option if only one of the requirements, File Version or File Date/Time, must be fulfilled to replace the existing file.

39

" Same or OlderFor File Version, this replaces the existing file if it has a version resource that is the same as or older than the new file. If the existing file lacks a version resource, it is not replaced.

For File Date/Time, this replaces the existing file if its modification date and time are the same or older than the new file.

" OlderFor File Version, this replaces the existing file if it has a version resource that is older than the new file. If the existing file lacks a version resource, it is not replaced.

For File Date/Time, this replaces the existing file if its modification date and time are older than the new file.

� Retain duplicates on pathBy default, version checking removes existing copies of .DLLs that are found in the path list. To suppress this feature, mark this checkbox.

� Existing File PathnameSmartPatch creates a patch file that contains only the differences between the older installation and the new installation.

If you are using Smartpatch, specify the pathname where the installation can expect to find one of the files listed in Previous File Versions. If a wildcard was used in Source Pathname, this field should contain a directory. Start the path with a variable.

� Previous File VersionsUse the Browse button to create a list of files that are older versions of the file or files being installed.

NoteRather than specifying SmartPatch information for each file, you can use the SmartPatch page in Installation Expert to specify entire directories that contain older versions of your files. See SmartPatch on page 53.

4. Click OK.

FontsUse this page to add fonts to an installation. You only need to add fonts when they are required by the application being installed. Any fonts added with the Files page are listed here.

To add a new font:

1. Select Installation Expert > Fonts page.

2. Click Add.

The Select Fonts dialog appears, which lists the fonts in the Fonts directory on your computer.

3. From Component, select the component in which to install the fonts.

4. In the left list box, select the directory containing the font.

5. In the right list box, select the font.

6. Click OK.

40

The font is added to the selected component. To remove an existing font, select it on the Fonts page and click Delete.

General InformationUse the General Information page to specify information about the installation file. The information on this page sets the version resource of the compiled setup file (.EXE). The end user sees this information by right-clicking the setup file and selecting Properties.

If you plan to use an automated build system and want to set these values at compile time, create compiler variables to set these values, and enter the compiler variable name, surrounded by percent signs, in these fields. Example: If you create a compiler variable named _INST_VERSION_ to set the version, enter %_INST_VERSION_% in the Installation Version field. See Compiler Variables on page 30.

Enter information about your application in the following fields:

! Installation VersionThe version number of the installation.

! DescriptionA description of the installation, perhaps including your application�s name.

! CopyrightThe copyright notice for the installation.

! Company NameThe name of your company.

INI FilesThe INI Files page lets you create a new .INI file to store your program�s settings, or update an .INI file on the destination computer during installation.

1. Select Installation Expert > INI Files page.

2. Select the destination directory from the left list.

3. Click New File to open the Edit INI File Settings dialog.

4. From File, select a default path where the .INI file is stored.

Example: %SYS32%\NONAME.INI.

5. Overwrite the default NONAME.INI with the appropriate name.

Example: System.ini.

6. In INI File Contents, enter the information that appears in the .INI file.

You can copy and paste the .INI contents from an existing file into this field. You must enter at least one section heading and one command line.

If you create an .INI file to update a system file on the destination computer, your settings are merged into the existing system file during the installation. Any duplicate settings are overwritten with the values you enter here.

7. Click OK.

To remove an .INI file, select it in the list on the right and click Delete. To edit an existing .INI file, select it in the list on the right and click Details. See Editing INI File Settings.

Editing INI File Settings1. Select Installation Expert > INI Files page.

2. Select the file on the right of the INI Files page and click Details.

41

The Edit INI File Settings dialog appears.

3. Complete the dialog:

� FileDisplays the pathname to the .INI file. Installation Expert uses a variable (example: %MAINDIR%) to refer to the directory. To edit this field, you must create a new .INI file item.

� INI File ContentsEnter changes to make in the .INI file. Changes are interpreted as follows:

" To add to a section, type the section name in brackets, then type new lines for that section. If the .INI file already contains a name-value pair that you type, the existing line is replaced by the new one. Example:

[SECTIONNAME]Color=Blue

" To delete a section and its contents, type a section name with no lines after it. Example:

[SECTIONNAME]

" To delete a name-value pair, type the name with an equals sign followed by nothing. Example:

Color=

" Comments (lines starting with ;) are not supported.

" You can enter variables in INI File Contents to insert the values of script variables into the .INI file. See Variables and Expressions on page 79.

4. Click OK.

Installation LogUse the Installation Log page to create an installation log and to specify its location and name. As an alternative, set the compiler variable _LOGFILE_PATH_ to the path of the log file.

The installation log is a text file that lists the events that occur while the installation runs. (Example: It contains the list of files that are replaced.) Entries are also added to the log when files are being deleted or backed up. However, the uninstaller does not take such entries into account during rollbacks.

! Do not create installation logMark this if you do not want an installation log to be created. If you do this, the end user will get an error upon attempting to uninstall.

! Create installation log in same directory as first installed fileThis saves the installation log in the root, because the first Install File action is in the uninstal.wse include script, which appears before any of your Install File lines. This option is included for backwards compatibility with WiseScripts from previous versions of the Wise Installation System.

! Create installation log in custom directoryMark this to save the installation log in a directory you specify. This enables the options for selecting the directory. Select a directory and enter a name for the installation log in Install Log File Name. (Example: Install.log.) To create a new directory for the log within the Application or Windows directory, click New Folder.

42

LanguagesUse the Languages page to define the languages supported by the installation, the default language, and the font used by the Japanese version of the installation.

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 on the Installer Messages dialog, which you access by selecting Edit menu > Installer Messages. See Changing Installer Messages on page 23.

2. Select Installation Expert > Languages page.

3. Click Add.

The Select Languages dialog appears, which lists the language translations that are available.

4. Select the language 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. Unless you�ve added languages, you can select U.S. English (the default), French, German, Italian, and Spanish.

To delete a language, select it from the list and click Delete. This removes the selected language from the installation, however, it does not delete the language translation that you entered on the Installer Messages dialog.

Language Page settings:

! Default LanguageSelect the default language for the installation.

! Japanese Font Name, Japanese Point SizeIf you create a Japanese installation, enter the font and point size to be used.

NoteIf you are working with a double-byte language do not include any other languages in the installation. Including double-byte with single-byte languages in the same installation can cause distortion of the fonts for the single-byte languages. If you need both single and double-byte installations, make a copy of the installation and include the double-byte languages in the copy.

! Copy Default

Mark this to copy messages from the default language to all others to provide a starting point for translating the message.

Example: Your installation supports two languages and you add a Display Message action to your script with English selected in Setup Editor�s Language drop-down list. If Copy Default is marked and you select French from the Language drop-down list, the text you entered in the English Display Message is copied to the French version of the Display Message action.

! Always PromptMark this to have the installation always prompt the end user to select a language, unless there is only one language in the installation.

MediaUse the Media page to configure the installation for the type of media on which it will be stored and distributed.

43

! Single File Installation

Mark this to pack all the files into a single installation file. This is convenient if you plan to distribute the installation over a LAN, or as a single downloadable file over the Internet. (In the latter case, consider using WebDeploy technology to reduce the bandwidth required for the download.)

! Media-Based InstallationMark this to break the installation into files that fit on a specific type of removable media and to enable the following fields:

� Media TypeSelect the type of media to use: 5 1/4" high-density floppy; 3 1/2" double-density floppy; 3 1/2" high-density floppy; Zip disk (100MB); 3 1/2" Super LS-120 diskette; CD-ROM (650MB); DVD-ROM (4.7GB); or a custom disk size.

� Custom SizeIf you selected a custom disk size in the Media Type field, enter the formatted capacity of the media you are using in this field.

Microsoft SMSIf an installation runs in a Microsoft Systems Management Server (SMS) environment, you can have the installation create a status .MIF file and a definition file (.PDF or .SMS) in the Windows directory during compile. Use the Microsoft SMS page to specify the information for the .MIF file and package definition file. For information about SMS, see msdn.microsoft.com.

! Install MIF FilenameEnter the name of the application being installed. Example: sample.mif.

! Uninstall MIF FilenameEnter the name of the application being uninstalled. Example: uninstall_sample.mif.

! Manufacturer, Product, Version, Enter the manufacturer, name, and version number of the application. These fields are required. If they are left blank, the package definition file is not created.

! Serial NumberEnter the serial number of the application being installed.

! Package Definition FileTo create a package definition file when the installation is compiled, mark e one of the following and enter the correct SMS version:

� Create Package Definition File (SMS 1.2 or earlier)Mark this to create a package definition file of file type .PDF.

� Create SMS File (SMS 2.0 or later)Mark this to create a package definition file of file type .SMS.

To distribute the package definition file with the installation using Package Distribution in Workbench, select Network and the Installation (.exe) option on the Distribution Method dialog. If you distribute the installation to the share point directory and import it into Software Manager, the installation and the SMS package definition file are copied to the share point Available Packages directory when you change its status to Available.

PasswordUse the Password page to specify a required password or serial number for an installation. End users must enter the correct password or serial number to begin the installation.

44

! Single password used for all installationsMark this to require a single password for any copy of the installation. In the field to the right of this option, enter the password.

! Individual serial numbers used as passwordMark this to have the installation work with a range of serial numbers and to enable the following fields. This does not produce multiple serialized copies of the installation but a single installation that accepts any of the generated serial numbers.

� Serial Number TypeChoose whether to create incremental serial numbers (in sequence) or randomly generated serial numbers.

� Starting Serial Number, Ending Serial NumberDefine the range of serial numbers by entering a starting and ending number.

� Approx. Serial NumbersEnter the approximate quantity of serial numbers.

� Output FileSpecify a text file name, then click Export. This writes the serial numbers to the specified file. You can use this file to print labels to serialize your application.

For maximum protection, use a random serial number scheme and a serial number range that exceeds the number of copies you will produce by a factor of 100 or more. Example: If you generate 1,000 random serial numbers between 1,000,000 and 9,999,999, unauthorized users have only a 1-in-9,000 chance of correctly guessing a serial number.

You can turn password protection on and off on a per-file basis by selecting a file on the Files page and clicking Details. See Require Password in Specifying Installation File Settings on page 38.

Product DetailsUse the Product Details page to specify the title and the default directory for the installation.

! Installation TitleEnter the name of the application. It appears on the background screen and on wizard dialogs during the installation.

! Default DirectoryEnter 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 FilesMark this to place the default directory in the Program Files directory instead of in the hard disk�s root directory. The end user can change the location.

Progress BarUse the Progress Bar page to set options for the progress bar that displays while the installation is running. The default progress bar uses a .DLL written by Wise Solutions, which is located in Program Files\Wise Package Studio\WiseScript Editor\Progress. You can specify to use an external .DLL for displaying the progress bar.

! Progress Dialog PlacementSelect a screen position for the progress bar.

45

! Progress Bar Based OnSelect 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 .DLLBy default, this path points to an operating system-specific .DLL that displays a custom progress bar provided by Wise Solutions. If you have a custom .DLL that displays a progress bar, specify its path here. If you delete this path, the progress bar defaults to a smaller, more generic progress bar.

! Center All Dialogs Over Progress DialogMark this to center all dialogs in front of the progress bar, effectively hiding it whenever end user input is required.

! Do Not Allow Installation to Be CancelledMark this to disable the Cancel button on all dialogs that appear to the end user during installation. Use this option for administrative installations.

! Do Not Allow Progress Dialog to Be CancelledMark this to disable the Cancel button on the Progress dialog that appears on the destination computer. Use this option for administrative installations.

In the Initialization Splash Screen section, you can modify the first splash screen that appears when the end user runs the installation or uninstall.

! Initialization splash screenChoose Custom to modify the splash screen.

! Initialization .BMP FileThis is enabled when you select Custom from Initialization splash screen. Specify the .BMP file for the splash screen that end users first see when they run the installation.

NoteIf the bitmap file you select for your custom splash screen doesn�t appear correctly, you probably haven�t selected a valid .BMP file. Non-valid bitmap files do not appear, and no error message is displayed to inform you of the problem.

RegistryUse the Registry page to specify the registry entries to be installed or edited on the destination computer. You can either add registry entries manually or import a registry (.REG) file.

The left two list boxes display key structure, and the right two list boxes display values. The upper two list boxes display keys and values in your computer�s registry. The lower two list boxes represent the keys and values to be installed on the destination computer.

Use the following buttons:

! Add KeysCopy a registry key, including all its subkeys and values, from your computer to the installation.

! Add ValuesCopy values from your computer to the installation.

! NewCreate a new key or import a registry file into the installation. The presence of a key in this list does not necessarily mean that the key is added to the registry on the

46

destination computer. It merely indicates that the installation operates on the key in some way. The operation might be to add a new key or named value, to modify an existing named value, or to delete a value.

! Delete Key, Delete ValueRemove a registry key or value from the installation. This does not delete the key or value on the destination computer.

! DetailsEdit registry key settings.

Creating or Editing Registry Key SettingsFrom the Registry page in Installation Expert, you can add new registry keys, edit existing registry values, and import registry files.

To add an empty registry key:

1. In the lower left list, select the location for the key.

2. Click New and select Key.

The Registry Key Settings dialog appears.

3. From Operation, select Create empty key.

4. In Key, click at the end of the existing text, and add a backslash and the name of the new key.

Example: Append \Preferences to the end of the existing key name.

5. Click OK.

To add a registry value:1. In the lower left list box, select the key to contain the value you�re adding.

2. Click New and select Key.

The Registry Key Settings dialog appears.

3. Configure the Registry Key Settings dialog and click OK.

See Configuring Registry Key Settings on page 47 for details.

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 Configuring Registry Key Settings on page 47 for details.

To import a registry file:

1. Click New and select Import.

2. In the Select Registry File to import dialog, specify the registry file (.REG file).

Configuring Registry Key SettingsUse the Registry Key Settings dialog to set or edit registry key settings.

1. Select Installation Expert > Registry page.

2. Do one of the following:

� Click New > Key.

47

� Double-click a registry value in the lower right list.

The Registry Key Settings dialog appears.

3. Complete the dialog:

� OperationSelect the operation to apply to the key or its associated value.

" Create/update key and valueThe value is updated if it already exists. If the key or value does not exist, it is created.

" Create empty keyCreates the key but does not add any values.

" Remove key and all subkeysDeletes the key, its subkeys, and all named values associated with the key and its subkeys on the destination computer.

" Remove key and value onlyRemoves the named value from the key on the destination computer. If the key has other named values, they are preserved.

" Preserve existing key and valueAdds a new key or value if the specified item does not exist, but leaves the existing value in place if one already exists.

� RootSelect the parent key in which the new key is added.

� KeyEnter the name of the new key. You can create multiple hierarchical keys at once by separating them with backslashes, as in directory pathnames. (Example: Entering NewDocument\Protocol\StdFileEditing creates the StdFileEditing key inside the Protocol key, which is created inside the NewDocument key.) Any keys in the path that do not exist are automatically created.

� Value NameEnter the name of a new named value.

� Data ValueThe data for the value. If the Data Type (below) is Double word (DWORD), the data should be in decimal notation. To insert multiple lines of data here, press Ctrl+Enter to begin a new line.

� Data TypeSelect the type of data contained in the named value. Available types are listed below. The associated Windows API data types are in parentheses.

" String(REG_SZ prefix) Indicates that a value entry is an expandable string. To embed a variable name, (such as %WIN%), enclose it with double percents (%%WIN%%). If you enclose it in single percents, then the variable name is expanded to its actual value. This allows Windows NT4/2000/XP system variables to be embedded.

" Unexpanded string(REG_EXPAND_SZ prefix) Identifies a value entry as an unexpanded data string. To embed a variable name, (such as %WIN%), you must enclose it with double percents (%%WIN%%). If you only enclose it in single percents, then the variable name is expanded to its actual value. This allows Windows NT4/2000/XP system variables to be embedded.

48

" Multiple strings(REG_MULTI_SZ prefix) Identifies a value entry as a multiple string. These are multiple pieces of text, separated by carriage returns. This is only supported for installations on Windows NT4/2000/XP.

" Double word(REG_DWORD prefix) Identifies a value entry as a 32-bit (DWORD) entry.

" Binary/Hex(REG_BINARY prefix) Identifies a value entry as binary. Each byte should be separated by at least one blank space. For instance: AD 30 C0 A9 40 20 A8 FC 4C 00 08.

" NoneThis is provided for compatibility with SMS Installer installations. It behaves the same as the binary data type.

� Repair application if this registry value is missingSelf-repair prevents an application from failing if this registry value has accidentally been deleted. Mark this checkbox to initiate self-repair if this registry value is missing during application launch. The end user must have access to the installation media to perform a repair, and you must also configure a shortcut to the application with self-repair turned on. See Configuring an Application for Automatic Self-Repair on page 20.

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

4. Click OK.

ScreenUse the Screen page to set the background color or gradient and font for the installation.

! Background GradientSelect whether to display a full-screen gradient, a three-quarters screen gradient, or no gradient behind the installation dialogs.

! Title BarMark this to cause the installation�s title to be displayed at the top of the screen in a title bar.

! Hide Program ManagerMark this to hide the Program Manager during installation (Windows 3.x only).

! No Background GradientMark this to display no gradient behind the installation dialogs.

! Top Color, Bottom ColorClick these buttons to choose the top and bottom colors for the background gradient. The installation generates a smooth transition between the two colors.

! Screen PreviewDisplays a real-time mock-up of how the installation screen will look.

! Bold/Light FontsSelect the option to always display bold or light fonts, or to use light fonts under Windows 95/98/NT and bold fonts under Windows 3.1x.

49

! Message Box FontSpecify 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 SizeSelect the point size for text displayed on the installation dialogs. If you do not specify a point size, the standard Windows text size is used.

! Character SetEnter the number of the character set to be used. Use zero, which is the default, unless the installation is in Japanese. For a Japanese installation, enter 128 and make sure you have specified MS Gothic in the Message Box Font field.

ServicesThe Services page lets you define applications to be installed as a service under Windows NT, 2000, or XP. The .EXE file you define as a service must already be a part of the installation. Consult your Microsoft developer documentation for information on creating services. This page only helps you install services, not develop them.

To add a new service item:

1. Select Installation Expert > Files page.

2. Add the .EXE file that runs the service.

3. Select the Services page.

4. Click Add.

The Select File from Installation dialog appears. The left list box shows the directory structure of the installation, and the right list box shows .EXE files that were added to the selected directory.

5. Select the .EXE file from the right list box and click OK.

The service appears in the list on the Services page.

To remove an existing service, select it from the list and click Delete. To change the .EXE file for a service, select it from the list and click Details. See Configuring Service Settings on page 50.

If you choose an .EXE file that is part of an optional installation component, the service is installed only if that component is installed.

Configuring Service Settings1. Select Installation Expert > Services page.

2. Select a service and click Details.

The Create Service Settings dialog appears. It lets you control the behavior of the service when it is run. Refer to your Microsoft developer documentation for information about creating services.

3. Complete the dialog:

� Service NameEnter the internal service name, which is used in the registry.

� Display NameEnter the name to appear in the Services control panel.

� Executable PathSpecify the complete path to the executable file as it will be on the destination computer. Start the path with a variable (example: %MAINDIR%).

50

� Login Username, PasswordEnter the user name and password under which the service should run.

� Error ControlSpecify what happens if an error occurs while the service starts.

" Ignore ErrorLogs the error and continues.

" Normal ErrorDisplays a message to the end user, logs the error, and continues.

" Severe ErrorLogs the error. If the computer is booting the last known good configuration, boot continues. Otherwise, it reboots to the last known good configuration.

" Critical ErrorLogs the error if possible. If the computer is booting the last known good configuration, boot fails. Otherwise, it reboots to the last known good configuration.

� GroupEnter the name of the load ordering group to which this service belongs. Leave this empty if the service does not belong to a group.

� DependenciesEnter a list of semicolon-separated names of services or load ordering groups that must start before this service. Leave this empty if there are no dependencies. If a service is dependent on a group, at least one member of the group must be started for this service to run.

Enter a plus sign (+) before group names to distinguish them from service names. Services and service groups share the same name space. Example: If you enter this string, "ftpsvr;httpsvr;drc;+widget", you create dependencies on the ftpsvr, httpsvr, and drc services and the widget group.

� Service TypeSelect a service type.

� Start ServiceSelect the default setting for starting the service.

� Service Interacts With DesktopMark this to let the service display its user interface.

4. Click OK.

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

If you added program files on the Files page, Installation Expert might have added the default application shortcuts. The Shortcuts page shows the Name, Location, and Source Path of the shortcuts that have been added so far.

To add a shortcut to an installation:

1. Select Installation Expert > Shortcuts page.

2. In Default Folder Name, enter the default folder name for your Program Manager or Start menu shortcuts.

The end user can change this during installation. You must specify a folder name before you can add any shortcuts.

51

3. Click Add.

The Select File from Installation dialog opens.

4. In the left list box, which shows the directory structure of the installation, select the directory containing the program file to associate with this file type.

5. In the right list box, select the file to which to assign the shortcut.

6. Click OK.

The Shortcut Details dialog appears.

7. Complete the dialog and click OK. See Editing Shortcut Details.

The new shortcut appears on the Shortcuts page.

To remove a shortcut, select it and click Delete. To edit an existing shortcut, select it and click Details.

If you create a shortcut to a file that is in an optional component of the installation, the shortcut is created only if that component is installed.

Editing Shortcut Details1. Select Installation Expert > Shortcut Details page.

2. Click Details.

The Shortcut Details dialog appears.

Here 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 Setup Editor and double-click the Create Shortcut line within the If System Has Windows 95 Shell Interface statement.

3. Complete the dialog:

� Shortcut NameEnter the name of the shortcut.

� Command Line OptionsEnter the command line options that are used to open the file associated with the new shortcut.

� Icon Pathname(Optional) Specify the file that contains the icon to be used for the shortcut. Otherwise, the target file�s icon is used.

� Icon NumberEnter the number of the icon to use from the file specified in Icon Pathname above.

� Default DirectoryEnter the default directory that should be set when launching the target file, if different from the target file�s location. In Windows Explorer, this field is referred to as the Start in directory.

� Shortcut PathnameDisplays the pathname of the file that is opened by the shortcut.

� Shortcut LocationSelect where to place the shortcut.

� Enable Access For All Windows NT UsersMark this to add the shortcut to the common Program Manager group under Windows NT, so all end users can have access to it. This only works if the user logged in during installation has administrator privileges.

52

� Check self-repair items when this shortcut is openedMark this to turn on self-repair functionality for this shortcut if you have configured the installation for self-repair. See Configuring an Application for Automatic Self-Repair on page 20.

4. Click OK.

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

To create a smart patch, make sure your computer contains a copy of the old software that is being upgraded. After you specify the path to the old software, the SmartPatch feature compares the older versions of the application to the version being installed and generates a patch installation that contains only the differences between the 2 versions. This can result in a significantly smaller installation file. If you specify multiple previous versions, they�re upgraded no matter what version is on the destination computer.

Select one of the following:

! Do Not Create SmartPatch UpdatesMark this to create a full installation and not use the SmartPatch feature. You can also leave this feature off while testing an installation, to produce faster compiles.

! Create SmartPatch UpdatesMark this to enable SmartPatch and the following fields:

� Error CheckingBy default, SmartPatch expects the same file names to exist in both the old and new copies of the software and displays errors when they don�t match. You can change the default level of error checking.

" Do not display errorsSelect this option if you expect a significantly different file set in the new installation.

" Display error if all matching files not foundSelect this option to prevent errors such as specifying an empty or incorrect directory for the old software.

" Display error if any matching files not foundSelect this option if the old and new installations should have all the same file names, but different versions.

� Patch ThresholdDetermines 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 MemoryDetermines how much memory the SmartPatch feature can use. SmartPatch is very memory-intensive. Set this value to 2 MB less than the amount of RAM installed in your computer.

53

� Maximum Patch CompressionMark this to compress patch files as much as possible. This takes extra time, so leave this unmarked during development and testing, and mark it only when creating your final distribution build.

� DirectoryThis list displays directories on your computer that contain old versions of your application that end users might have installed on their computers. SmartPatch creates a patch file that updates any of these older versions to the most recent version. The directory structures of each version must match exactly�only the top-level directory name can be different.

" To add a path to an old version of the software, click Add and specify the directory.

" To remove a path from this list, select it and click Delete.

System RequirementsUse the System Requirements page to specify minimum hardware and software requirements for the installation and to set warning messages that display to the end user if the destination computer does not meet the requirements. You can set requirements for the Windows and Windows NT versions, the screen resolution, the screen color depth, and sound support.

To set a system requirement:

1. From the list on the System Requirements page, select an item to set its minimum requirement.

2. Click Details.

The Minimum System Requirements dialog opens. This dialog varies, depending on the selected requirement.

3. Complete the dialog:

� Requirement drop-down listSelect the minimum system requirement for the application.

" Windows Version, Windows NT VersionSpecify the minimum version of Windows required by the application. Example: Choose Windows 98 if the application runs on Windows 98, but not on Windows 95.

Select this: If the application you are installing requires:

Windows Version Windows 95, Windows 98, Windows Me, no version of Windows at all, or if it runs on all versions of Windows

Windows NT Version 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 A specific screen resolution

Screen Colors Specific color settings

Sound Support The destination computer be capable of playing .WAV, .MIDI files, or both

54

" Screen Resolution, Screen Colors, Sound SupportSpecify the minimum screen resolution, color palette, or audio support options the application requires.

� Type

" RecommendedSelect this if this configuration item is not required by the program. The message you enter in the Message Text field appears on the destination computer if it does not meet the specified requirement, and the installation continues once the message is acknowledged.

" RequiredSelect this if this configuration item is critical to the installation and the program cannot run without it. The message you enter in the Message Text field appears on the destination computer if it does not meet the specified requirement, and the installation is aborted.

� Message TitleEnter a name to appear in the title bar of the warning message. This field is disabled unless a specific requirement was selected.

� Message TextEnter the message that appears if the destination computer does not meet the specified requirement. This field is disabled unless a specific requirement was selected.

Example: Your message can inform the end user why the installation cannot run: �This application requires Windows Me to run. Please upgrade.�

4. Click OK.

System SearchThe System Search page specifies methods by which the installation can search for and detect a previous version of your application. If you know certain files, registry values, or .INI file changes that would be present if your application was installed previously, you can use this page to search for a previous version of your application. If a previous version is installed, its directory becomes the default directory for installation of the new software.

Examples:

If, during the previous installation, you wrote the installation directory pathname into an .INI file or into the registry, you can search for that pathname using this page. If you know of a specific file that exists only in the installation directory, you can search for that file, and get its directory. In either case, the pathname you find is put into the variable %MAINDIR%. The variable %MAINDIR% represents the default installation directory of the installation.

If you search for a registry value, make sure the registry value contains a valid directory or pathname. If the search finds the registry Value Name, its Value Data is put into %MAINDIR%. If you search for an .INI value, make sure the .INI Item Name contains a valid pathname. If the search finds the .INI Item Name, its value is put into %MAINDIR%. If you know the pathname ends with a file name, mark Remove File Name when configuring the registry or .INI search.

To search for a previous version:

1. Select Installation Expert > System Search page.

2. Click Add and select the search method:

55

� Search for FileSearches the destination computer�s hard drive and network for a specific file.

� Read INI ValueSearches within an .INI file for a value. Use this only to get an .INI value that you know to be a valid pathname on the destination computer.

� Read Registry ValueSearches the Windows registry for the key value you specify. Use this only to get an .INI value that you know to be a valid pathname on the destination computer.

Depending on your selection, a corresponding dialog opens so you can configure the search.

3. If searching for a file, complete the Search for File dialog:

� File NameEnter the name of the file.

� DescriptionEnter the message to display on the progress dialog while searching.

� Drives to searchSelect local hard drives only, network drives only, or both.

� Search depthSet the search depth to zero to search the entire directory tree of the specified volumes. A search depth of 2 or 3 is recommended when searching network volumes.

4. If searching for an INI value, complete the Read INI Value dialog:

Select the directory that contains the .INI file from the directory tree. If the directory is not displayed, select its parent directory and click New Folder to add it.

� INI File Name, INI Section Name, INI Item NameEnter the file name of the .INI file to be read, the section that contains the entry to be read (without the square brackets), and the item name of the entry.

� Remove File NameMark this to return only the directory name if it ends with a file name.

5. If searching for an registry value, complete the Read Registry Value dialog:

� RootChoose the root key that contains the named value to be read.

� Key, Value NameEnter the name of the key and the value to be read from that key.

� Remove File Name

� Mark this to return only the directory name if it ends with a file name.

6. Click OK.

7. Repeat the preceding steps to create additional search items.

The items listed on the System Search page display the search methods for finding the old version of the application. The installation performs the searches in the order listed until one is successful. It then makes the directory of the previous installation the default directory for the installation. If none are successful, the directory you enter in Default Directory on the Product Details page is the default directory.

To remove a search item from the System Search page, select it and click Delete. To edit the details of a search item, select the item and click Details.

56

UninstallUse the Uninstall page to specify whether the installation supports the uninstall capability and to set options for controlling which files are removed by the uninstall program. The uninstall program is named unwise.exe.

NoteInstallations contain the Repair option when you choose the application name in the Add/Remove Control Panel. Choosing Repair re-edits the registry and .INI files, re-installs all files, and re-self-registers files.

! Do not add support for uninstallMark this to not give end users the ability to uninstall the application.

! Support uninstallMark this to allow uninstall and to enable the following uninstall options.

� Display uninstaller background windowMark this to display a gradient window similar to the one displayed during installation.

� Top Color, Bottom ColorClick these buttons to choose the top and bottom colors for the background gradient. The uninstall generates a smooth transition between the two colors.

� Uninstaller FontSpecify 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 SizeSelect the point size for text displayed on the installation dialogs. If you do not specify a point size, the standard Windows text size is used.

� Character SetEnter the number of the character set to be used. Use zero, which is the default, unless the uninstall is in Japanese. For a Japanese uninstall, enter 128 and make sure you have specified MS Gothic in the Uninstaller Font field.

To add a new command:

The uninstaller reads commands from the Install.log file created during installation. On the Uninstall page, you can add commands for the uninstaller.

1. On the Uninstall page, click Add and select the type of command to enter.

2. If you select Delete File(s), the Delete File(s) dialog appears.

Use this type of command to delete additional files, such as those created by your program on first run. It is not necessary to add commands to delete files the installation created.

� Select the directory containing the files to be deleted. If the directory is not displayed, select its parent directory and click New Folder to add it.

� Enter the file name in Filename. You can use a wildcard to specify the files.

� Click OK.

3. If you select Delete Registry Keys, complete the Remove Registry Tree dialog:

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 the installation added.

57

� Select the registry keys to be deleted. If the key is not displayed, select the key it should be added to and click New Key to add it.

� Click OK.

4. If you select Execute Program, complete the Select Program to Execute dialog.

� From the list on the left, select the directory containing the program to be executed.

� From the list on the right, select the program to be executed (or enter its name in the Program Filename field). For best results, make sure that the program you execute has little or no user interface. The uninstall procedure should seem like a single program to the end user, even if additional programs are executed.

� Click OK.

5. Mark Delete in-use files during uninstall to delete even those files that are in use when the uninstall program is running.

WebDeployThe WebDeploy page provides an efficient method for creating true Internet-based installations for your application. It creates a small stub installation that downloads the compressed files from a Web server as needed. For an example of a script that lets WebDeploy work through a proxy server, see Sample Scripts That Perform Web and FTP Transactions on page 183.

NoteWebDeploy supports only basic authentication. In your Web server software, make sure that the directory you use for WebDeploy is secured with basic, not domain, authentication. Also, if you use the FTP protocol for WebDeploy, keep in mind that WebDeploy doesn�t support passive transfers via FTP. Some firewalls and gateways require passive FTP transfers.

To create an Internet-based installation:

1. Select Installation Expert > WebDeploy page.

2. Select one of the following:

� Add support for Internet-based Copy Local Files script actionMark this if you add a Copy Local Files script action that will download or upload to a Web site. If you mark this option, select the protocol for the Copy Local Files action from File Transfer Via.

� Complete support for Internet-based installationMark this to break an installation into downloadable chunks and a distributable .EXE file.

3. Complete the following fields:

� Host AddressEnter the domain name or IP address of the Web or FTP host that will hold the installation files.

� Host Username, Host PasswordEnter the user name and password required to log onto the server. If this 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

58

everyone with a copy of the installation .EXE uses the same username and password, this is not suitable for tracking individual user access to the Web site.

� Host DirectoryEnter the path to the WebDeploy files stored on the server.

� File Transfer ViaSelect how to transfer the files:

" FTP ProtocolThis option is used within an intranet for companies who deploy their software behind a firewall. It works through WinSock, so you must have a valid WinSock layer for it to work. Using this protocol requires a name and a password. WebDeploy fails if the server allows anonymous login without a password.

To have the FTP protocol work through a proxy server, see the workaround solution contained in the sample script PROXY.WSE, located in the Samples directory within the WiseScript Editor application directory.

" HTTP ProtocolThis option is more universal because it can be used both outside and behind a firewall. The HTTP protocol attempts to read the information from the Web browser, which makes your files more widely available to your clients. It also allows for faster file transfers than the FTP protocol. Because of its flexibility and proxy server support, using the HTTP protocol is recommended.

� Cluster SizeEnter a number in kilobytes. Files smaller than the cluster size are packed into data files up to the cluster size. Files larger than the cluster size make up their own data file. A smaller cluster size increases the transfer rate of data. It also minimizes the amount of files that a given installation must download because only the necessary files are downloaded.

Example:

An installation has four 5K files and one 50K file. You set the cluster size to 20K and compile. You end up with a 20K file, packed with the four 5K files, and a 50K file.

4. Save and close the installation.

5. In Wise Package Studio�s Workbench, select the Tools tab, and launch the Package Distribution tool.

6. On the Specify File to Distribute dialog, specify the installation file to which you added WebDeploy, and click Next.

7. On the Distribution Method dialog, mark FTP Server and click Next.

This recompiles your application and uploads the installation file, as well as a WebDeploy configuration file, to an FTP server.

8. Enter the information about the server, and click Next.

File transfer commences.

Once the files are uploaded to the server, you can test your application by connecting to the FTP server through an FTP client and downloading and running the installation .EXE.

WebDeploy downloads and installs only the files that a particular end user requires, skipping those files that are the same version as existing files on the destination computer. To determine which files can be skipped, WebDeploy uses Microsoft�s VER.DLL. If the Internet connection is interrupted during the download, WebDeploy

59

picks up where the installation was cut off when download resumes. See The WebDeploy Process.

NoteInstallations deployed through WebDeploy contain a Repair option in the uninstall wizard, but the Repair option does not function.

The WebDeploy Process

WebDeploy Versus Distributing to an FTP ServerThere is an important distinction between building a true Internet-based installation with WebDeploy and just distributing an installation to an FTP server.

! WebDeploy recompiles your information into stub files and data files, but does not actually put the files on the Web. 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

When you develop the installation, you:! Configure WebDeploy by specifying the location of

installation files on the Web host! Compile the installation! Use Package Distribution to upload the installation

Your Computer Your Internet Host (FTP/HTTP) Server! 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

Phase 1:

Package Distribution FTPs files (Does not work through proxy)

(HTTP Protocol)

Destination ComputerPhase 2:

The end user:! Downloads the installation .EXE from your web site

Your Internet Host (FTP/HTTP) Server! Contains the installation .EXE and other

files

When the end user runs the installation, it:! Runs an install wizard! Determines which pieces of the application are needed! Downloads only the required pieces from your web host! Installs the appropriate pieces of the application

(HTTP Protocol)

Your Internet Host (FTP/HTTP) Server! Contains the pieces of an installation

ready for download! Contains the new installation and its

ReadMe!

Phase 3: Destination Computer

60

system on the destination computer to determine what it needs, then starts downloading files. After it has finished downloading the files, it starts the installation.

! When you mark the FTP Server option in the Package Distribution tool (with WebDeploy disabled), it simply copies your compiled files to the location you specify.

WebDeploy and FTP server distribution can be used in conjunction with each other. However, you should use an external FTP client to upload the files to the Web because the FTP Server feature in the WiseScript Editor fully automates the upload process, so you do not have direct control over the directories to which you are installing.

61

Chapter 4Setup Editor

Setup Editor provides a scripting environment where you can add advanced functionality to your script. The script is just another way of looking at an installation.

You can use Setup Editor�s built-in debugger to help test and troubleshoot your script.

Topics Include:

! About Setup Editor.

! About User-Defined Actions.

! About Debug Commands.

! Basic Scripting Concepts.

62

About Setup Editor

About Setup Editor

Setup Editor provides a powerful and easy-to-use environment for creating an installation script. You don�t need to memorize commands, because Setup Editor supports a point-and-click method of scripting. The script you create displays in clear English-like statements.

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. When an end user launches the installer .EXE, the script runs, executing all the actions specified in the script.

If you create a new installation by selecting Empty Project on the New Installation File dialog, Setup Editor is populated with a default script. The default script is based on the template file Empty Project.wse in the WiseScript Editor\Template directory. If you create a new installation by selecting Blank Script on the New Installation File dialog, Setup Editor is empty.

Some lines in the script correspond to options on pages in Installation Expert because these options generate script lines. (Example: If on the Product Details page in Installation Expert you enter InstallationName in the Installation Title field, then the following line is generated in the script: Set Variable APPTITLE to InstallationName.) Because pages in Installation Expert generate script lines, Setup Editor attempts to apply a default script based on Installation Expert pages whenever you switch from Setup Editor to Installation Expert. If you add script lines to a blank script in Setup Editor and attempt to go to Installation Expert, you see a warning that your script must be converted. For details, see Navigating Between Views on page 13.

The Setup Editor WindowThe Setup Editor window contains all the tools necessary to develop and edit scripts. To access Setup Editor, click Setup Editor at the bottom of the window.

Event and Language drop-downs.

There is a tab for the main installation script and each include script.

Standard and Custom tabs.

Installation Script list.

Title field

Actions list.

63

About Setup Editor

Title

This field contains the script�s name. By default, it is the name entered in the Installation Title field on the Product Details page followed by �Installation.� If you change the title of the script here, it does not change on the Product Details page. When you run the installation, this name appears at the top of the splash dialog (the Initializing Wise Installation Wizard dialog), and in the title bar of the installation screen.

Event

From this drop-down list, you select the script to edit. The Mainline script is the script that typically contains installation instructions. For details, see Choosing a Script to Edit.

Language

From this drop-down list, you select a language for the script. This drop-down list includes all the languages the installation supports, which you set on the Languages page.

When you add a script line that presents text to the end user, select each language in the Language drop-down list, and edit that script line so it contains the translated text. (Example: You set an installation to support French and English on the Languages page. While in the U.S. English script, you add a Display Message script line that states, �Do you want to view the ReadMe file now?� You should then select French from the Language drop-down list and edit the script you just added with a French translation of the message.) See Languages on page 43. The dialogs that ship with WiseScript Editor are pre-translated, so you do not need to edit them.

Actions

The Standard tab of this list displays all the actions you can add to your script. The Custom tab displays only your customized list of actions. See Customizing the List of Actions on page 69.

Installation ScriptThis list contains the script that is executed when an end user runs the installation. To edit a script line, double-click it. To copy and paste script lines, use the editing commands on the Edit menu.

Script lines are color-coded based on the type of the script line. To change the color code, see Setting Preferences on page 23. The default color code is as follows:

! Compiler Variable Items - gray

! Include Script Items - black

! Install/Copy File Items - black

! Logic items - blue

! New Variable Values - red

! Remarks - green

For information on working with scripts, see Choosing a Script to Edit on page 65. To show tabs for Wise include scripts, mark the Show Tabs for Wise Include Scripts checkbox in Preferences. See Setting Preferences on page 23.

Right-click Menu

Use the right-click menu of actions and script lines to perform common operations.

64

About Setup Editor

Choosing a Script to EditIn Setup Editor, you can edit event scripts and include scripts.

Event Scripts

Event scripts are scripts that handle events. (Example: The end user canceling the script.) There are 3 event scripts you can select from the Event drop-down list and edit:

! MainlineThe primary script that�s executed during the normal installation process. It contains placeholders for Cancel and Exit scripts. When you open a script using File menu > Open, that script is considered the �main installation script,� and is on the first tab below the installation script. Changes in the main installation script are reflected in Installation Expert and vice versa.

! ExitThe script that�s executed when the installation is complete, or when an Exit Installation script command is executed. If you create a user-defined action, you store its custom dialog here. See Creating a User-Defined Action on page 70.

! CancelThe script that�s executed when the end user cancels the installation. Because some files might already be installed when the end user cancels, the Cancel script contains the include script, rollback.wse, which returns the destination computer to its pre-installation state.

Include Scripts

Include scripts are scripts that are added to an installation by way of an Include Script action. See Include Script on page 115. Scripts can be included either in your main installation script or in other include scripts. During runtime, include scripts are run when the Include Script action that references them is encountered. For each Include Script action in your script, a new tab appears at the bottom of Setup Editor. To show tabs for Wise include scripts, mark the Show Tabs for Wise Include Scripts checkbox in Preferences. See Setting Preferences on page 23.

Include scripts can help save time in developing installations, because you can develop a library of WiseScripts that perform very specific functions. You can re-use these specialized scripts in future installations and easily share them with colleagues.

By default, all scripts based on the Empty Project template on the New Installation File dialog contain 2 include scripts: rollback.wse and uninstal.wse. These are special Wise-created scripts. The rollback.wse script is in the Cancel event script and is executed if the end user cancels the installation after it starts. If the end user chooses to backup replaced files, this script will roll the destination computer back to its pre-installation state. The uninstal.wse script adds uninstall support to each new installation.

NoteChanges made to an include script are saved to that script when you save the installation.

When you do a text search, all event scripts are searched and you can mark an option to search all include scripts.

Editing the ScriptTo edit your script in Setup Editor, use the commands on the Edit menu, the right-click menu, or the tools on the toolbar. You can edit only one script line at a time, but you can cut, copy, or paste several lines at one time.

65

About Setup Editor

NoteChanges made to an include script are saved to that script when you save the installation.

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 duplicate or move script lines:

Select the script lines, then select Edit menu > Duplicate or Edit menu > Move Up or Move Down.

To copy and paste script lines:

1. Select the script line or lines.

2. From the Edit menu, select Cut or Copy.

3. If you�re copying the lines to another installation, open that installation script in Setup Editor.

You cannot open multiple scripts in the same instance of WiseScript Editor unless it is an include script. See Choosing a Script to Edit on page 65. However, you can open multiple instances of WiseScript Editor, and open different scripts in each.

4. Select a line in the script above which to place the lines you copied, then select Edit menu > Paste.

The lines appear above the line you selected.

NoteTo insert lines below the line you selected, mark the Append New Items checkbox in Preferences. See Setting Preferences on page 23.

To save a script to a text file:

Select File menu > Save Script Text to File. Specify the location and name of the file. This text file is for viewing and printing only. You cannot make changes in the text file and import it back into Setup Editor.

To comment out script lines:

You can temporarily comment out certain script lines to help with the debug process. Commented out lines remain in the script, but are skipped when the script is executed.

1. Select the line or lines in the script to disable.

2. Select Edit menu > Comment.

The commented out lines appear in green. To reactivate commented out lines, select them again and select Comment again.

To show or hide line numbers or connection lines:

From the right-click menu, select Line Numbers or Connection Lines. Connection lines connect the beginning and end of an if-block or a loop.

66

About Setup Editor

Adding New Actions to a ScriptIn Setup Editor, add actions to a script in any of 3 ways:

! Drag an action from the Actions list onto a line in the Installation Script list. The new action appears above 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, an double-click the action in the Actions list.

! Select the line in the script above which you want the new action to appear, and 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. Use the arrow keys to move up and down the list or continue typing the action name. When the action you want is the current item in the list, press Enter.

NoteTo insert lines below the line you selected, mark the Append New Items checkbox in Preferences. See Setting Preferences on page 23.

When you add an action, a dialog appears that lets you set the parameters for the action unless it does not require parameters. If the new action is a Custom Dialog or Custom Billboard action, the appropriate editing environment opens. For details, see WiseScript Actions on page 83.

Some actions come in pairs. (Example: When you add an If action, you must also add an End action at the end of the conditional block.) Setup Editor indents actions inside these pairs.

Finding Text in a ScriptIn Setup Editor, 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 on the configuration dialogs associated with each script line. The Find command searches from the currently-selected line down to the last line.

1. Select Edit menu > Find.

The Find Text in Installation Script dialog appears.

2. In Find What, enter the text to find.

Use the ? wildcard to represent any character.

3. To search for the text across all scripts, mark Search Across Include Scripts. See Choosing a Script to Edit on page 65.

4. Click Find Next.

The dialog displays the script line that contains the text, with the 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. Press F3 to find the next occurrence.

A message dialog informs you when the search has reached the end of the script.

67

About Setup Editor

Replacing Text in a ScriptIn Setup Editor, use the Replace command to find a string and replace it with a new string. You can only replace parameters and editable text. The Replace command searches from the currently-selected line down to the last line.

1. Select Edit menu > Replace.

The Replace Text in Installation Script dialog appears.

2. In Find What, enter the text to find, and in Replace With, the text to replace it.

Use the ? wildcard to represent any character.

3. To search for the text across all scripts, mark Search Across Include Scripts. See Choosing a Script to Edit on page 65.

4. Click Find Next.

The dialog displays the script line that contains the text, with the text item in which the search text was found. A message indicates if the search text was not found.

5. Click the appropriate button:

� Find NextTo leave the found text untouched and to find the next occurrence of the search text.

� ReplaceTo replace the found text with your replacement text, and to find the next occurrence of the search text.

� Replace AllTo replace all occurrences of the search text. Use this with caution! The text you are searching for might be found in more places than you expect. You cannot undo this operation.

� CloseTo close the dialog when you are done replacing.

When no more occurrences of the search text are found, the search dialog closes.

Checking for Duplicate Files in Include ScriptsIn Setup Editor, 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 the same file is referenced in both the main script and the include script.

1. Select Edit menu > Duplicate Files Report.

It checks the main installation script and all include scripts for duplicates. 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.

2. If the Save As dialog appears, specify a name and location for your duplicate files report.

Notepad opens displaying the duplicate files report. It looks something like this:

c:\export.txtLine: 1 File: c:\include2.wseLine: 49 File: c:\MyInstaller\MainInstall.wse

The duplicate file is C:\export.txt. It is found in line 1 of the file include2.wse and line 49 of the file MainInstall.wse. The file include2.wse is an include script inside the MainInstall.wse script.

68

About Setup Editor

Customizing the List of ActionsIn Setup Editor, the Standard tab displays a list of all available actions and the Custom tab displays your customized list of actions. You can rearrange the actions on the Custom tab.

1. Select Edit menu > Custom Action List.

The Custom Action List Settings dialog appears.

2. To add an action, select an action in the Actions list and click Copy.

3. To delete or reorder a custom action, select the action in the Custom Action List and click Delete or click Move Up or Move Down.

4. Click OK.

You can customize your Actions list further by creating your own user-defined actions. See About User-Defined Actions.

69

About User-Defined Actions

About User-Defined Actions

Setup Editor contains a list of built-in actions that you can add to your script, and it lets you create your own actions. You can streamline your development process by creating actions for tasks you perform frequently with scripting.

Example: You�ve written a section of script that launches a Web page on your company�s 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. 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 this section of script conveniently available in all new installations that you develop, you could turn it into a user-defined action.

User-defined actions appear in the Actions list in Setup 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 WiseScript Editor application directory, or in the directory specified in the Shared Directory field in Preferences.

When you create a user-defined action, specify the following in the script:

Action Name

The file name of the script.

Dialog

Include a dialog only if your action has parameters that you need to change each time you use the action. This dialog appears when your action is double-clicked. Example: For an action that opens a URL in the end user�s browser, you might include a dialog that asks for the URL. Then if the URL changes frequently, you can specify the new URL each time you use the action.

Script Lines

The script lines that perform the action are the functional part of the action. Example: For an action that opens a URL on the destination computer�s browser, the script lines determine the default browser and launch the Web page.

Format of the Script Line

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.

Creating a User-Defined ActionThis procedure outlines the general steps for creating a user defined 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 an example of how to complete these details, see Creating a User-Defined Action Tutorial.

1. Select File menu > New.

2. Select Blank Script and click OK.

If you see a warning message that the installation script is not compatible with Installation Expert, click OK. In Setup Editor, you should see a completely empty script.

3. Select File menu > Save.

The Save As dialog appears.

70

About User-Defined Actions

4. Save the script file in the Actions directory, which is in the WiseScript Editor application directory, or the shared directory specified in Preferences.

The file name you enter is the name that appears in the Actions list in Setup Editor after you exit and re-open WiseScript Editor.

5. If your user-defined action includes a dialog where you can enter options for the action, create the dialog.

� From the Event drop-down list in Setup Editor, select Exit.

� Add a Custom Dialog action to the Exit script, and create your dialog in Custom Dialog Editor.

NoteTo add a drop-down list on your custom dialog that contains all the WiseScript variables currently defined in this script, set the list to display the compiler variable %_VAR_LIST_%. It contains all the non-compiler variables.

6. From Event, select Mainline.

This returns you to the main script.

7. 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 it could be a complex set of script lines that perform advanced functionality.

8. In the Title field, enter the format of the script line.

This determines how the script line of your user-defined action looks in the script.

Example: 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. In Title, you might enter: Display HTML File %URL_PATH%. When you add your user-defined action to an installation script, the dialog appears and you enter www.wise.com/support.htm for the URL. The script line for your user-defined action displays in the format you specified, except that it shows the variable�s value instead of the variable name. It displays: Display HTML File www.wise.com/support.htm.

9. Save the script.

Make sure it is saved in the Actions directory or in the shared directory specified in Preferences.

10. Test your new user-defined action:

� Exit WiseScript Editor. The new action is not displayed in the Actions list until you exit and re-open WiseScript Editor.

� Open WiseScript Editor and select File menu > New > Empty Project.

� In Setup Editor, double-click your user-defined action in the Actions list. If it includes a dialog, the dialog opens. Complete the dialog and click OK.

� Save the project and click Test to test your script.

Creating a User-Defined Action TutorialThis tutorial guides you through the process of creating a user-defined action named Wait. The Wait action contains a custom dialog where you can specify how many milliseconds to pause the installation.

71

About User-Defined Actions

To create a new blank script for the action:

1. Select File menu > New.

The New Installation File dialog appears.

2. Select Blank Script and click OK.

If you see a warning message that the installation script is not compatible with Installation Expert, click OK. In Setup Editor, you should see a completely empty script.

3. Select File menu > Save.

The Save As dialog appears.

4. Save the script file in the Actions directory, which is in the WiseScript Editor application directory, or the shared directory specified in Preferences. Name the file Wait.

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 Setup Editor. The file name you enter is the name that appears in the Actions list after you exit WiseScript Editor and re-open it.

To create a dialog for the action:

1. From Event, select Exit.

To write a script action that interacts with the developer who uses it, you must add a Custom Dialog script line, which you must store in the Exit script.

A user-defined action requires a dialog only if it has parameters that you need to change when you use the action.

2. In the Actions list, double-click the Custom Dialog action.

The Dialog Box Properties dialog appears.

3. In Dialog Title, enter �Enter Time to Wait� and click OK.

The Custom Dialog Editor opens.

4. Click the Text Control tool on the toolbar.

The Text Control Settings dialog appears.

5. In Text, enter �Milliseconds to Wait� and click OK.

6. Click the Edit Text tool on the toolbar.

The Edit Text Control Settings dialog appears.

7. In Default, enter %WAIT_TIME%, in Variable, enter WAIT_TIME, and click OK.

8. Click the Push Button tool on the toolbar.

The Push Button Control Settings dialog appears.

9. In Label, enter OK, mark the Return to Previous Dialog action, mark Default Button, and click OK.

10. Click the Push Button tool on the toolbar again.

The Push Button Control Settings dialog appears.

11. In Label, enter Cancel, mark the Abort Installation action, and click OK.

12. Rearrange the dialog so that it looks something like this:

72

About User-Defined Actions

13. When you are done editing the dialog, select File menu > Save Changes and exit.

To create a script for the action:

1. From Event, select Mainline to return to the main part of your script.

The script should be blank.

2. In Actions list, double-click the Call DLL Function action.

The Call DLL Function dialog appears.

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. To learn more about calling Windows system .DLLs, consult documentation provided as part of the Microsoft Developer Network (msdn.microsoft.com).

3. Complete the dialog:

� DLL PathnameEnter %SYS32%\kernel32.dll.

� Function NameEnter Sleep.

� Call a function with variable parameter listMark this option and click Add.

Complete the DLL Parameter Settings dialog that appears and click OK:

" From Parameter Type, select dword.

" From Value Source, select Constant.

" In Constant Value, Enter %WAIT_TIME%.

4. Click OK on the DLL Parameter Settings dialog.

5. Click OK on the Call DLL Function dialog.

6. In Title (located above the Actions list), enter �Wait %WAIT_TIME% Milliseconds.�

The text you enter determines how the script line looks in the script.

7. Save changes in your script.

It should already be named Wait.wse and should be located in the Actions directory within the WiseScript Editor application directory or in the shared directory specified in Preferences.

To test the action:

1. Exit WiseScript Editor.

You must completely exit and reopen WiseScript Editor for the new action to appear in the Actions list.

2. Open WiseScript Editor and select File menu > New > Empty Project and click OK.

An empty project contains a default script in Setup Editor.

3. In the Installation Script list, click the top line in the script.

73

About User-Defined Actions

4. In the Actions list, double-click the Wait action.

The dialog you created for your user-defined action appears.

5. 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.

6. Save the project.

7. Click Test to test your script.

After the blue screen appears, it should take about nine seconds before the installer�s Welcome dialog appears.

If the action does not work, check the options you entered for the Call DLL statement. If it still doesn�t 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.

You can place the Wait action anywhere in the script to pause the script execution. Example: To display a detailed billboard for several seconds, you could place a Wait action immediately after the Display Billboard script line.

74

About Debug Commands

About Debug Commands

Once you create or modify a script, you are ready to test it. You can do this by using the Test or Run buttons on the navigation bar, or by using the more flexible capabilities of Setup Editor�s debug commands. With these commands, you can single-step through a script or run to a breakpoint to view the script and the values of variables. You can also use Display Message and Compiler Variable actions to generate a debug version when you compile.

Using the Debug CommandsThe Debug menu in Setup Editor has a set of debug commands that let you step through your script to make sure it functions properly. When you run an installation in debug mode, you can see what the script is doing at any time and the values of any variables that have been set.

1. Select Debug menu and select a command.

� GoUse to begin debugging. It launches your installer .EXE and a yellow arrow displays next to your first line of script. Also use it to proceed to the next breakpoint.

� Set BreakpointUse to set a breakpoint at the selected action. A breakpoint is a place in the script that temporarily halts execution.

� Single StepUse to step through the script and execute only the script action with the arrow next to it.

� Stop DebuggingUse to exit the installation and resume normal Setup Editor operation.

2. Edit the script errors as they occur rather than waiting for the installer to finish. Do this by double-clicking the script action, or by using any of the methods for changing a script described in About Setup Editor on page 63.

Changes you make are not reflected in the installer .EXE that is currently running. After you edit an action, the debugger asks whether to stop the installer .EXE.

75

About Debug Commands

Building a Debug VersionYou can use a compiler variable to build 2 versions of an installation: a normal version and a debug version with Display Message actions. You add the Display Message script lines to your script to check the value of a variable or display other relevant information. You then put this script inside a Compiler Variable If block that lets you customize your installer .EXE at compile time. Each time you build the installation, you are asked whether 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.

1. Select Installation Expert > Compiler Variables page.

2. Click Add.

The Compiler Variable Settings dialog appears.

3. Complete the dialog:

� Variable NameEnter _DEBUG_.

� Default ValueEnter NO.

� DescriptionEnter �Compile debug version of this installer?�

� Value ListEnter YES on the first line and NO on the second line.

� Data Entry TypeSelect List of values (single-select).

� Do Not Prompt for Value Make sure this is cleared.

4. Click OK.

The Variables list contains the variables with their values for the selected action. To edit a variable�s value, double-click it.

The red dot indicates that a breakpoint was set for this action. Breakpoints temporarily halt the execution of the installation.

The yellow arrow indicates the next action to be processed.

76

About Debug Commands

5. On the Compiler Variables page, mark Compiling from Within Wise.

6. Select Setup Editor and add the following actions with their parameters immediately below the script line that sets the value of MAINDIR (Set Variable MAINDIR to Application):

� Compiler Variable IfIn If Variable, enter _DEBUG_, select Equals from the drop-down list, and in The Value, enter YES.

� Display MessageIn Message Title, enter Main Directory, and in Message Text enter The Main Directory is %MAINDIR%.

� Compiler Variable EndYou should see the following lines in your script:

Set Variable MAINDIR to ApplicationIf Compiler Variable _DEBUG_ Equals �YES� thenDisplay Message �Main Directory�Compiler Variable End

7. Click Test to test your debug version.

A dialog appears asking if you want to build a debug version.

8. Mark YES and click Next.

Because the Display Message dialog is compiled into the installer .EXE, it appears with the current value of MAINDIR when your installer runs. If you selected NO, the Display Message would not be 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.

77

Basic Scripting Concepts

Basic Scripting Concepts

If you do not have a basic understanding of scripting concepts, you should become familiar with them before attempting to write an installation script.

See:

Conditionals and LoopsVariables and Expressions on page 79Compiler Variables vs. Runtime Variables on page 80Anatomy of a Script on page 81About Components on page 81Setup Editor on page 62

Conditionals and LoopsNormally, 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 true. Example: In WiseScript, you can test what version of Windows a destination computer is running, then execute different script actions depending on whether they�re running Windows 95/98/Me or Windows NT4/2000/XP.

Loops specify script actions that are repeated until a certain condition is met. Example: You might prompt the end user to enter specific information during installation. To make sure the information the end user enters meets certain criteria, use a loop to repeat the prompt until the data entered is appropriate.

If, While, and End Actions

Because a condition or loop can apply to more than one script action, they are defined using at least 2 statements: one to mark the beginning of the block of script and the other to mark its end. The standard action for beginning a condition is the If action, and the standard action for beginning a loop is the While action. The end of both conditionals and loops is marked using the End action. Setup Editor indents everything inside a conditional or loop so you can see which actions are affected.

Else and ElseIf Actions

In addition to the If and End markers, conditionals can use the Else and ElseIf actions, which mark the beginning of actions to be executed when the condition described by the If (or other conditional statement) is not true. When the Else action is used, it 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 are executed if the condition is false. Loops cannot have Else statements.

Nesting

In WiseScript, one conditional or loop can contain another conditional or loop. This is called nesting. You define a nested conditional or loop by adding a second If or While action (or other start-of-conditional or start-of-loop marker) before the End action of the first conditional or loop. The second block of script must be fully contained within the first. When you add an End action, it always applies to the most recently begun If or While action that does not already have an End action. You can nest conditionals and loops as deep as you like, but in most circumstances you won�t find it necessary to nest

78

Basic Scripting Concepts

more than 3 or 4 deep. Setup Editor�s indentation, which increases for each nested structure, helps you interpret deep nestings.

Variables and Expressions

Variables

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 2 sources. Some variables are defined by Installation Expert. (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. You can then gather data from the end user or read data from files to put into variables. Variables hold ASCII text, not binary data. They can be up to 32 KB in length.

Variable Naming Conventions

! Must begin with a letter.

! Must be 28 characters or less.

! Can contain only numbers, letters, and underscore characters.

! Cannot begin with an underscore character; only compiler variables can start with an underscore character.

Variables and Substitution

By using variables the installer .EXE can 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.

To use substitution, specify the variable name preceded and followed by %. (Examples: %WIN% refers to the contents of the WIN variable, which is the path to the Windows system directory, and %WIN%\FONTS refers to the path to the Windows font directory.) The % sign is not part of the variable name, but rather a marker that tells WiseScript to replace the variable�s name with its value before executing the command. To include an actual % sign in your script, use %%.

You can use substitution to:

! Build messages to display to the end user

! Set locations for copying or installing files

! Initialize new variables to the value of one or more other variables.

Expressions

If you are using a variable name as part of an expression, do not surround the variable name with %. (Example: if you use an If, ElseIf, While, Set Variable, or a Wizard Loop action to evaluate an expression, do not enclose the variables you reference in the expression with %.) The exception to this rule is compiler variables. Enclose compiler variables inside percent signs no matter where you enter them.

A few types of actions (If, While, Set Variable, and some others) can use a more flexible scheme that lets you use arithmetic expressions and other options. See Expression Operators on page 195.

To read about scripts that evaluate expressions with an If statement, see Sample Scripts That Use Expression Operators on page 178.

79

Basic Scripting Concepts

Compiler Variables vs. Runtime Variables

When They Are Set

WiseScript has 2 kinds of variables: compiler and runtime. When you initiate a compile 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. Setup Editor then searches the entire script and replaces any instance of the compiler variable with the value. These variables cannot be changed by end users who run the installer .EXE.

Runtime variables are set by selections the end user makes on the installation�s dialogs, by characteristics of their computer, or by the contents of files on their hard disk, such as a settings file, an .INI file, or the registry.

The difference between compiler variables and runtime variables is similar to the difference in C programming 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.

In Conditionals and Expressions

You can use both types of variables 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 % signs, but when you enter a compiler variable in an expression, you must surround the compiler variable with % signs.

With a conditional based on runtime variables, all the script actions required by the conditional are included in the installer .EXE. WiseScript Editor doesn�t know which part of the conditional will be executed until the installer .EXE 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 is built. Therefore, WiseScript Editor does not include the script actions inside a compiler variable conditional when building the installer .EXE.

Naming Compiler Variables

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.

Using Compiler Variables

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 if the conditional is false. You can use this functionality for many purposes. See Compiler Variables on page 30.

Example: You can create a script that compiles an installer .EXE 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 compiled, those files are not in the installer .EXE, making it smaller than a universal installation for both 16 and 32 bit systems.

You can also use compiler variables 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 your debugging actions in compiler variable conditionals, you can easily �strip them out� when the installation has

80

Basic Scripting Concepts

been debugged by changing the value of a compiler variable. The debugging actions are not compiled into the final build. For details, see Building a Debug Version on page 76.

When to Use

! Variable substitution can use either type of variable.

! When a script action places a value into a variable, the variable must be a runtime variable. Compiler variables can�t be changed by scripts, but only by the person who builds the installer .EXE.

! In most other instances, the type of variable to use is implicit (example: the Compiler If script action requires a compiler variable) or noted explicitly.

Anatomy of a ScriptAn installation script has four basic sections. Whether you are modifying the default script generated by Installation Expert or writing your own script from scratch, an understanding of these sections can help insure that your script works correctly.

Initialization

In this section, default values for an installation are set, including the default directory, standard components, and Start menu. Information that is needed later in the installation is read from .INI files or the registry. Files that display to the end user (ReadMe.txt, License.txt, etc.) are installed. A search can also be performed for a previous version of an application to use its location as the default installation directory.

User InputThis section contains a series of dialogs that ask the end user what optional components they want to install, what directory to put the files in, and so on. This section generally uses a Wizard Loop action. It displays any ReadMe or License files installed in the Initialization section.

File Copy

This is the longest section of the installation script. Files are copied from the installer .EXE to the destination computer.

System Configuration

After files have been installed, the destination computer�s configuration files (.INI files, registry, Start menu, etc.) are updated so that the new application works correctly. The end user might then be prompted to restart their computer.

About ComponentsWhen an end user selects to install one or more optional components, a letter corresponding to each component is placed in a variable called COMPONENTS. Selecting the first component places an A in the variable, the second adds a B, and so forth. Up to 26 components can be added. The wizard dialogs created by Installation Expert take care of placing the correct values in the COMPONENTS variable. You can also use the Select Components script action or a custom dialog to accomplish the same result.

In the installation script, use conditional statements of the form �If COMPONENTS contains �A�� to determine which files are installed when each component is selected. Setup Editor scans the script looking for these conditionals to determine how much disk space is required by each optional component. You must use the variable COMPONENTS and the proper conditional format for this feature to work. For an example of a

81

Basic Scripting Concepts

components-based installation script, see Letting the End User Select Components and Subcomponents on page 182.

82

Chapter 5WiseScript Actions

The Wise scripting language, WiseScript, contains script actions that let you perform various installation-related tasks. The script actions are fully coded; all you do is enter parameters for the action. This section describes the function and usage of each action.

For information on how to insert actions or create user-defined actions, see Setup Editor on page 62.

See:

WiseScript Editor and Wise Installation System Script ActionsWiseScript Editor does not support the following Wise Installation System script actions:

Add BDE Alias

Add Directory to PATHAdd ProgMan IconsAdd Text to INSTALL.LOGAdd to AUTOEXEC.BATAdd to CONFIG.SYSAdd to SYSTEM.INIAllow Floppy Disk ChangeBrowse for DirectoryCall DLL FunctionCheck ConfigurationCheck Disk SpaceCheck HTTP ConnectionCheck If File/Dir ExistsCheck In-use FileCheck ServiceCompiler Variable If/Else/EndConfig ODBC Data SourceCopy Local File(s)Create DirectoryCreate ServiceCreate ShortcutCustom BillboardCustom DialogDelete File(s)Display BillboardDisplay MessageDisplay Progress Message

Display Text FileEdit INI FileEdit RegistryElse StatementElseIf StatementEnd StatementEvaluate Windows Installer ConditionExecute ProgramExit InstallationFind File in PathGet Environment VariableGet Name/Serial NumberGet ProgMan GroupGet Registry Key ValueGet System InformationGet Temporary FilenameGet Windows Installer PropertyHalt CompilationIf StatementInclude ScriptInsert Line Into Text FileInstall File(s)Install ODBC DriverModify Component Size

Open/Close Install.logParse StringPausePlay Multimedia FilePost to HTTP ServerPrompt for FilenamePrompt for TextRadio Button DialogRead INI ValueRead/Update Text FileRead/Write Binary FileReboot SystemRegister FontRemarkRename File/DirectorySearch for FileSelect ComponentsSelf-Register OCXs/DLLsSet Control AttributesSet Control TextSet Current ControlSet File AttributesSet Files/BuffersSet VariableSet Windows Installer PropertyStart/Stop ServiceWhile StatementWin32 System DirectoryWizard Loop

83

Configure BDEInstall DirectXInstall WinCE ComponentInstall WiseUpdate Client

To edit a script that contains any of these script actions, use the Wise Installation System.

Add Directory to PATHThis 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 so that the new PATH takes effect.

! Directory to Add to PATHEnter the directory to be added to PATH (example: enter %MAINDIR%).

! Location of New DirectorySelect to add to the beginning or end of the PATH.

! Path SelectionSome destination computers have several PATH variables. Use this list to add the directory to all PATH variables.

Add ProgMan IconsThis action adds and deletes icons and deletes groups in Windows Program Manager desktop (Windows 3.1, Windows NT 3.51) or any DDE-compatible Program Manager replacement. To create shortcuts on Windows later operating systems, use the Create Shortcut action instead of this action. We recommend that, for portability, you use variables to specify file names and paths.

! ActionSelect an action below.

� Add Icon. Specify all the fields below, except Icon PathName and Icon Number.

� Delete Icon. Specify only Group Name and Icon Name.

� Delete Group. Specify only Group Name.

NoteAlways place deletions before additions in the script. If you delete an icon from a nonexistent group, Program Manager might remove an icon with the same name from the last-added group, if it exists. Deleting icons and groups first eliminates this problem.

! Group NameYou can prompt the user for this name and store the result in a variable. If you added a default folder name on the Shortcuts page in Installation Expert, its name is stored in %GROUP% in the standard script.

! Icon Name

! Command LineSpecify the command line to be applied to the icon�s target file.

! Icon PathNameSpecify a pathname to a file where the icon is stored.

84

! Default DirectorySpecify the default directory that should be set when launching the target file, if different from the target file�s location.

! Icon NumberEnter the resource number of the icon (from the pathname specified above).

! Run MinimizedMark this to cause the application to start in a minimized state.

! Separate SpaceMark this to cause a Win16 .EXE to run in its own address space under Windows NT 3.51. If you mark this checkbox, use a Check Configuration action to make sure this action only runs on Windows NT 3.51. Leave this unmarked if this action will run on Windows 3.1.

! Personal GroupMark this to cause the icon to be added to a personal Program Manager group.

Add Text to INSTALL.LOGThis action adds commands to the installation log.

As the installation runs on the destination computer, each action it performs is logged in Install.log (installation of files, additions or changes to registry, and so on). Failures are listed also, with the reason for failure. The uninstall reverses each action recorded in the Install.log, starting at the bottom of the log and going up. Typically, you add commands to the Install.log to customize the uninstall process for an application. To stop and start writing to Install.log, see Open/Close Install.log on page 119.

Specify the location of Install.log on the Installation Log page in Installation Expert. By default, it is created in the application directory (MAINDIR).

In the Add Text to Install.log dialog, enter the text 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.

! Log TextEnter the text to be added to the log file. You can enter variables surrounded by %. To see the format of lines, open existing log files.

Examples

By default, uninstall does not remove files that were installed to Windows, Windows\System, or Windows\System32. To remove these files, place an Add Text to Install.log script line directly before the Install File(s) script lines that install files to one of these directories. Type the following as the Log Text (exactly as shown because it is case-sensitive):

Non-System File:

NoteAlso specify uninstall actions in Installation Expert > Uninstall page.

You can add a line to the Install.log that pauses the uninstall, executes an application until it finishes, then resumes the uninstall. To do this, type the following as Log Text, substituting your own path to the .EXE (case-sensitive):

Execute path: %MAINDIR%\Remove.exe

If you want the uninstall to remove not only files that were installed, but also files that were added later, you can remove all the files and sub-directories within a specified

85

directory. Use this option with caution because end users might have stored their own files in the directory. You can use Windows standard wildcard notation (example: *.* for all files). Type the following as Log Text, substituting your own directory path (case-sensitive):

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

If you want the uninstall to remove not only the registry keys that were installed, but also keys that were added later, you can remove an entire registry key, including all its sub-keys and values. Type the following as Log Text, substituting your own registry tree (case-sensitive):

RegDB TREE: SOFTWARE\Wise SolutionsRegDB Root: 2

where RegDB Root is one of the following:

0 - HKEY_CLASSES_ROOT1 - HKEY_CURRENT_USER2 - HKEY_LOCAL_MACHINE3 - HKEY_USERS

Add to AUTOEXEC.BATThis action edits Autoexec.bat, which is executed during boot, allowing you to add commands that are executed before Windows loads.

Insert commands at a particular line number, or search the file for specific text and insert the new line before, after, or in place of the existing line. The destination computer is restarted after installation to force the new commands to take effect.

! Text to InsertEnter the line to add to Autoexec.bat. If the line refers to an application file, use a pathname (example: %MAINDIR%\Application\Application.exe). The PATH variable might not be set when the command is executed, so always use a pathname.

! Line NumberEnter the line number at which the new line should be inserted. Enter 0 (zero) to append the command to the end of the file. The Search for Existing Text area in this dialog overrides the line number specified here. The line number applies only when the text is not found or when you do not specify any text.

! Search for TextEnter the text to search for here. The installation scans Autoexec.bat looking for a line that begins with, ends with, or contains the text, depending on what you set in Match Criteria. The line is inserted at the first found match.

! Comment TextEnter text to insert at the beginning of the line that is found. Insert �REM � (with the trailing space but without the quotation marks) to comment out the line, which lets you replace an existing command with a new command while leaving the existing command in place but inactive. If this is the case, set Insert Action to insert before the existing line so that a subsequent installation finds and edits the active command, not the commented line.

! Insert ActionSelect where to insert the new line in relation to the found line.

! Match CriteriaSelect how the found line matches the Search for Text.

! Ignore White SpaceMark this to ignore spaces and tab characters.

86

! Case SensitiveMark this to match case.

! Make Backup FileMark this to make a copy of Autoexec.bat before editing it.

Add to CONFIG.SYSThis action edits the Config.sys file to add new commands. Insert commands at a particular line number, or search the file for specific text and insert the new line before, after, or in place of the existing line. The destination computer is restarted automatically to force the new commands to take effect.

! Text to InsertEnter the line to add to Config.sys. If the line refers to a file, use a pathname. Example: %SYS%\Application.DLL. %SYS% refers to the active system folder.

! Line NumberEnter the line number at which the new line should be inserted. Enter 0 (zero) to append the command to the end of the file. The Search for Existing Text area in this dialog overrides the line number specified here. The line number applies only when the text is not found or when you do not specify any text.

! Search for TextEnter the text to search for here. The installation scans Config.sys looking for a line that begins with, ends with, or contains the text, depending on the setting of the Match Criteria field. The line is inserted at the first found match.

! Comment TextEnter text to insert at the beginning of the line that is found. Insert �REM � (with the trailing space but without the quotation marks) to comment out the line, which lets you replace an existing command with a new command while leaving the existing command in place but inactive. If this is the case, set Insert Action to insert before the existing line so that a subsequent installation finds and edits the active command, not the commented line.

! Insert ActionSelect where to insert the new line in relation to the found line.

! Match CriteriaSelect how the found line matches the Search for Text.

! Ignore White SpaceMark this to ignore spaces and tab characters.

! Case SensitiveMark this to match case.

! Make Backup FileMark this to make a copy of Config.sys before editing it.

Add to SYSTEM.INI(Windows 3.1x or Windows 9x only.) This action adds a device entry to the 386Enh section of the System.ini file. The destination computer is restarted automatically to force the new device driver to be loaded.

Do not use this action to modify the display driver (display=xxx) or any other non-device entry. Instead, use the Edit INI action. See Edit INI File on page 105.

87

! Device NameEnter the full command line for the device (example: device=vshare.386). The referenced files need a pathname unless they are in the System directory.

If you precede the command line with a semicolon (example: ;device=*vcp), the device entry is commented out if it exists in the 386Enh section of System.ini. If you add a device entry with the same device name but a different driver pathname, the old entry is commented out and the new entry is added.

Allow Floppy Disk ChangeThis action closes all files in use by the installation, which lets the end user change floppy disks. Windows does not allow floppy disk changes when files are open. (Example: Use this script action to run an .EXE located on another disk.) Because built-in code handles floppy disk changes for the next installation disk, use this action only for special circumstances.

Because this action requires no configuration, no dialog appears when you add it.

Browse for DirectoryThis action displays a dialog asking the end user to select a directory. It is included to provide backward compatibility for older WiseScripts. In new scripts, use custom dialogs instead.

! Window NameEnter the title for the dialog.

! DescriptionEnter text to explain the dialog to the end user.

! Prompt NameEnter explanatory text to be displayed above the directory field.

! Default ValueEnter the default location of the new directory. This appears as a default in the directory field.

! Variable NameEnter a variable to store the chosen directory. The standard script uses the variable MAINDIR for this purpose.

! Don�t AppendMark this to prevent the default directory (Default Value field) from being appended to the chosen directory.

! Confirm If ExistsMark this to warn the end user if the chosen directory already exists.

Call DLL FunctionThis action calls a .DLL function from a .DLL on the destination computer. They can be be .DLLs you�ve written, .DLLs developed for WiseScript, or Windows .DLLs. You can branch the script based on the returned results of a .DLL by setting the Action to Start Block if Return Value True or Start While Loop.

! DLL PathnameSpecify the pathname of the .DLL file (example: %MAINDIR%\JSO32.DLL).

For non-system .DLLs, the installation script must install the .DLL before the script calls it or it will not be found. If the .DLL is only needed temporarily during installation, copy it to the Temp directory, represented by %TEMP%.

88

NoteYou cannot test an installation that installs and immediately calls a .DLL unless you install the .DLL to the Temp directory. Testing installs files, then immediately deletes them, unless they are installed to the Temp directory.

! Function NameEnter the name of the function to call. The function should be exported when creating the .DLL. The function�s parameters and return value must exactly match those specified below (case-sensitive).

! Call a function written specifically for WiseScriptWhen calling functions developed specifically for WiseScript, mark this option and fill in Variables Added, Parameter String, and Action below.

Each .DLL function takes a single parameter (lpDllParams) that points to a structure containing information that can be passed back and forth between the .DLL function and the running installation script. The Prompt.wse sample script contains an example of this.

! Variables AddedBecause WiseScript-specific .DLL functions have access to the variable list of the running installation, you can add new variables. List the names of the variables to add, separated by commas. Do not use variables enclosed in %.

! Parameter StringUse this to pass information to the .DLL function. Text you enter here is passed to the .DLL in the IpszParam variable. This can include variables surrounded with % signs.

! ActionSelect the installation�s action when it returns from the .DLL call. The .DLL returns a boolean value (zero equals false, non-zero equals true).

� Ignore return valueThe script continues regardless of any value returned.

� Exit if function returns trueThe installation exits if the .DLL function returns non-zero.

� Start block if function returns trueIf the .DLL function returns non-zero, all actions between this action and its matching End action are executed. Otherwise these actions are skipped.

� Loop while function returns trueThe actions between this action and the matching End action (including the .DLL call) are executed repeatedly until the .DLL function returns zero.

! Perform while loop at least once.If you select Loop while function returns true, mark this to force the loop to execute once before the test is performed. If the checkbox is cleared, the loop is executed if the condition is true, but is not executed if the condition is false.

! Call a function with variable parameter list(Enables the options below.) Mark this to call .DLLs not specifically written for WiseScript. These .DLLs cannot access any of the installation�s internal variables, but you can pass this information to them. Below, specify the required parameters and Return Value Type.

! Return Value TypeSelect the data type of the return value, which are described in DLL Parameter Settings.

89

! Returned VariableSelect or enter a variable to store the returned value.

! Hide progress bar before calling functionIf the .DLL has UI, you can us this to hide the progress bar.

If you write a .DLL, use CALLBACK or WINAPI in the declaration of the .DLL. To help with .DLL development, review sample source code, such as GETCPU32.C, in the WiseScript Editor\DLL directory. Also included is sample source code for C and Delphi .DLLs written for WiseScript. Calling Visual Basic ActiveX controls is not supported. To read about scripts that use this action, see Sample Scripts That Call .DLLs on page 184.

DLL Parameter SettingsThe DLL Parameter Settings dialog appears when you add a new parameter to a Call DLL Function action. Add parameters in the order in which they appear in the .DLL�s function prototype.

! Parameter TypeCheck the table below for alternate names for data types.

WiseScript Corresponds to Win32 SDK type

Corresponds to Visual Basic type

Description

short SHORT Integer 16-bit, signed integer data type

word WORD Integer 16-bit, unsigned integer data type

long LONG, LRESULT, BOOL Long, Boolean 32-bit, signed integer data type

dword DWORD (Use this for any parameter type that begins with an �H� or ends with the word �HANDLE,� such as HWND, HANDLE, HPEN, HFONT, and LPHANDLE.)

Long 32-bit, unsigned integer data type

string pointer Use for any parameter that ends in STR such as LPSTR and LPTSTR.

Long 32-bit pointer to an ANSI character type null terminated string

short pointer Pointer to SHORT or SHORT* (use for PSHORT or LPSHORT)

Long 32-bit pointer to a SHORT data type (see SHORT for the reference to this data type)

word pointer Pointer to WORD or WORD* (use for PWORD or LPWORD)

Long 32-bit pointer to a WORD data type (see WORD for the reference to this data type)

long pointer Pointer to LONG or LONG* (use for PLONG or LPLONG)

Long 32-bit pointer to a LONG data type (see LONG for the reference to this data type)

90

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

! Buffer LengthIf you set Parameter Type to string buffer, then this field is enabled. Enter the number of string buffer characters. The limit is 446.

! Passing typeLeave this set to Normal unless you are passing a complex structure to the .DLL. In that case, select First element of structure for the first element in the structure, and select Contained within structure for all subsequent elements of the structure. You do not pass the structure name, just the elements inside it. See Passing Complex Structures to a .DLL: An Example.

! Value SourceSelect 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 NameIf Value Source is set to Variable, select or enter a variable.

! Constant ValueIf Value Source is set to Constant, enter a constant here. You can enter a variable here (example: %NUMUSERS%).

NoteWiseScript Editor maintains backward compatibility with .DLLs written specifically for the API available in previous versions so that you can continue to use older scripts with the new WiseScript Editor. However, future versions of WiseScript Editor might not support this API, and it is therefore not documented here. For new installations, write standard .DLLs and specify their parameters as explained above.Compile both 16-bit and 32-bit functions using the large memory model, or explicitly declare all pointers to the structure as far. WiseScript reserves 5KB of stack space for 16-bit .DLL functions you call, and 100KB of stack space for 32-bit .DLL functions you call. You must free any memory allocated by your .DLL routines.

Passing Complex Structures to a .DLL: An ExampleIn addition to passing simple parameters, such as integers and strings, to a .DLL, you can also pass complex structures (sometimes called records in Pascal or Visual Basic).

dword pointer Pointer to DWORD or DWORD* (use for LPDWORD or PDWORD)

Long 32-bit pointer to a DWORD data type (see DWORD for the reference to this data type)

string buffer char [size] String Use to place a character buffer of the given size (number of characters) into a structure. Use only with structures.

WiseScript Corresponds to Win32 SDK type

Corresponds to Visual Basic type

Description

91

For each parameter, you select a passing type. For non-structure parameters, select Normal from Passing Type in the DLL Parameter Settings dialog. However, for structure elements (also referred to as members), select First element of structure for the first item in the structure, or Contained within structure for subsequent items. A structure ends if there are no more parameters, or if the next parameter is set to Normal or First element of a structure.

NoteThe following code samples are in the C programming language.

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

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

where EMPLOYEE* is a pointer to a structure, int is a simple integer, and DEPARTMENT* is a pointer to a structure.

In this example, the layout of the EMPLOYEE structure is as follows:

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

}

The layout of the DEPARTMENT structure is as follows:

typedef structure DEPARTMENT {LPSTR deptname;LPSTR deptnum;

}

To call the function NewEmployee from an installation script, you add 6 parameters in the Call DLL Function dialog: the 3 elements of the first structure, the integer, and the 2 elements of the second structure. To add parameters, see DLL Parameter Settings on page 90.

Parameter in the C functionParameter type in Wise

Passing Type in Wise

name (first element of EMPLOYEE structure)

string pointer First element of a structure

salary (second element of EMPLOYEE structure)

long Contained within structure

title (third element of EMPLOYEE structure)

string buffer(buffer length of 50)

Contained within structure

int long Normal

deptname (first element of DEPARTMENT structure)

string pointer First element of a structure

deptnum (second element of DEPARTMENT structure)

string pointer Contained within structure

92

Check ConfigurationThis action tests the hardware configuration, operating system, and other characteristics of the destination computer. As a result of this check, the action can display a message, halt the installation after displaying a message, or start a conditional block.

! If SystemUse the drop-down lists to build a statement of what to check for.

NoteWhen you check for an operating system, this action looks for the minimum operating system of the type for which you�re checking. Example: If you check for Windows 2000, this action returns TRUE if Windows 2000 or Windows XP is running.

! ActionOccurs when the statement above is true. All options below display the message described in Title and Message Text below, unless Message Text is blank.

� Display Message Only.

� Abort Installation.

� Start BlockBegins a conditional block. All actions between this action and the next Else or End action are executed.

! TitleEnter the title for the dialog.

! Message TextAppears in the body of the message dialog. Leave this blank to prevent a message from appearing.

93

NoteChecking for �Share Loaded� opens a temporary file and attempts to lock a section of it. It detects all versions of DOS SHARE, Windows VSHARE, Windows NT/2000/XP, and Windows 95/98. Checking for �VGA or better� graphics makes sure display resolution is at least 640x480. Checking for free memory tests the amount of memory (including virtual memory) available at installation time.

To read about scripts that use this action, see Sample Scripts That Check System Configuration on page 184.

Check Disk SpaceThis action determines if there is enough disk space available for installation, based on files that are always installed as well as optional components the end user selects to install. If you add components on the Components page, the Files page in Installation Expert shows an Always Installed folder and other component folders.

If the installation contains no optional components, you can leave all fields blank and the action checks disk space for all files. This action takes the cluster size of the disk into account.

! Component Variable(s)If the installation includes components, specify the variable that contains the list of components the end user selects (named COMPONENTS in the default script). This variable is set by the Select Components action or the Select Components custom dialog.

! Status VariableSelect or enter the variable to store the result of the disk space check. If there is not enough disk space, an error message is displayed, and the end user can halt installation, ignore the error, or retry the disk space check. Status Variable is set to R if the end user chooses to retry, which lets you define what retrying means. (Example: Let the end user select a different directory or different components.) If no status variable is selected, clicking Retry simply executes the test again.

! Reserve SpaceYou can specify required disk space for up to 3 additional disks. (Example: Use this option if your application requires temporary disk space to operate, or if you plan to run a separate installer .EXE to install another application with its own space requirements.) Select or enter a Disk Variable, which contains a directory name to test. Enter the amount of space to check for in Extra Space. See Modify Component Size on page 119.

! Do not cancel during silent installationMark this to continue installing if the disk space check fails during a silent installation. A message is written to the Install.log. Otherwise, if the disk space check fails, the installation is halted with no message to the end user.

To read about a script that uses this action, see Sample Scripts That Check System Configuration on page 184.

Check HTTP ConnectionThis action determines whether a given URL is valid by using WinSock.dll to attempt to download the HTML page.

94

If the installation is not true 32-bit, specify both Win16 and Win32 error variables. Then, the Win32 WinSock.dll is used, followed by the Win16 WinSock.dll. Otherwise, only the 32-bit version is used.

If the download is successful, the Win32 Error Number Variable or Win16 Error Number Variable is set to 0, which indicates success. If an error occurs, the number variable is set to another error code, and the text variable is set to a string that describes the error return codes. The return codes and error strings come from the APIs that attempt the download. A sample of the return string is:

ProxyServer=ProxyIgnore=ProxyPort=80ProxyType=CERNWinInetText=WinInetError=0WinSockError=11001

This indicates that no proxy server was used and that WinSock returned the error code 11001.

NoteIf the Web server redirects invalid URLs to another internal Web page, no error is detected by this action.

In the Check HTTP Connection dialog, specify the URL to check, then select or enter variables to store returned error numbers and error text.

! URL to CheckInclude �http://� in the URL.

! Win32 Error Text VariableSelect or enter a variable to store the error text returned by the 32-bit winsock.dll.

! Win32 Error Number VariableSelect or enter a variable to store the error code returned by the 32-bit winsock.dll.

! Win16 Error Text VariableSelect or enter a variable to store the error text returned by the 16-bit winsock.dll.

! Win16 Error Number VariableSelect or enter a variable to store the error code returned by the 16-bit winsock.dll.

Check If File/Dir ExistsThis action determines if a file or directory exists, whether a directory is writable, or if a .DLL is loaded into memory. It can perform different actions based on the result of the check.

! IfSelect a test. To check if a .DLL is loaded, select Module loaded in memory.

! Pathname

� To check a file or directory, enter its pathname. Wildcard characters, such as *, are not valid. Use variables (example: %WIN%) rather than hardcoding a path.

� To check if a .DLL is loaded, enter just the .DLL name, not a pathname.

! TitleEnter the title for the dialog.

95

! Message TextAppears in the body of the message dialog. Leave this blank to prevent the message from appearing.

! ActionOccurs when the If statement above is true. The message described in the Title and Message Text fields appears unless Message Text is blank. In addition, select from these options.

� Display Message Only

� Abort Installation

� Start BlockBegins a conditional block. All actions between this action and the next Else or End action are executed.

� Start While LoopBegins 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 onceIf you chose Start While Loop, mark this to force the loop to execute once before the test is performed. If the checkbox is cleared, the loop is executed if the condition is true, but is not executed if the condition is false.

To read about a script that uses this action, see Prompting the End User to Insert a Floppy Disk on page 177.

Check In-use FileThis action determines whether a particular file is �in use�, indicating a file is being accessed by a process. Typically, in-use files cannot be moved, deleted, or opened by other processes.

! VariableSelect or enter a variable to store the result of this test. After this action runs, the variable contains one of the following values: In-Use, Not In-Use, or Non-Existent (which means the file could not be found).

! PathnameEnter the pathname of the file to check. You can use variables to build the pathname.

Check ServiceThis action checks if a particular service is running. You can check services on Windows 3.51, NT 4.0, 2000, and XP. On other operating systems this action always returns a result of Unknown.

! VariableSelect or enter a variable in which to put the status of the service. Possible return results are: Unknown, Running, Stopped, Paused, StartPending, StopPending, ContinuePending, or PausePending. Unknown means the service was not found or the current user does not have privileges to query the service. If the status ends with the word Pending, the service has received a request, but is still processing the request.

! Service NameEnter the name of the service. This is not necessarily the same name you see in the Services control panel. If you are unsure of the service name, consult its documentation or manufacturer.

96

Compiler Variable If/Else/EndCompiler Variable If, Else, and End statements let you to compile different versions of the installation program. Compiler variables are set at compile time, and Compiler Variable If, Else, and End statements determine which parts of the script are included based on a compiler variable value. You create compiler variables on the Compiler Variables page in Installation Expert. The value of the compiler variable can be set by: the default value you enter when creating the compiler variable, a dialog that prompts you at compile time for the value, or on the command line.

With Compiler Variable If, Else, and End statements, the statements inside an If block are added to the script according to the value of the compiler variable. Example: On the Compiler Variable page, create a compiler variable named _DEBUG_, set to �N� by default, and make sure the Compiling From Within Wise option is marked. Then in the installation script, add a Compiler Variable If statement that checks if _DEBUG_ equals �Y�. In the If block, add a Display Message action that contains useful debug information, such as the value of a variable. End the If block with a Compiler Variable End statement. When you compile, you are prompted for the value of this compiler variable. If you change it to �Y�, then the Display Message action within the Compiler Variable If block is added to the final script.

Complete the Compiler Variable If Settings dialog:

! If VariableBuild an If statement by selecting a compiler variable and a comparison. The first list shows compiler variables on the Compiler Variables page in Installation Expert. The second list shows available comparisons. If you select File Exists from the second list, the If statement checks to see if the file that you enter in The Value exists. If you select File Version Equal or Greater, specify the file in The Value.

! The Value(Case-sensitive) The value for the comparison operation. Do not use variables in this field, because it is checking on your computer in real time, not runtime.

You can add a Compiler Variable Else action, and you must include a Compiler Variable End action.

To read about a script that uses this action, see Sample Scripts That Perform Tasks on page 177.

Also see:

Compiler Variables on page 30Compiler Variables vs. Runtime Variables on page 80Building a Debug Version on page 76

Config ODBC Data SourceThis action configures an ODBC data source for use with an existing ODBC (Open Database Connectivity) driver.

! Data Source NameThis name will be displayed in the ODBC data sources list on the destination computer.

The Import button adds an ODBC data source from your computer and populates the fields.

! Driver NameEnter the name of the ODBC driver used by this data source. The driver, along with its support files, must already have been installed on the destination computer.

97

! Install Data Source forSelect Win16 or Win32 APIs.

! Data Source AttributesEither enter attributes, or use the Import button to import them from an ODBC data source installed on your computer.

! Display Configuration DialogsMark this to display standard data source configuration dialogs to the end user. Otherwise, the data source is configured with default settings.

! System DSNMark this checkbox to make the data source available to all user accounts on the destination computer.

Copy Local File(s)This action copies uncompressed files from a floppy disk, CD, the destination computer, or a network drive. It can also copy files from an FTP or HTTP server.

! SourceSpecify the pathname of the file or files to be copied at installation time. Specify the path using a variable, such as %INST% for the directory where the installation .EXE is running. The value of the field should evaluate to a valid directory, file, or files.

To copy more than one file, do one of the following:

� If you want the progress bar to update correctly, specify a directory in Source without wildcards (example: %INST%\Pictures\), a directory in Destination, and a directory ending with a wildcard in Local Path (example: C:\MyPictures\*.jpg). The Source field will pick up the wildcard specified in Local Path. Specifying a wildcard in both the Source field and the Local Path field results in a compile error.

� If you don�t need the progress bar to update correctly, use wildcards in Source (example: %INST%\Pictures\*.jpg), specify a directory in Destination, and leave Local Path blank.

NoteWildcards cannot be used if you are copying from an FTP or HTTP server.

! DestinationSpecify the location on the destination computer. If a single file is being copied, this should contain a full file path. If multiple files are being copied, this should contain a full directory path. To copy files to the installation directory, start this path with %MAINDIR%.

! DescriptionEnter text to display in the progress bar during file copy.

! Local PathA hard-coded path that specifies the location of the files on your computer at compile time. Specify this for the installation progress bar to update correctly based on file size. See the description of the Source field above.

! Require PasswordIf you entered a password in Installation Expert > Password page, and you mark this, the end user is prompted for the password before this file is installed.

98

The password prompt appears only once, for the first password-protected file in an installation, regardless of the number of password-protected files. If no password-protected files are slated for installation, the prompt does not appear.

! Include Sub-DirectoriesIf you specify a directory in Source, mark this to include all subdirectories and their contents.

! Shared DLL CounterIf this is marked, and the file is a .DLL or .VBX, Windows tracks the file to prevent its removal if an application is still using it.

! No Progress BarMark this to hide the progress bar while this file is being copied.

! Self-Register OCX/DLL/EXE/TLBAll .OCXs and .TLBs and some .DLLs and .EXEs support self-registration. Mark this so the file registers itself in the Windows registry before it is used. This action does not register the file, but specifies that it should be registered later. Include a Self-Register OCX/DLL action to register the file. See Self-Register OCXs/DLLs on page 127.

! Don�t Convert to FloppyIf Convert CD-ROM to Floppy is marked in Installation Expert > Build Settings page, mark this to override that option for this file.

! Replace Existing FileSelect when to replace existing files on the destination computer.

� AlwaysThe new file always replaces the old file.

� NeverThe file never overwrites an existing file. Select this for files that should be installed if they are not present, but that might be customized by the end user and should therefore not be replaced on re-installation (example: configuration files).

� Check FileThe existing file is replaced only if the requirements you set in File Version and File Date/Time are true.

" Doesn�t MatterSelect this option if only one of the requirements, File Version or File Date/Time, must be fulfilled to replace the existing file.

" Same or Older For File Version, this replaces the existing file if it has a version resource that is the same as or older than the new file. If the existing file lacks a version resource, it is not replaced.

For File Date/Time, this replaces the existing file if its modification date and time are the same as or older than the new file.

" Older For File Version, this replaces the existing file if it has a version resource that is older than the new file. If the existing file lacks a version resource, it is not replaced.

For File Date/Time, this replaces the existing file if its modification date and time are older than the new file.

! Retain Duplicates in PathBy default, version checking removes existing copies of .DLLs that are found in the path list. To suppress this feature, mark this checkbox.

99

To read about a sample script that uses this action, see Downloading a File From a Web Site During Installation on page 183.

Create DirectoryDirectories are created when files are installed to them. Use this action only to create an empty directory on the destination computer.

! PathnameEnter the directory path to create. Start the path with a variable (example: %MAINDIR%).

Create ServiceThis action installs a Windows service on operating systems where they are supported.

! Service NameEnter the internal service name, which is used in the registry.

! Display NameEnter the name to appear in the Services control panel.

! Executable PathSpecify the complete path to the executable file as it will be on the destination computer. Start the path with a variable (example: %MAINDIR%).

! Login Username, Login PasswordEnter the user name and password under which the service should run.

! Error ControlSpecify what happens if an error occurs while the service starts.

� Ignore ErrorLogs the error and continues.

� Normal ErrorDisplays a message to the end user, logs the error, and continues.

� Severe ErrorLogs the error. If the computer is booting the last known good configuration, boot continues. Otherwise, it reboots to the last known good configuration.

� Critical ErrorLogs the error if possible. If the computer is booting the last known good configuration, boot fails. Otherwise, it reboots to the last known good configuration.

! GroupEnter the name of the load ordering group to which this service belongs. Leave this empty if the service does not belong to a group.

! DependenciesEnter a list of semicolon-separated names of services or load ordering groups that must start before this service. Leave this empty if there are no dependencies. If a service is dependent on a group, at least one member of the group must be started for this service to run.

Enter a plus sign (+) before group names to distinguish them from service names. Services and service groups share the same name space. Example: If you enter this string, "ftpsvr;httpsvr;drc;+sample", you create dependencies on the ftpsvr, httpsvr, and drc services and the sample group.

! Service TypeSelect a service type.

100

! Start ServiceSelect the default setting for starting the service.

! Service Interacts With DesktopMark this to let the service display its user interface.

Create ShortcutThis action creates a shortcut. Common locations include the Start menu (%STARTMENUDIR%), the Startup directory (%STARTUPDIR%), the installation directory (%MAINDIR%), and the desktop (%DESKTOPDIR%).

! Source PathSpecify the path of a file that will be installed on the destination computer. Start the path with a variable (example: %MAINDIR%\application.EXE) and do not enclose it in quotation marks.

! Destination PathEnter the path to the shortcut to be created, which should end in .LNK (example: %GROUP%\application.lnk). For the current user�s desktop, Start menu, or Startup directory, use %DESKTOPDIR%, %STARTMENUDIR%, or %STARTUPDIR%. For the All Users equivalents, use %CDESKTOPDIR%, %CSTARTMENUDIR%, or %CSTARTUPDIR%.

! Command Options(Optional) If the shortcut is for an .EXE, enter command line options.

! Default DirectorySpecify the default directory that should be set when launching the target file, if different from the target file�s location. In Windows Explorer, this field is referred to as the Start in directory.

! DescriptionEnter text to appear in the Comment field of the shortcut�s properties dialog.

! Icon Pathname(Optional) Specify the file that contains the icon to be used for the shortcut. Otherwise, the target file�s icon is used.

! Window SizeSelect window appearance.

! Icon NumberEnter the number of the icon to use from the file specified in Icon Pathname above.

! Shift State, Hot Key LetterThese fields together populate the Shortcut Key field in the shortcut�s Properties dialog in Windows Explorer. For details, see Windows help.

! Support OSD software update checkingOpen Software Description (OSD) is a Microsoft technology for describing and distributing software. Mark this for the shortcut to work with OSD.

! Check self-repair items when this shortcut is openedMark this to turn on self-repair functionality for this shortcut if you have configured the installation for self-repair. See Configuring an Application for Automatic Self-Repair on page 20. Typically, use this for a shortcut that launches the application.

101

Custom BillboardThis action opens the Custom Billboard Editor, which lets you create scalable images to display to end users during installation. For details, see Creating Custom Billboards on page 162.

Custom DialogUse this action to create your own dialog or dialog set. For details, see Creating Custom Dialogs on page 134. To add a new dialog within a wizard loop, see Adding a Dialog to the Installation on page 135.

To read about scripts that use this action, see Sample Scripts That Use Complex Dialogs on page 179. For details on the dialog Properties dialog, see Setting Dialog Properties on page 137.

Delete File(s)This action removes files from the destination computer.

You do not need to delete temp files if you use the Get Temporary Filename action to create them because they get deleted automatically.

! PathnameSpecify the file or files to delete (examples: %TEMP%\Application.dll or %MAINDIR%\*.htm). You cannot perform wildcard deletions in the Windows, System, or root directories. Clicking Browse shows only files in the current WiseScript that are installed into the %MAINDIR%, %SYS32%, %SYS%, OR %FONTS% directories.

! Include Sub-DirectoriesIf you entered the pathname to a directory or used a wildcard, mark this to delete matching files in all subdirectories as well.

! Remove Directory Containing FilesIf this is marked, and if the deletion leaves the directory empty, then the directory is deleted also.

Display BillboardThis action displays a bitmap or .GRF file during installation if you have the background set to display a gradient (in Installation Expert > Screen page). Create .GRF files (scalable bitmaps) with the Custom Billboard Editor. See Creating Custom Billboards on page 162. You can use up to 16 Display Billboard actions in the script.

! PathnameSpecify the full pathname to the image file on your computer. To use variables in this field, you must mark the Local Graphic option below.

! X-Position, Y-PositionIndicate the location on a 640 x 480 screen to place images. On larger screens, the billboard is placed proportionately based on the 640 x 480 location.

! Erase NumEnter how many previously displayed graphics are erased before this image is displayed. To display 1 image at a time, set this to 1. To display all images simultaneously, set this to 0. The oldest image is removed first.

! Build EffectSelect a transition effect.

102

! TransparentMark this to have pure blue (R=0, G=0, B=255) parts of the image become transparent.

! Center Horizontal

! Place at Right

! Scale to ScreenMark this for the image to cover the same percentage of the screen regardless of screen size.

! Hide Progress BarMark this to hide the progress bar during image display.

! Center Vertical

! Place at Bottom

! Tile BackgroundMark this checkbox to repeat the graphic edge-to-edge to fill the entire screen.

! Erase AllMark this checkbox to remove all previous graphics from the screen before displaying the new one.

! Timed DisplayMark this checkbox to display a series of graphics at evenly-spaced intervals, which is calculated by the number of files to be installed. Place all Display Billboard actions before the first Install File(s) action if you are using Timed Display.

! Local GraphicNormally, you specify image files on your computer, which are then compiled into the installation. Mark this to specify a file from the destination computer. With this option, you can use variables in the Pathname field above. Example: %INST% to indicate the directory from which the installation .EXE is running. Use this to change graphics without rebuilding the .EXE.

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

Display MessageThis action displays a message dialog and can optionally branch the script based on the end user response. Without the branching option, this dialog has an OK button, which continues, and a Cancel button, which halts installation.

! Message TitleEnter the title for the dialog.

! Message TextThis is displayed in the dialog. Press Ctrl+Enter to add line breaks in the displayed text. You can use variables in this text.

! Message IconSelect an icon for the dialog.

! Start If BlockMark this to display Yes, No, and Cancel buttons instead of OK and Cancel. This action then acts like an If action. Statements between this action and its matching End action are executed if the end user clicks Yes. If the user clicks No, execution continues with the first action after the End action. Cancel halts the installation.

103

! No CancelMark this to suppress the Cancel button. Use this in informational messages to prevent the end user from canceling installation.

NoteThe Display Message action can help you debug. Use this action anywhere in the script to display the value of a variable by entering %VARIABLE_NAME% in Message Text. See Building a Debug Version on page 76 for more information.

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

Display Progress MessageThis action displays a small dialog during installation, typically to indicate the computer is still working during a long operation. The dialog cannot be closed or cancelled. Also use this action to remove a previous progress dialog.

! Remove previous progress message(s)Mark this to remove the previous progress dialog from the screen. Marking this disables the rest of this dialog. To display another progress message, add another Display Progress Message action.

! Display a new progress message

� Message TitleEnter the title for the dialog.

� Message TextEnter text to display in the dialog. You can use variables in this text.

� X-Position, Y-PositionIn pixels, enter the location of the upper left corner of the dialog.

� Height, WidthIn pixels, enter the dimensions of the dialog.

� Center HorizontallyMark this checkbox to override the X-Position field.

� Center VerticallyMark this checkbox to override the Y-Position field.

Display Text FileThis action displays a 30K or smaller text file in a dialog. It is included to provide backward compatibility for older WiseScripts. In new scripts, to display the ReadMe file, use the ReadMe dialog on the Dialogs page in Installation Expert.

! File PathnameSpecify a file on the destination computer (examples: %MAINDIR%\Readme.txt, %TEMP%\%TEMPFILENAME%).

! Window TitleEnter the title for the dialog.

! DescriptionEnter text to explain the dialog to the end user.

104

Edit INI FileThis action edits an .INI file on the destination computer. To edit SYSTEM.INI, use the Add to SYSTEM.INI action instead.

! FileEnter the .INI file pathname, or select a path from the list and edit it.

! INI File ContentsEnter changes to make in the .INI file. Changes are interpreted as follows:

� To add to a section, type the section name in brackets, then type new lines for that section. If the .INI file already contains a name-value pair that you type, the existing line is replaced by the new one. Example:

[SECTIONNAME]Color=Blue

� To delete a section and its contents, type a section name with no lines after it. Example:

[SECTIONNAME]

� To delete a name-value pair, type the name with an equals sign followed by nothing. Example:

Color=

� Comments (lines starting with ;) are not supported.

Edit RegistryThis action adds, edits, or deletes registry keys or values. Create registry entries manually or import a registry file (.REG).

To copy registry settings from your computer�s registry, use Installation Expert > Registry page instead.

! Registry KeysThis field shows root registry keys and the keys added by this action. Select a root before adding or importing a key.

! Value NamesThis field shows values being added or changed that reside under the key selected on the left.

! New KeyTo add a new key, select the parent key in Registry Keys, click the New Key button, and select Key from the drop-down. A dialog appears, where you enter information about the new key. See Registry Key Settings Dialog on page 106.

To import from a .REG file, select the parent key in Registry Keys, click the New Key button, and select Import.

When you add a key, you are not necessarily adding it to the registry on the destination computer. If the key already exists, this action might add a value to it, update it, or delete it and all its associated values.

! Delete KeyRemoves the selected key from the current installation. This does not remove it from the destination computer. To do that, you must change the Operation field in the key�s details dialog.

! New ValueTo add a new value, select the parent key in Registry Keys, then click the New Value button. A dialog appears, where you enter information about the new value.

105

! Delete ValueRemoves the selected value from the current installation. This does not remove it from the destination computer. To do that, you must change the Operation field in the value�s details dialog.

! Data SettingsThese fields in this section of the dialog correspond to fields you set when creating the value. See Registry Key Settings Dialog on page 106.

To read about a script that uses this action, see Running a Program Once After Computer Restart on page 178.

Registry Key Settings DialogThis dialog appears when you double-click the Edit Registry action and create or edit a registry key on the Edit Registry Settings dialog. This dialog also appears when you create or edit registry entries on the Registry page in Installation Expert.

! OperationSelect the operation to apply to the key or its associated value.

� Create/update key and valueThe value is updated if it already exists. If the key or value does not exist, it is created.

� Create empty keyCreates the key but does not add any values.

� Remove key and all subkeysDeletes the key, its subkeys, and all named values associated with the key and its subkeys on the destination computer.

� Remove key and value onlyRemoves the named value from the key on the destination computer. If the key has other named values, they are preserved.

� Preserve existing key and valueAdds a new key or value if the specified item does not exist, but leaves the existing value in place if one already exists.

! RootSelect the parent key in which the new key is added.

! KeyEnter the name of the new key. You can create multiple hierarchical keys at once by separating them with backslashes, as in directory pathnames. (Example: Entering NewDocument\Protocol\StdFileEditing creates the StdFileEditing key inside the Protocol key, which is created inside the NewDocument key.) Any keys in the path that do not exist are automatically created.

! Value NameEnter the name of a new named value.

! Data ValueThe data for the value. If the Data Type (below) is Double Word (DWORD), the data should be in decimal notation. To insert multiple lines of data here, press Ctrl+Enter to begin a new line.

! Data TypeSelect the type of data contained in the named value. Available types are listed below. The associated Windows API data types are in parentheses.

106

� String(REG_SZ prefix) Indicates that a value entry is an expandable string. To embed a variable name, (such as %WIN%), enclose it with double percents (%%WIN%%). If you enclose it in single percents, then the variable name is expanded to its actual value. This allows Windows NT4/2000/XP system variables to be embedded.

� Unexpanded String(REG_EXPAND_SZ prefix) Identifies a value entry as an unexpanded data string. To embed a variable name, (such as %WIN%), you must enclose it with double percents (%%WIN%%). If you only enclose it in single percents, then the variable name is expanded to its actual value. This allows Windows NT4/2000/XP system variables to be embedded.

� Multiple Strings(REG_MULTI_SZ prefix) Identifies a value entry as a multiple string. These are multiple pieces of text, separated by carriage returns. This is only supported for installations on Windows NT4/2000/XP.

� Double Word(REG_DWORD prefix) Identifies a value entry as a 32-bit (DWORD) entry.

� Binary/Hex(REG_BINARY prefix) Identifies a value entry as binary. Each byte should be separated by at least one blank space. For instance: AD 30 C0 A9 40 20 A8 FC 4C 00 08.

� NoneThis is provided for compatibility with SMS Installer installations. It behaves the same as the binary data type.

! Repair application if this registry value is missingSelf-repair prevents an application from failing if this registry value has accidentally been deleted. Mark this checkbox to initiate self-repair if this registry value is missing during application launch. The end user must have access to the installation media to perform a repair, and you must also configure a shortcut to the application with self-repair turned on. For information on how to set up self-repair, see Configuring an Application for Automatic Self-Repair on page 20.

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

Else StatementThis action marks the beginning of a section of instructions to be executed when the condition specified in the matching If action is false. It takes no parameters, and selecting it from the Action list inserts it directly into the script with no further dialogs or prompts.

ElseIf StatementThis action is put inside an If block to check for another condition. It marks the beginning of a block of code that is executed only if the condition checked by the If Statement is false, all previous ElseIfs are false, and this ElseIf is true. You can use one If Statement with multiple ElseIf Statements to check for multiple conditions.

107

! If VariableBuild an If statement by selecting or entering a variable and by selecting a comparison. The first list shows variables defined in this installation. The second list shows available comparisons.

Expression True means the expression in the Value field below is evaluated according to the rules outlined in Variables and Expressions on page 79. The variable is ignored and can be left blank. The result is considered true if it evaluates to a non-zero result. Valid Password and Invalid Password evaluate according to the password entered on the Passwords page in Installation Expert.

! The ValueEnter the value to be used in the comparison, or an expression if the comparison is set to Expression True. If you enter variable names in this field, do not surround them with percent signs (%). If you enter compiler variables, then you must surround them with percent signs.

End StatementThis 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 ConditionThis action evaluates a condition in the currently-running Windows Installer installation. You enter a Windows Installer condition and select a WiseScript variable to store the result. It puts the value of 1 (true) or 0 (false) into the WiseScript variable. Use this action only in WiseScripts that are called from a Windows Installer installation.

! Dest. VariableSelect or enter a variable to store the result of the Windows Installer condition. The variable is set to 1 if the condition is true, or 0 if false.

! ConditionEnter 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.

Also see:

Get Windows Installer Property on page 114Set Windows Installer Property on page 130

Execute ProgramThis action runs another .EXE. The .EXE can be a file already installed on the destination computer, a file you installed as part of the installation, or a file you provide on a separate disk.

If the .EXE you plan to execute is coded to pass back a return value, the resulting return value is put into the variables %INSTALL_RESULT% and %PROCEXITCODE%. If the .EXE passes back a return value, mark the Wait for Program to Exit checkbox.

! .EXE PathSpecify the full pathname to the .EXE to be executed (example: %MAINDIR%\Application.exe).

108

! Command LineEnter the command line options for the .EXE you are calling, as if you were typing them in the Run dialog.

! Default DirectorySpecify the directory that should be current when the .EXE file is executed. The installation does the equivalent of a Change Directory command (cd) before launching the .EXE. Click Browse and select a directory from your installation. You can select from directories that you created on the Files page in Installation Expert.

! Variables AddedList any variables created in the .EXE that are not present in the calling script.

! Window SizeYou can force the .EXE file to run in a maximized or a minimized window, or you can let it run in its default window. Select Hidden to run the .EXE silently, which means it runs minimized and its task is not shown on the task bar.

! Wait for Program to ExitIf this checkbox is marked, the installation does not continue until the .EXE has exited. Make sure you mark this checkbox if the .EXE returns a value to the script. If the installation does not wait for the .EXE to exit, add the command line parameter -sms.

NoteThis action uses the Windows ShellExecute call, which means that you can open documents as well as applications. When the script opens a document, the associated application is launched.In Windows 95, the Write.EXE application calls WordPad.EXE. If you instruct the script to wait until the application exits, call WordPad.EXE directly. Otherwise, the script continues without showing WordPad.EXE because Write.EXE exits.

To read about scripts that use this action, see Downloading a File From a Web Site During Installation on page 183 or Prompting the End User to Insert a Floppy Disk on page 177.

Exit InstallationThis action calls the Exit script and exits the installation. The Exit script is accessible in the Event drop-down list in Setup Editor. No message appears unless you also set the RESTART variable. See Automatic Runtime Variables on page 190.

! Application Exit CodeIf this installation is called by another application, this is the return code to the calling application. If the WISE_ERROR_RTN variable is already set, the value in WISE_ERROR_RTN does not override the Application Exit Code but is written to the installation log. See Runtime Variables on page 192.

! Install Status MIFThis section is disabled unless you enter Status MIF information on the Microsoft SMS page in Installation Expert.

� MIF TextThis text is added to the Status MIF file when this action is executed.

� Success/FailureA status for the installation is added to the Status MIF file.

109

Find File in PathThis action searches for a file on the destination computer. If more than one match exists, only the first match is returned.

! File NameEnter just the file name, not a full path. Wildcard characters (*, ?) are not allowed.

! Variable NameEnter a variable to store the path of the file if it is found. If it is not found, this variable stores the Default Value specified below.

! Default ValueThis value is put into the variable if the file is not found. To use an If statement that tests the variable, leave this blank so it evaluates to false.

To install a new version of the file, specify the file�s typical location here. Then, if the file is located, the location replaces the default value, but if it is not, this default value is used to install the file.

! DescriptionEnter text to display if the find operation takes more than 1.5 seconds to complete. This happens only if the list of directories in the PATH is very long or a directory is on a slow device (example: CD-ROM).

! Search DirectoriesEnter a semicolon-delimited list of directories to search. You can use variables in this field. If this field is blank, only directories in the PATH environment variable are searched.

! Remove File NameMark this to remove a file name from the end of a returned pathname, leaving only the directory name. This operation is not performed on the Default Value.

To read about a script that uses this action, see Sample Script That Searches for Files or Applications on page 178.

Get Environment VariableThis action puts the value of a Windows environment variable into a WiseScript variable.

! Env. VariableEnter a Windows environment variable.

! Variable NameEnter a variable to store the value of the environment variable.

! Default Value(Optional) Enter the value to store in the variable if the environment variable is not found.

! Remove File NameMark this to remove a file name from the end of a returned pathname, leaving only the directory name. This operation is not performed on the Default Value.

To run a batch file or other application in a DOS window, use Get Environment Variable to put the value of ComSpec (path to command.com) into a variable (example: put it in %COMMAND%). Then use the Execute Program action to call command.com by entering %COMMAND% in the EXE Path field. Specify the file to open in the Command Line field. Add the /c command line option to cause the command line window to close when your program finishes execution.

110

Get Name/Serial NumberThis action displays a dialog that requests the end user�s name, company name, and a product serial number. It provides backward compatibility with older WiseScripts. In new scripts, use the Branding / Registration dialog in Installation Expert > Dialogs page.

! TitleEnter the title for the dialog.

! DescriptionEnter text to explain the dialog to the end user.

! Name PromptEnter text to appear next to the Name field.

! CompanyEnter text to appear next to the Company field.

! Serial NumberEnter text to appear next to the Serial Number field.

! VariableIn the 3 Variable fields, enter the variables to store the Name, Company, and Serial Number.

! Confirm Text(Optional) Enter text to be displayed in a separate dialog to confirm registration. If this is blank, no confirmation dialog appears.

Get ProgMan GroupThis action displays contents of the Programs group and lets the end user select a group. It provides backward compatibility with older WiseScripts. In new scripts, one of the pre-defined dialogs in Installation Expert > Dialogs page performs this function.

! Window NameEnter the title for the dialog.

! DescriptionEnter text to explain the dialog to the end user.

! Prompt NameEnter text to explain the input field.

! Default ValueEnter the default Start menu group.

! Variable NameEnter a variable to store the group specified by the end user.

Get Registry Key ValueThis action puts the value of a registry key into a variable. Multi-line (MULTI_SZ) registry values are read into a list format.

! Variable NameSelect or enter a variable to store the value.

! Default Value(Optional) Enter the value to put into the variable if the value is not found.

! Registry KeyEnter the key that contains the value to be retrieved.

111

! Value NameEnter the value name. (If you are reading the Win16 registry, leave this field blank.)

! RootSelect the root that contains the registry key. (If you are reading the Win16 registry, leave HKEY_CLASSES_ROOT selected.)

! Remove File NameMark this to remove a file name from the end of a returned pathname, leaving only the directory name. This operation is not performed on the Default Value.

! Expand Environment VariablesIf you read a REG_EXPAND_SZ value, mark this to have all environment variables in the registry value replaced with their actual values.

To read about a script that uses this action, see Launching a Web Page From an Installer on page 183.

Get System InformationThis action retrieves information about the destination computer and puts it into a variable. The Pathname field is only used when specified in the descriptions below. When it is used, you can browse to a file in the installation, or enter a path to a file using variables (example: %PROGRAM_FILES%\file.exe). You can hardcode a pathname (example: C:\Program Files\file.exe) but it is not recommended.

! Variable NameSelect or enter a variable to store the retrieved value.

! RetrieveSelect information to retrieve:

� Current Date/TimeMilitary-style (24 hour) date and time. Example: 07/14/04 11:18:10

� Windows VersionExample: 5.0.2195 (Windows 2000 Professional)

� DOS VersionExample: 6.22

� K Bytes Available MemoryThe amount of physical RAM.

� File Date/Time ModifiedWhen the file specified in Pathname was modified. Example: 07/14/04 11:18:10

� File Version NumberThe version of the file specified in Pathname. Example: 2.5.4.0 If the file does not have a version resource, the response is blank.

� Registered Owner NameThe user name entered when Windows was installed. This is used to pre-fill the Branding / Registration dialog.

� Registered Company NameThe company name entered when Windows was installed. This is used to pre-fill the Branding / Registration dialog.

� Drive Type for PathnameThe type of drive of the file or directory whose path is in Pathname: N (network), H (hard disk), C (CD-ROM), F (floppy or removable disk), R (RAM disk).

112

� First Network DriveThe letter of the first network drive, followed by a colon If there are no network drives, the response is blank.

� First CD-ROM DriveThe letter of the first CD-ROM drive, followed by a colon. If there is no CD-ROM drive, the response is blank.

� Win32s VersionThe version number of the currently running Win32s system in #.# format or blank if Win32s is not installed.

� Full UNC PathnameThe UNC Pathname of the destination computer.

� Installer EXE PathnameThe pathname, including the file name, of the installation currently executing.

� File Size (Bytes)The size of the file specified in Pathname.

� Volume Serial NumberThe serial number of the disk drive specified in the Pathname field.

� Volume LabelThe label of the disk drive specified in Pathname.

� Windows Logon NameThe Windows network logon name of the user logged onto the destination computer.

� Service Pack NumberService pack number of the current operating system, if one exists.

� Current Date/Time (4-digit year)Same as Current Date/Time above except a different format. Example: 07/14/2004 11:18:10

� File Date/Time Modified (4-digit year)Same as File Date/Time Modified above except a different format. Example: 07/14/2004 11:18:10

� Disk Free Space (KBytes)Free disk space of the drive specified in Pathname. In Pathname, enter a drive (C:\) or a pathname (%MAINDIR%\ReadMe.txt). If you enter a pathname, it returns the free space on the drive the pathname refers to. You can enter a UNC path such as \\SERVER\Apps\CAT.EXE. Windows 95/98 does not return the disk space for UNC paths.

� Current Date/Time (Regional settings)Gets the date and time specified by the destination computer�s regional settings.

! PathnameSpecify the full pathname of the file or directory to retrieve information from (example: %MAINDIR%\readme.txt). Use this field only for operations that retrieve information on files or directories.

To read about a script that uses this action, see AutoPlay on page 174.

Get Temporary FilenameThis action generates a unique, temporary file name and stores it in a variable. Use the temporary name when you need to install a file to the Windows Temp directory (%TEMP%). Files you create using this file name are deleted when the installation

113

finishes. Example: Use this to install a .DLL that is called during installation, and is then no longer needed.

! VariableSelect or enter a variable to store the temporary file name. Only a file name is generated. To refer to this file, prefix it with the %TEMP% variable extension. Example: If the variable is %HELPFILE%, the full path of the file would be %TEMP%\%HELPFILE%.

Get Windows Installer PropertyThis action gets the value of a Windows Installer property in the currently running Windows Installer installation and puts it into a WiseScript variable. Use this action only in WiseScripts that are called from a Windows Installer installation.

! Dest. VariableSelect or enter a variable to store the value of a Windows Installer property.

! Property NameEnter the name of the Windows Installer property in the currently running Windows Installer installation.

Also see:

Set Windows Installer Property on page 130Evaluate Windows Installer Condition on page 108

Halt CompilationThis action immediately halts compilation of the script. It must be placed between Compiler Variable If and Compiler Variable End statements or the script will never compile. Use this to make sure conditions are met before compiling.

! Message TextEnter the message the end user sees if the compilation is terminated.

Example: You develop a script that uses runtime files. On your own computer, you have the correct runtime files to pull into the installation. However, you want to prevent compilation on other computers if they lack correct runtime files because the resulting installation could damage runtime installations on destination computers.

You do this by adding a Compiler Variable If/Else/End block. You get the file version of a key runtime file using the file version option of a Compiler If statement. Then, if the file version is not the one the script requires, use the Halt Compilation action to prevent compilation.

If StatementThis action marks the beginning of a conditional block of script, an If block. If the condition specified in the If Statement is true, the lines inside the If block are executed. The If block can also contain an Else or several ElseIf actions.

! If VariableBuild an If statement by selecting or entering a variable and by selecting a comparison. The first list shows variables defined in this installation. The second list shows available comparisons.

Expression True means the expression in the Value field below is evaluated according to the rules outlined in Variables and Expressions on page 79. The variable is ignored and can be left blank. The result is considered true if it evaluates to a non-

114

zero result. Valid Password and Invalid Password evaluate according to the password entered on the Passwords page in Installation Expert.

! The ValueEnter the value to be used in the comparison, or an expression if the comparison is set to Expression True. If you enter variable names in this field, do not surround them with percent signs (%). If you enter compiler variables, then you must surround them with percent signs.

To read about a script that uses this action see Sample Script That Searches for Files or Applications on page 178. For scripts that evaluation expressions within an If statement, see Performing Calculations on Integer Values on page 178 and Parsing Strings on page 179. For a script that uses nested If, Else, and End statements, see Checking an FTP Site for Newer Files on page 183.

Include ScriptThis action adds an additional script to the current installation script. During compile, the include script is copied into the calling script at the location of the Include Script action, resulting in a combination of the scripts. Include scripts can save time because you can develop a library of WiseScripts that perform specific functions, like subroutines. You can re-use include scripts and share them with colleagues. They typically contain just a few lines of code, such as calling an .EXE or displaying a particular dialog. Include scripts can be any size with the limitation that the calling script plus include scripts cannot be more than 32,000 lines.

Include scripts are displayed in tabs at the bottom of Setup Editor view. To determine if files are duplicated in an installation because of an include script, select Edit menu > the Duplicate Files Report.

To make an include script, create a new file and select Blank Script. Otherwise the include script contains the default script, which is designed to perform an installation. The combined script would then have 2 wizard loops, 2 of every dialog, and so on. Only the script is inserted into the calling script. Any configuration in Installation Expert is ignored, including compiler variables on the Compiler Variables page.

! PathnameSpecify the pathname of the script. It should be a .WSE file on your computer, not the destination computer. Because the main script and include scripts are combined during compile, not runtime, do not use a runtime variable in Pathname. You can, however, use a compiler variable.

Example of a line in the script that includes a script:

Include Script C:\Scripts\OpensWord.wse

Example of what a short include script might look like:

Execute %PROGRAM_FILES%\winword.exe

Insert Line Into Text FileThis action edits a text file. Use it to edit configuration files that cannot be edited by Edit INI File, Add Device to System.ini, Add Command to Config.sys, or Add Command to Autoexec.bat.

You can insert a new line at a particular line number, or you can search for text and insert a new line before, after, or in place of the line where the text was found. Either complete the Line Number field or the Search for Existing Text section. Do not complete both because you can only do one or the other.

115

! File to EditSpecify the pathname of the text file to edit (example: %SYS32%\file.txt).

! Text to InsertEnter the line to add to the file. If the line refers to a directory or file, start the path with a variable (example: %MAINDIR%\application.exe).

! Line NumberEnter the line number at which to insert the new line. Enter zero to append to the end of the file. The Search for Existing Text area overrides any line number specified here unless the text is not found.

! Search for TextEnter the text to search for. If more than one line in the file matches, only the first is edited.

! Comment TextEnter text to insert at the beginning of the found line. When replacing an existing line, use Comment Text to leave the existing line in place but inactive. Set Insert Action to insert before the existing line so subsequent installations find and edit the active command, not the commented line.

! Insert ActionSelect the action to be taken when a line is found.

! Match CriteriaSelect how the line is matched with text in Search for Text.

! Ignore White SpaceMark this to ignore spaces and tab characters.

! Case SensitiveMark this to make the match case-sensitive.

! Make Backup FileMark this to make a copy of the file before editing it. The backup has the same file name except with a number appended to the end.

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

Install File(s)This action installs files on the destination computer. Each file or directory to be installed must have a separate Install File(s) action. It easiest to use Installation Expert to add most files, and to use Setup Editor to add or edit a few Install File(s) lines.

When you�re installing files permanently on the destination computer using the Install File(s) script action, you might also want to make sure that the destination computer has enough disk space available for these files. Do this using the Check Disk Space script action. See Check Disk Space on page 94.

The results from an Install File(s) action are put into a variable, INSTALL_RESULT. See its description in Automatic Runtime Variables on page 190.

! Source PathnameSpecify the pathname of the file on your computer. You can use wildcards in this field to indicate that all the files in a directory that match a certain pattern should be installed (example: C:\Dev\*.exe). You can also use compiler variables, but you should not use runtime variables, because this field is used at compile time.

116

! Destination PathnameSpecify the pathname the file will have on the destination computer. Use variables to start the pathname (example: %MAINDIR%\Dev\file.txt). This field has a drop-down list with common variables. Do not include wildcards in this field.

! DescriptionEnter text to appear in the progress bar while this file is installed.

! Require PasswordIf you entered a password in Installation Expert > Password page, and you mark this, the end user is prompted for the password before this file is installed.

The password prompt appears only once, for the first password-protected file in an installation, regardless of the number of password-protected files. If no password-protected files are slated for installation, the prompt does not appear.

! Include Sub-DirectoriesIf you specify a directory in Source Pathname, mark this to include all subdirectories and their contents.

! Shared DLL CounterIf this is marked, and the file is a .DLL or .VBX, Windows tracks the file to prevent its removal if an installed application is still using it.

! No Progress BarTo hide the progress bar, mark this for every file in the installation. If you mark it for some files, but not others, the progress bar seems to display continuously because the screen does not refresh between files.

! Self-Register OCX/DLL/EXE/TLBAll .OCXs and .TLBs and some .DLLs and .EXEs support self-registration. Mark this so the file registers itself in the Windows registry before it is used. This action does not register the file, but specifies that it should be registered later. Include a Self-Register OCX/DLL action to register the file. See Self-Register OCXs/DLLs on page 127.

! Do Not Download With WebDeployThis checkbox is available if you click Complete support for Internet-based installation on the WebDeploy page. In an Internet-based installation, files are stored as separate files in the same directory as the installation .EXE on the Web server and are downloaded only as they are needed.

Mark this checkbox to put the file in the installation .EXE rather than storing it as a separate file.

! Repair application if this file is missingMark this checkbox to initiate self-repair if this file is missing during application launch. This prevents your application from failing if this file is accidently deleted. For information on setting up self-repair, see Configuring an Application for Automatic Self-Repair on page 20.

! Replace Existing FileSelect when to replace existing files on the destination computer.

� AlwaysThe new file always replaces the old file.

� NeverThe file never overwrites an existing file. Select this for files that should be installed if they are not present, but which might be customized by the end user and should therefore not be replaced on re-installation (example: configuration files).

117

� Check FileThe existing file is only replaced if the requirements you set in File Version and File Date/Time are true.

" Doesn�t MatterSelect this option if only one of the requirements, File Version or File Date/Time, must be fulfilled to replace the existing file.

" Same or OlderFor File Version, this replaces the existing file if it has a version resource that is the same as or older than the new file. If the existing file lacks a version resource, it is not replaced.

For File Date/Time, this replaces the existing file if its modification date and time are the same or older than the new file.

" OlderFor File Version, this replaces the existing file if it has a version resource that is older than the new file. If the existing file lacks a version resource, it is not replaced.

For File Date/Time, this replaces the existing file if its modification date and time are older than the new file.

! Retain Duplicates in PathBy default, version checking removes existing copies of .DLLs that are found in the path list. To suppress this feature, mark this checkbox.

! Existing File PathnameSmartPatch creates a patch file that contains only the differences between the older installation and the new installation.

If you are using Smartpatch, specify the pathname where the installation can expect to find one of the files listed in Previous File Versions. If a wildcard was used in Source Pathname, this field should contain a directory. Start the path with a variable.

! Previous File VersionsUse the Browse button to create a list of files that are older versions of the file or files being installed.

Install ODBC DriverThis action configures an ODBC driver in the registry. If the destination computer is Windows NT4/2000/XP, this action adds registry settings. It also returns the directories where the ODBC Manager and ODBC Driver .DLLs should be copied but does not actually install these files. Use an Install File(s) action to install these files to the proper directories.

You should be proficient with ODBC before using this action.

! Driver NameThe name of the ODBC driver. This driver, along with its support files, should be installed in the directory returned in the Driver Pathname Variable.

The Import button adds an ODBC driver, with all its settings, from drivers installed on your computer.

! Manager Pathname Variable(Optional) Select or enter a variable to store the directory where the ODBC.DLL file should be installed. If you are installing multiple ODBC drivers, only the first Install ODBC Driver action needs to set this variable.

118

! Driver Pathname VariableSelect or enter a variable to store the directory where the driver files should be installed.

! Install Drivers ForSelect a Win16 or Win32 installation. The Win16 ODBC installation requires the Win16 version of ODBCINST.DLL. The Win32 ODBC installation requires ODBCCP32.DLL.

! Driver AttributesEnter attributes for the installed ODBC drivers in ENTRY=VALUE format. This is added to the ODBCINST.INI file.

Modify Component SizeFor files within the installation .EXE, the amount of required disk space is automatically tracked. However, if you call external .EXEs that install more files, the space those files require is not accounted for. Use this action to increase the amount of required disk space. Then use the Check Disk Space action to make sure that enough space exists.

Use this action inside an If block that checks whether the affected component is being installed. Example:

If COMPONENTS Contains Any Letters in �A� thenModify Component Size: 1024

End

The COMPONENTS variable is populated with a letter of the English alphabet for each component set to be installed, starting with A for the first component, B for the second, and so on.

! Size (Kbytes)Enter the amount of additional disk space to reserve.

! Dest. PathEnter the directory where the files will be installed (example: %MAINDIR%\Pictures).

Open/Close Install.logNormally, every file that is installed is recorded in the install.log. The uninstall works by reading Install.log from bottom to top and reversing each recorded action.

The Open/Close Install.log action lets you customize the uninstall, by turning logging off and on at key points to prevent some actions from being recorded in the log. If you use this action to stop logging, you must also use it to resume logging after, or no log file is created.

Select one of the following options for each Open/Close Install.log action that you add to the script.

! Resume/Start writing entries into installation log

! Pause writing entries into installation logThis must be followed, at some point, by another Open/Close Install.log action that resumes writing, or no log file is created.

! Open new installation logMark this to create a new installation log. Then enter the complete path or just the file name of the new log to the right (examples: %MAINDIR%\Speciallog.log or Speciallog.log). If just a file name is entered, the log is written to the same directory as the first installed file. The log�s default location and name are set on the Installation Log page of Installation Expert. See Installation Log on page 42.

119

Also see Add Text to INSTALL.LOG on page 85.

Parse StringThis action splits a text string and places the results in 2 variables.

You can split the string at a character or substring that you specify, which discards the character or substring you specified. Example: If you split the string �ONE,TWO� at the first occurrence of a comma, �ONE� is put into destination variable 1 and �TWO� is put into the destination variable 2. If the character or substring is not found, the entire string is put into destination variable 1, and nothing is put into destination variable 2. The find is case-sensitive.

You can also split a string at any arbitrary character position, which discards no characters. Example: If you split the string �ONE,TWO� at character position 4 from left, then �ONE,� is put into the destination variable 1 and �TWO� is put into the destination variable 2.

! Source ValueEnter the text to be parsed. You enter text and variables (examples: %MAINDIR% or %MAINDIR%\%PICTDIR%). To include a literal percent (%) symbol, use %%.

! Pattern/PositionEnter the character pattern or the character position at which to split. Character patterns are case-sensitive unless you mark Ignore Case. To split at a pattern, enter any number of characters, including numbers, and select one of the pattern options in Operation. To split a string based on character position, enter the character position, where 1 is the first character, and select one of the position options in Operation.

! Destination Variable 1,2Select or enter variables to store the 2 strings resulting from this operation. Operation, below, determines how each variable is populated.

! OperationSelect how to split the text string.

! Trim SpacesMark this to remove leading and trailing spaces from both destination variables.

! Ignore CaseMark to make pattern matching case-insensitive.

To read about scripts that use this action, see Creating a Connection Between a Database Client and Oracle Server on page 177, Launching a Web Page From an Installer on page 183, or Manipulating a Text File on page 177.

PauseThis action temporarily stops a script from executing. After the specified number of milliseconds, the script continues. Example: Use this action to display a billboard for several seconds.

! Milliseconds to pauseEnter the number of milliseconds to pause the script. A millisecond is 1/1000 of a second. To pause for 1 second, enter 1000.

Play Multimedia FileThis action plays an audio (.WAV) or video (.AVI) file during installation. Playback is asynchronous, which means the sound or movie can play while the installation

120

continues. The multimedia file must be installed on the destination computer before this action is called. It must be small enough to fit into the destination computer�s RAM for it to play correctly, because the disk is heavily accessed by the installation process. To produce sound, the destination computer must be properly equipped and configured.

! File TypeSelect either .WAV or .AVI.

! PathnameSpecify the pathname to the .WAV or .AVI file. Start this field with a variable (example: %MAINDIR%\Movie.avi). If the multimedia file is used only during installation, you can use the Get Temporary Filename action to obtain a random filename, then install the file to %TEMP%\%TEMPFILENAME%.

! X Position, Y PositionIndicate the location on a 640 x 480 screen at which an .AVI file should be played back. Coordinates are adjusted proportionately for the display resolution on the destination computer.

! Loop Continuously

Post to HTTP ServerThis action posts information over the Internet to a Web server. (Example: Use it to record user registration information or other data.) You must set up 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 a valid Internet connection. If end users might not have this capability, you can add a prompt on a dialog asking the end user if they have Internet connectivity. Then use the results from the prompt to conditionally run this action or not.

! Destination URLEnter the URL of the CGI program or ASP page that accepts posted data.

! Text to PostThe 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 assumed to be a continuation of the previous line, and the data on the 2 lines is concatenated and sent with a single field identifier.

The field names might be the same as variable names, but they do not have to be. You include variables enclosed in % in the text to be posted. Use %% to send an actual % symbol.

! Error HandlingSelect how to handle errors in the posting operation.

� Ignore ErrorsThe script continues regardless of any errors.

� Abort InstallationThe installation stops if the post cannot be completed.

� Start BlockThe Post to HTTP Server action begins a conditional block. The statements between this action and the next End statement are executed only in the event of an error.

121

Prompt for FilenameThis action prompts the end user to select a file using a standard Open or Save dialog. The complete pathname of the file or directory is returned in a variable. (Example: Use the returned directory to set the installation directory for a subset of files.) No file is actually opened or saved by this action. This action is included to provide backward compatibility for older WiseScripts. In new scripts, use custom dialogs or dialog controls to perform the same function. This action requires an End Statement, because it begins a block of statements, similar to an If Statement.

! Dialog TypeSelect Open File or Save As.

! Dialog TitleEnter the title for the dialog.

! Dest. VariableSelect or enter a variable to store the pathname of the file or directory the end user selects.

! Default ExtensionEnter the extension to append to the file name if the end user does not enter one.

! Filter ListEnter the file types to appear in the Files of Type drop-down list in the Open or Save dialog. Use Shift+Enter to enter a carriage return in this field. Example: to show text, .JPGs and bitmaps, enter:

Text Files (*.txt);*.txt;Pictures (*.jpg);*.jpg;Bitmaps (*.bmp);*.bmp

! Allow selection of multiple filesMark this to let end users select multiple files with Ctrl or Shift.

! Prompt if file does not existMark this to displays a confirmation dialog if the specified file does not exist.

! File must existMark this to halt the installation until an existing file has been specified.

! Pathname must existMark this to halt the installation until an existing pathname has been specified.

! Skip write permissions testIf you selected Save As for Dialog Type, and you clear this checkbox, the installation attempts to create the file that the end user specified in the Save As dialog to verify write permissions. If you mark this checkbox, the installation skips the file creation attempt.

! Do not validate the pathnameMark this to accept any pathname without any validation.

! Display prompt if overwriting existing fileMark this to display a message if a file selected by the end user already exists.

Prompt for TextThis action displays a dialog that lets an end user enter a line of text. Optionally, you can treat the entered text as a pathname and do verification on it. It is included to provide backward compatibility for older WiseScripts. In new scripts, use custom dialogs or dialog controls to perform the same function.

122

! Window NameEnter the title for the dialog.

! DescriptionEnter brief instructions here.

! Prompt NameEnter the label to be displayed next to the text input field.

! Default ValueEnter the text to be displayed in the text input field by default.

! Variable NameEnter a variable to store the text entered by the end user.

! DirectoryMark this to delete trailing backslashes from the text, so you can use it as a directory pathname.

! Confirm If ExistsIf this checkbox is marked, and the end user enters the pathname of an existing file or directory, a dialog asks whether to overwrite.

To read about scripts that uses this action, see Performing Calculations on Integer Values on page 178 or Parsing Strings on page 179.

Radio Button DialogThis action displays a dialog with up to 10 radio buttons. It provides backward compatibility with older WiseScripts. In new scripts, use custom dialogs and dialog controls to perform the same function.

! TitleEnter the title for the dialog.

! Dest. VariableEnter a variable to store the letters corresponding to the button the end user clicks.The button clicked by the end user is returned as a letter: A for the first radio button, B for the second, and so on. If the script sets this variable to a letter before this action runs, the corresponding button appears selected by default.

! DescriptionEnter explanatory text to be displayed above the radio buttons. Press Shift-Enter for a carriage return.

! Component ListEnter the choices, one on each line, pressing Enter after each.

Read INI ValueThis action reads an entry from an existing .INI file into a variable. Example: Use this to obtain a pathname to a file.

! INI PathnameSpecify a complete pathname to the .INI file (example: %WIN%\Wise.ini).

! INI SectionINI files have sections that are delineated by bracketed section names (example: [DIRECTORIES]). Enter the name of the section that contains the entry to be read, without brackets (example: DIRECTORIES).

! INI ItemEnter the name of the entry to read from the .INI file.

123

! Default ValueEnter the value to store in the variable below if the specified entry is not found.

! Variable NameEnter a variable to store the value of the INI item.

! Remove File NameMark this to remove a file name from the end of a returned pathname, leaving only the directory name. This operation is not performed on the Default Value.

Read/Update Text FileThis action begins a loop that reads and, optionally, updates text in a text file. Each loop puts the next line of text into a variable. You can put actions in the loop that change the contents of the variable (example: Parse String). Optionally, the changed variable can be written back to the file. The loop repeats for each line of the file. This action requires an End Statement.

! PathnameSpecify the full pathname of the text file to be edited on the destination computer (example: %WIN%\Wise.txt).

! VariableSelect or enter the variable to store each line of the text file (example: TEXTLINE).

! ActionSelect an action:

� Read lines of file into variableReads a line into the variable, but does not write it back to the original file.

� Update file with new contents of variableReads a line into the variable, and at the end of the loop, writes the contents of the variable back to the line in the text file.

! Make Backup FileMark this to create a backup file (example: text.001, text.002, and so on) if the original text file is changed.

To read about a script that uses this action, see Manipulating a Text File on page 177.

Read/Write Binary FileThis action reads from a binary file to a variable, or writes from a variable to a binary file. If you write to the file, the existing information in the file is not moved, it is overwritten.

NoteThis action does not support reading or writing non-ASCII characters (characters with codes above 127).

! File PathnameSpecify the pathname of the file to be read (example: %MAINDIR%\file.exe).

! Variable NameSelect or enter the variable that is to be read into or written from.

! File OffsetEnter the number of bytes into the file to start writing or reading. Bytes are numbered starting with zero.

124

! Max. LengthEnter 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 DirectionSelect whether to write to or read from the file.

! Null TerminatedIf this checkbox is marked, a zero byte is written to the binary file after the string.

Reboot SystemThis action reboots the destination computer.

! Reboot Operating SystemOn Windows 9x or 3.1, this restarts Windows at the end of installation. On Windows NT4/2000/XP, this option logs the end user out of Windows.

! Reboot Computer SystemPerforms a full system reboot on the destination computer at the end of installation on all operating systems, if the end user has administrator privileges. On Windows NT4/2000/XP, if the end user does not have administrator privileges, this option only logs the end user out.

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

! Font File NameSpecify the file name of the .TTF font file (not the pathname) to be registered. The drop-down list contains font files that you have added to this installation. The file must already have been installed in the font directory on your computer, and the font�s file name must match its internal name.

! Font NameEnter 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.

RemarkThis action puts comments or blank lines in the script. Remarks are green by default. You can change the color Preferences.

! CommentEnter the comment. To insert a blank line, leave this field blank.

Rename File/DirectoryThis action renames a file or directory on the destination computer. This can be an existing file or directory, or a file or directory that your installation installed. The file must not be busy.

! Old PathnameSpecify the full path to the existing file or directory (examples: %MAINDIR%\PICTURES\picture.jpg or %MAINDIR%\PICTURES\). If you click Browse, you can select only a file.

125

! New File NameEnter the new file name or directory name (examples: picture2.jpg or PHOTOS).

Search for FileThis action searches for a file on local drives, network drives, or all drives, and returns the full path to the file.

! File NameEnter the name of the file to search for. The file name can contain wildcard characters (*, ?). If you select Directory given by File Name field in the Drives to Search field, then include the full pathname rather than just a file name.

! Variable NameEnter a variable to store the file pathname.

! Default ValueIf the file is not found, the variable above contains the value you enter here. If this is left blank, the variable is blank if the file is not found.

Example: Specify the location where the file is normally installed. If the file is found, the new version could overwrite the found file. If the file is not found, the new version could be installed to the default location.

! Message TextEnter a message to display during the search operation.

! Return TypeSelect whether to return only the first match, or list of all matches.

! Drives to SearchSelect to search local drives, network drives, or both. You can also choose to search the directory path specified in File Name.

! Search DepthEnter how deep into subdirectories the search should look. A depth of 1 searches only the root directory, a depth of 2 searches the root directory and any subdirectories in it, and so on. A depth of 0 searches the entire drive.

Use this field cautiously when searching large network volumes. A search depth over 3 or 4 can result in a long wait. Alternatively, prompt the end user to manually locate the directory containing the file. See Browse for Directory on page 88.

! Remove File NameMark this to remove a file name from the end of a returned pathname, leaving only the directory name. This does not apply to the Default Value field.

To read about a script that uses this action, see Creating a Connection Between a Database Client and Oracle Server on page 177.

Select ComponentsThis action displays up to 10 checkboxes for optional installation components to end users. The checkboxes marked by the end user are returned as a series of letters: A for the first checkbox, B for the second, and so on. This action is included to provide backward compatibility for older WiseScripts. In new scripts, a wizard dialog performs the same function.

! TitleEnter the title for the dialog.

126

! Dest. VariableEnter a variable to store the letters returned from the end user choice (COMPONENTS is used in the standard script). If the script sets this variable to a series of letters before displaying the dialog, the buttons that correspond to those letters are selected by default.

! Disk Variable(Optional) Select or enter a variable to store the pathname where your application will be installed (MAINDIR is used in the standard script). If this field is filled in, the free space on this drive is displayed on the dialog.

! Sub-ComponentsEnter a list of sub-components. These sub-components are incorporated in the disk space calculations if the main component is selected.

! DescriptionEnter explanatory text to be displayed above the radio buttons. Press Shift-Enter for a carriage return.

! Component ListEnter the choices, one on each line, pressing Enter after each.

Self-Register OCXs/DLLsUse this action to self-register all queued .OCX, .DLL, and .EXE files or to add an existing file to the queue.

! Description/Pathname

� If you mark Register all pending OCXs/DLLs/EXEs below, enter a message to display to the end user during registration. The Browse button is disabled if you mark this option.

� If you mark Queue existing file for self-registration below, specify a full pathname of the file to register.

! Register all pending OCXs/DLLs/EXEsMark this to register all queued .OCX, .DLL, and .EXE files. In the Install File(s) and Copy Local Files(s) actions, there is an option to queue files for self-registration. See Install File(s) on page 116 and Copy Local File(s) on page 98.

! Queue existing file for self-registrationMark this to queue the file listed in Pathname for later self-registration.

Set Control AttributesThis action shows, hides, enables, or disables a control in a dialog. To access this action:

1. Double-click a �Custom Dialog� line in the script.

The dialog appears in Custom Dialog Editor.

2. Select View > Dialog Setup Editor.

A smaller list of actions appears in the Actions list, including this action.

3. Double-click Set Control Attributes.

� Control NameThis contains all controls in the current dialog. Select a control.

Use the Dialog Editor view (which shows the dialog) to see or change the name of controls. 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.

127

� OperationSelect how to manipulate the control.

To read about a script that uses this action, see Configuring a Dialog to Handle Mouse Events on page 179.

Set Control TextThis action changes the text associated with a control in a dialog. To access this action:

1. Double-click a �Custom Dialog� line in the script.

The dialog appears in Custom Dialog Editor.

2. Select View > Dialog Setup Editor.

A smaller list of actions appears in the Actions list, including this action.

3. Double-click Set Control Text.

� Control NameThis contains all controls in the current dialog. Select a control.

Use the Dialog Editor view (which shows the dialog) to see or change the name of controls. 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 TextEnter new text to associate with the control.

To read about a script that uses this action, see Configuring a Dialog to Handle Mouse Events on page 179.

Set Current ControlThis action sets a control to be the current control in a dialog. The current control is the one to which keyboard operations apply. Example: If the OK button is the current control, and you press the Return key, the OK button is activated.

To access this action:

1. Double-click a �Custom Dialog� line in the script.

The dialog appears in Custom Dialog Editor.

2. Select View > Dialog Setup Editor.

A smaller list of actions appears in the Actions list, including this action.

3. Double-click Set Current Control.

� Control NameThis contains all controls in the current dialog. Select a control to set as current.

Use the Dialog Editor view (which shows the dialog) to see or change the name of controls. 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.

To read about a script that uses this action, see Configuring a Dialog to Handle Mouse Events on page 179.

Set File AttributesThis action sets the attributes of one file or a group of files.

! File PathnameSpecify a file to change (example: %MAINDIR%\Acrobat.pdf). You can use wildcards to specify multiple files (example: %MAINDIR%\*.pdf).

128

! Read Only / Hidden / SystemMark the attributes to set.

! Scan Directory TreeMark this to apply the changes to all files in the specified directory, along with all files in its subdirectories and their subdirectories.

! ArchiveMark this to set the archive attribute, which is used by some backup programs.

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

! Minimum FilesThe minimum number of files to be specified by FILES= in Config.sys. Set this to zero or leave blank to leave FILES= unchanged.

! Minimum BuffersThe minimum number of buffers to be specified by BUFFERS= in Config.sys. Set this to zero or leave blank to leave BUFFERS= unchanged.

Set VariableThis action sets the value of a variable by providing a literal value, by modifying the variable�s existing value, or by evaluating an expression.

! VariableSelect or enter a variable. Variable names must begin with a letter, must contain only numbers, letters, and underscore characters, and must be 28 characters or less. It should not be enclosed in % signs.

! New ValueEnter the new value of the variable. If you enter a variable, enclose it in % signs. The value of a variable can be up to 32K in size.

The new value is also affected by the option set in Operation.

! OperationSelect the operation to be performed on the value in New Value.

� NothingNo additional changes are made.

� Increment, DecrementIf the value is a number, it is increased or decreased by one. To do this operation, you must specify the variable�s existing value in the New Value field. Example: To increment the variable VAR, enter VAR in the Variable field and %VAR% in the New Value field.

� Remove trailing backslashesTrailing \ characters are removed, converting the variable to a valid directory name.

� Convert to long or short filenameConverts an existing pathname to its equivalent long or short pathname if the installation runs on Windows 95 or NT. For this to work, the specified directory or file must exist.

� Convert to uppercase or lowercaseAll alphabetical characters are converted to the case you select.

129

� Evaluate ExpressionThe expression in New Value is evaluated according to the rules outlined in Variables and Expressions on page 79.

! Append to Existing ValueMark this to add the variable�s new value to the end of its original value instead of replacing it.

! Remove File NameMark this to remove a file name from the end of a returned pathname, leaving only the directory name.

! Read Variable From Values FileMark this to read the variable from the values file specified on a command line to the installation .EXE using the /M command line option. The values file is a simple text file with variables listed, one per line, in NAME=�VALUE� format. If the variable is found in the values file, the specified value is used; otherwise, its value is unchanged. It can be up to 32K in size.

To read about a script that uses this action, see Performing Calculations on Integer Values on page 178.

Set Windows Installer PropertyThis 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. Use this action only in WiseScripts that are called from a Windows Installer installation.

! Property NameEnter 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 ValueEnter 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.

Also see:

Get Windows Installer Property on page 114Evaluate Windows Installer Condition on page 108

Start/Stop ServiceThis action lets you start or stop a service on the destination computer. It only applies to operating systems that support services.

After you attempt to stop a service, the script pauses to give the service time to stop. The currently logged-in end user must have the appropriate privileges to start and stop services.

! Service NameEnter the name of the service. This is not necessarily the same name you see in the Services control panel, but is the services internal name. If you used the Create Service action to create the service, this is the same name you entered in the Create Service Settings dialog.

! OperationSelect to start or stop the service.

130

Example: Suppose a service must be stopped before it can be updated. Use this action to first stop the service, then update its files.

Also see Create Service on page 100.

While StatementThis action begins a loop. An End statement must end the loop. As long as the condition specified in the While Statement Settings dialog is true, the script lines inside the loop execute repeatedly. If the condition specified is not true, then the While loop is exited, and the next script line is executed.

! While VariableBuild a condition by selecting or entering a variable and by selecting a comparison. The first list shows variables defined in this installation. The second list shows available comparisons.

Expression True means the expression in the Value field below is evaluated according to the rules outlined in Variables and Expressions on page 79. The variable is ignored and can be left blank. The result is considered true if it evaluates to a non-zero result. Valid Password and Invalid Password evaluate according to the password entered on the Passwords page in Installation Expert.

! The ValueEnter the value to be used in the comparison, or an expression if the comparison is set to Expression True. If you enter variable names in this field, do not surround them with percent signs (%). If you enter compiler variables, then you must surround them with percent signs.

! Perform While loop at least onceMark this so the loop executes once before the test is performed. If the checkbox is cleared, the loop is executed if the condition is true, but is not executed if the condition is false.

To read about a script that uses this action, see Error Checking User Input on page 178 or Killing an Application Using Windows .DLL Calls on page 184.

Win32 System DirectoryThis action puts the path to the operating system directory into a variable. On Windows 9x, this is %WIN%\System. On NT-based systems, this is %WIN%\System32. Alternatively, use the predefined variables %SYS% or %SYS32% to access the system directory. This action is included to provide backward compatibility for older WiseScripts.

! Variable NameEnter a variable to store the result.

Wizard LoopThis action precedes dialogs that make up the majority of the installation�s end user interface. End users can move forward and backward through these dialogs. The script continues executing inside the wizard loop until the last dialog has been filled out and accepted. Installation Expert creates default Wizard Loop and Custom Dialog actions for you.You can also build them yourself, or use Setup Editor to customize the existing structure.

! Dialog BoxesDisplays a list of the Custom Dialog actions inside the wizard loop structure. Select a dialog to edit its setting in the bottom part of the Wizard Loop Settings dialog.

131

! Skip DialogThis lets you set a condition under which a dialog is skipped. You can set different Skip settings for each dialog.

Example: If one dialog asks whether to back up configuration files before installing, and the next asks where to store the backup files, you could set a condition on the second dialog to skip it if the DOBACKUP variable, which is set by the first dialog, is equal to �NO.�

� If VariableBuild a condition by selecting or entering a variable and by selecting a comparison. The first list shows variables defined in this installation. The second list shows available comparisons.

Expression True means the expression in the Value field below is evaluated according to the rules outlined in Variables and Expressions on page 79. The variable is ignored and can be left blank. The result is considered true if it evaluates to a non-zero result. Valid Password and Invalid Password evaluate according to the password entered on the Passwords page in Installation Expert.

� The ValueEnter the value to be used in the comparison, or an expression if the comparison is set to Expression True. If you enter variable names in this field, do not surround them with percent signs (%). If you enter compiler variables, then you must surround them with percent signs.

! Direction VariableSelect or enter the variable to store the direction the Wizard is currently heading. When Next is clicked, the value N is stored in the direction variable. When Back is clicked, B is stored. If you create custom Wizard dialogs, follow this convention. By default, DIRECTION is used for this variable, which you can use in Skip Dialog conditions to set dialogs to be displayed when the direction is forward but skipped when going backward.

! Display VariableSelect or enter the variable to store the name of the dialog that is being displayed this time through the loop. This variable is used in the Dialog Set Properties dialog in Custom Dialog Editor. By default, DISPLAY is used for this variable.

! PathnameSpecify the full pathname to a bitmap file on your computer to be displayed in the wizard dialogs. Do not use variables (except compiler variables) in the pathname. The file is copied into your installation when you compile.

You can turn off this graphic for selected wizard dialogs using the Dialog Box Properties dialog. See Setting Dialog Properties on page 137.

! X-Pos, Y-PosDetermines the relative placement of the graphic in the dialog, using X and Y coordinates.

! Do not resize bitmapMark this to ensure the image is displayed at the same size at all resolutions. Normally, bitmaps are automatically resized based on the destination computer�s resolution. The image is displayed at actual size on a 640x480 monitor, and is enlarged if the destination computer is set to a higher resolution.

! 3D BorderMark this to add a 3-dimensional border to the image.

132

! Bitmap Filler ColorThis color is displayed around the edges of the bitmap if it does not fill the image area in the dialog. When the destination computer is set to display large fonts, the dialog automatically increases in size, and the bitmap might not fill the image area.

NoteThe dimensions of the first Wizard dialog set the dimensions for all the dialogs in the wizard loop.

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

133

Chapter 6Creating Custom Dialogs

Use the Custom Dialog Editor to change the appearance of installation dialogs and to create new dialogs. You can also edit and create default dialog templates, add interactivity to dialogs, and work with dialog sets.

Topics include:

! About the Custom Dialog Editor.

! About Dialog Controls.

! Solutions for Dialog Problems.

! About Custom Dialog Sets.

! About the Dialog Script Editor.

134

About the Custom Dialog Editor

About the Custom Dialog Editor

The Custom Dialog Editor is a built-in utility.

Use it to:

! Create new dialogs. See Adding a Dialog to the Installation on page 135.

! Edit dialogs. See Editing Dialogs on page 136.

! Create and edit default dialog templates. See Editing Dialog Templates on page 136.

! Set dialog properties. See Setting Dialog Properties on page 137.

! Create a dialog set. See About Custom Dialog Sets on page 157.

! Add interactivity to dialogs. See About the Dialog Script Editor on page 159.

Access it from:

! Installation Expert by clicking the Edit or Add button on the Dialogs page.

! Setup Editor by double-clicking the Custom Dialog script action or a Custom Dialog script line.

! The Edit Menu by selecting Dialog Templates, and then selecting a dialog name and clicking OK.

Adding a Dialog to the Installation

Two options for adding dialogs:! If you add a dialog from the Dialogs page, the dialog is created with the same size

and shape as the other wizard dialogs, it is added to the wizard loop, and it has correctly configured Next, Back, and Cancel buttons.

! If you add a dialog from Setup Editor, the dialog is empty, and nothing is pre-configured. You must design and configure it yourself.

Therefore, to add a dialog to the installation wizard, add the dialog from the Dialogs page. To add a dialog that�s not part of the installation wizard (and therefore doesn�t need Next and Back buttons), add it from Setup Editor.

To create a new dialog:

1. Do one of the following:

� On the Dialogs page in Installation Expert, select a dialog name and click Add. The dialog you add is placed before the dialog that you selected.

� In Setup Editor, double-click the Custom Dialog script action in the Actions list.

The Dialog Box Properties dialog appears.

2. On the Dialog Box Properties dialog, enter a title for the dialog in Dialog Title and click OK. Do not give it the same name as an existing dialog. See Setting Dialog Properties on page 137.

The new dialog opens in the Custom Dialog Editor.

3. Add and configure controls on the new dialog.

� See About Dialog Controls on page 138.

� See Adding and Editing Dialog Controls on page 138.

4. Save the changes by selecting File menu > Save Changes and Exit.

135

About the Custom Dialog Editor

NoteTo use this dialog in other installation scripts, select File menu > Save As and save the dialog as a .DLG file in the \Dialogs\Template directory in the WiseScript Editor application directory. This does not affect the current installation. You can add a saved dialog to another installation by selecting File menu > Open in Custom Dialog Editor.

Editing DialogsWhenever you edit a dialog from the Dialogs Page in Installation Expert or by double-clicking the Custom Dialog script line in Setup Editor, you are editing the dialog for the current installation only. However, if you save the dialog and overwrite the .DLG template file, then the dialog is changed for all future installations.

1. To open the dialog, do one of the following:

� Select Installation Expert > Dialogs page.

" Select the dialog and mark its corresponding checkbox.

" Click Edit.

� In Setup Editor, locate and double-click the Custom Dialog script line that calls the dialog.

The dialog opens in Custom Dialog Editor.

2. Make changes to the dialog by adding, editing, or removing controls.

� See Adding and Editing Dialog Controls on page 138.

� See Aligning and Spacing Dialog Controls on page 152.

3. Save the changes by selecting File menu > Save Changes and Exit.

Editing Dialog TemplatesTo edit dialogs so that all future installations contain the changes, edit the dialog templates. Dialog templates include other dialogs in addition to those shown on the Dialogs page of Installation Expert (example: the Insert New Disk dialog).

Before you edit dialog templates, make a backup of the \Dialogs\Template directory, which is in the WiseScript Editor application directory. When you edit a dialog template and save the changes, the dialog is permanently changed.

1. Select Edit menu > Dialog Templates.

The Select Dialog to Edit dialog appears.

2. Select the dialog to edit and click OK.

The dialog opens in Custom Dialog Editor.

3. Make changes to the dialog by adding, editing, or removing controls.

� See Adding and Editing Dialog Controls on page 138.

� See Aligning and Spacing Dialog Controls on page 152.

136

About the Custom Dialog Editor

4. Save the changes by selecting File menu > Save Changes and Exit.

A dialog asks you to confirm your choice, because the dialog will be used in all future installations.

Setting Dialog PropertiesYou can change the properties of a dialog including its title, default font, dimensions, and positions.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Edit menu > Dialog Box Properties.

The Dialog Box Properties dialog appears.

3. Complete the dialog:

� Dialog TitleEnter the title for the dialog�s title bar.

� Font Name / Font SizeEnter 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 the default or override the default with a customized font.

� Width / HeightEnter the point sizes of the dialog. All dialogs in a wizard loop must have the same size as the first dialog or screen refresh problems occur.

NoteYou can also resize the dialog by clicking its edges and dragging. Use the Width and Height fields for more precise sizing.

� Horiz. Position / Vert. Position. Select 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 to turn off the wizard graphic on 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.

4. Click OK.

Using the Right-Click Menu in the Dialog EditorUse the right-click menu to simplify editing in the Custom Dialog Editor. It contains the same commands that are in the Layout and Add menus and on the Control Palette.

137

About Dialog Controls

About 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, and 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 Adding Text Controls on page 139.

! 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 Adding Edit Text Controls on page 140.

! 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 Adding Push Button Controls on page 141.

! 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 Adding Radio Button Controls on page 143.

! Checkbox. Adds a checkbox. Use checkboxes when the end user can make multiple selections from a group of options. See Adding Checkbox Controls on page 144.

! Combo Box. Adds a drop-down list or a multi-line list box. You can configure the drop-down list to either allow the end user to enter a non-listed option, or constrict the end user to the listed choices. See Adding Combo Box Controls on page 145.

! List Box. Adds a scrolling list of items from which the end user can select one or more options. See Adding List Box Controls on page 146.

! Group Box. Adds a box that encloses a group of related controls with a rectangle. See Adding Group Box Controls on page 148.

! Graphic. Adds a non-editable bitmap graphic. See Adding Graphic Controls on page 148.

! Hot Text. Adds hot text that you can link to actions or a Web page. See Adding Hot Text Controls on page 149.

! Rectangle. Adds a box. See Adding Rectangle Control on page 150.

! Play AVI. Adds a movie but no controls to play, stop, rewind, or fast forward the movie. See Adding Play AVI Control on page 151.

Adding and Editing Dialog ControlsThe process of adding and configuring a control on a dialog is similar for each type of control. When you add a control to a dialog, its corresponding settings dialog opens so you can configure the control�s appearance and behavior.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select the control by doing one of the following:

� Click the control in the Control Palette.

� Choose from the right-click menu�s Add submenu.

� Use the Add menu on the main menu bar.

The settings dialog for the control opens.

3. Complete the dialog. For information about the settings dialog for each control, see About Dialog Controls on page 138.

138

About Dialog Controls

4. Click OK to add the new control to the dialog.

You can resize and move the control using its handles. To select multiple controls, use Shift+click. To resize and move controls with more precision, double-click the control to view its settings dialog.

NoteWhen you place a combo box field, you must resize the bounding box so that it is taller than the visible combo box. Otherwise, the drop-down list fails to drop down when you run the installation.

For information about scripting dialogs to handle mouse events, see Configuring a Dialog to Handle Mouse Events on page 179.

Adding Text ControlsUse text controls to display information on a dialog. Text controls are static controls, which means that the end user cannot change them.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Add menu > Text Control.

The Text Control Settings dialog appears.

3. Complete the dialog:

� TextEnter the text, up to a maximum of 511 characters. To start a new line, press Ctrl+Enter. Enter variable names surrounded by percent signs to display the application�s name or other information. See Variables and Expressions on page 79.

� Control NameEnter 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 AlignmentSelect how to align the text in the field: left, centered, or right.

� Fit pathname to field widthIf the control displays a pathname, mark this checkbox to cause the pathname to be shortened, if necessary, to allow it to fit in the allotted space. It then places �\�\� in the pathname to indicate omitted directories.

� No WrapMark this to not wrap the text if it is too long to display on a single line.

� No PrefixNormally, the ampersand character (&) in static text indicates 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 FontNormally, all controls use the default font, which you set on the Dialog Box Properties dialog. Click this to override the default font for this control. If the font you choose is not available on this computer, the system font is used.

� Default FontClick this to use the font specified on the Dialog Box Properties dialog.

� Transparent backgroundMark this to make the background for this control transparent.

139

About Dialog Controls

� Calculated ValueThe Calculated Value section is used primarily for component installations to display the space requirements for the selected components. Example: When a component installation is run, the Select Component Dialog screen shows the Disk Space Required and the Disk Space Remaining fields. That information is provided by the following fields:

" ComponentsThis variable represents the Disk Space Required by the selected component set. Select the COMPONENTS variable, as it calculates the total space requirements for the currently-selected component set.

" DiskThis variable represents the Disk Space Remaining on the installation drive. Select the MAINDIR variable, as it keeps track of free space in the installation directory.

� X-Position / Y-PositionSpecify the exact location of the control on the dialog in dialog units. You can also use the alignment commands to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 152.

� Width / HeightSpecify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, though this is not as precise.

4. Click OK.

Adding Edit Text ControlsThe Edit Text control lets the end user enter and edit text information. You can also use it to display text (example: license agreements or ReadMe files).

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Add menu > Edit Text.

The Edit Text Control Settings dialog appears.

3. Complete the dialog:

� DefaultThe text you enter appears in the Edit Text control by default. To start a new line, press Ctrl+Enter and then mark Multi-line.

� VariableEnter or select the name of the script variable that stores the return value of this dialog control.

� AlignmentSelect how the text is aligned in the edit field: left-justified, centered, or right-justified. This is enabled only when Multi-line is marked.

� Control NameEnter 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 / Vert. ScrollMark this to add a horizontal or vertical scroll bar to the field.

� Auto HScroll / Auto VScrollMark this to scroll the text if it extends past the right edge or bottom of the edit field.

� Multi-lineMark this to allow multiple lines of text to be entered into the edit field.

140

About Dialog Controls

� PasswordMark this if entered text should display as asterisks (*), providing password security.

� No Hide SelNormally, text highlighting is hidden when the dialog loses focus. Mark this checkbox to suppress the hiding of highlighting.

� Want ReturnMark this to let the end user advance to the next line with the Enter key. This option must be used with the Multi-line option.

� BorderMark this to include a border around the edit field.

� Uppercase / LowercaseMark this to convert all entered characters to a different case.

� Read OnlyMark this to prevent end users from entering data into the field.

� Tab StopMark this to let end users use the Tab key to give focus to this field. Make sure this is marked for input fields.

� RichEditMark to enable the text box to support rich text objects (example: formatted text, bold, italic, font size variations, and colors). This causes rich text files to display properly.

� Read Default Text from FileEnter the pathname of a text file. The file contents are displayed in this field. This path should be relative. Use variable substitution (example: %MAINDIR% to refer to the destination directory) to begin the path.

� Min. Length / Max. LengthEnter 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.

� DirectoryMark this to remove trailing backslashes from the text before it is placed in the variable.

� Confirm If ExistsMark this to prompt for confirmation if the pathname the end user entered already exists on the destination computer. Clear this checkbox if you do not want the �This directory already exists� message to appear.

� X-Position / Y-PositionSpecify the exact location of the control on the dialog in dialog units. You can also use the alignment commands to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 152.

� Width / HeightSpecify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, though this is not as precise.

4. Click OK.

Adding Push Button ControlsPush 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

141

About Dialog Controls

next dialog. Each dialog must have at least one button that allows the end user to get out of the dialog.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Add menu > Push Button.

The Push Button Control Settings dialog appears.

3. Complete the dialog:

� LabelEnter the name of the push button. To create a keyboard shortcut for the button, enter an ampersand (&) immediately before a letter. For example, �< &Back� would display the label �< Back� and set the keyboard shortcut to Alt+B.

� VariableEnter or select the name of the script variable that stores the return value of this dialog control.

� ValueEnter the value that gets assigned to the variable. This can be useful in a script when more than one button can dismiss a dialog and you need to know which one the end user clicked.

� Control NameEnter 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.

� ActionChoose an action for the button.

" Return to Previous DialogDisplays the previously-displayed dialog in the dialog set. (Exception: The Back buttons on wizard dialogs do not use this option. They are controlled by the Wizard Loop script action.) If this is the first dialog displayed from the set, it returns to the installation script.

" Return to ScriptReturns to the installation script, even if this dialog was called from another dialog in the dialog set.

" Display DialogDisplays the selected dialog from the current set.

" Abort InstallationThe end user is asked to confirm that the installation should be aborted. If the end user confirms, the installation is exited.

" Display Help ContextIf the HELPFILE variable points to a valid copy of a Windows help file, the specified numeric help context is displayed.

" Execute ProgramLaunches another application or links to a Web page. Click Edit to specify and configure the application to be launched. See Specifying Execute Program Settings on page 152.

" Execute Named EventPasses a named event to the dialog script. The DLG_EVENT_TYPE variable is set to the entered text. See About the Dialog Script Editor on page 159.

� X-Position / Y-PositionSpecify the exact location of the control on the dialog in dialog units. You can also use the alignment commands to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 152.

142

About Dialog Controls

� Width / HeightSpecify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, though this is not as precise.

� Default ButtonMark this to make this the default button, that is, the one that is selected if the end user presses the Enter key. Only one button should be set to the default per dialog.

� Do Not Check FieldsMark this to suppress directory confirmation and field validity checking (useful for Browse buttons).

4. Click OK.

For information about scripting buttons to handle mouse events, see Configuring a Dialog to Handle Mouse Events on page 179.

Adding Radio Button ControlsA 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 maintained by the Custom Dialog Editor.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Add menu > Radio Button.

The Radio Button Control Settings dialog appears.

3. Complete the dialog:

� Radio Button TextEnter 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.

� Retain DisabledIf you set 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 uses the Back button to backtrack (see Note below). Mark this checkbox to make disabled radio button options retain their disabled state, even if end users go backward and forward on dialogs. This checkbox causes any lowercase letters in the variable to stay in the variable, even after the end user navigates between dialogs. If this checkbox is cleared, the variable takes on the value of the option that was selected, and the lowercase information is lost.

� VariableEnter or select the name of the script variable that stores the return value of this dialog control.

NoteIf you set the variable to a string containing one or more lowercase letters, the corresponding options will be disabled in the radio button control when it displays on the dialog. Example: A radio button with four options whose variable is set to �ABcd� would have the last two options disabled.

� Control NameEnter the name by which you plan to refer to this control in the dialog script. Leave this blank if you do not plan to manipulate this control with a script.

143

About Dialog Controls

� X-Position / Y-PositionSpecify the exact location of the control on the dialog in dialog units. You can also use the alignment commands to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 152.

� Width / HeightSpecify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, though this is not as precise.

4. Click OK.

For information about scripting radio buttons to handle mouse events, see Configuring a Dialog to Handle Mouse Events on page 179.

Adding Checkbox ControlsLike radio buttons, a group of checkboxes is considered a single control. Unlike radio buttons, however, the end user can select multiple boxes. Alignment and spacing between the individual checkboxes is maintained by the Custom Dialog Editor. Checkboxes are often used to control the installation of components or sub-components.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Add menu > Checkbox.

The Checkbox Control Settings dialog appears.

3. Complete the dialog:

� Checkbox TextEnter the text options for the checkboxes, 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. 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.�

� VariableEnter or select the name of the script variable that stores the return value of this dialog control.

NoteIf you set the variable to a string containing one or more lowercase letters, the corresponding options will be disabled in the checkbox control when it displays on the dialog. Example: A checkbox with four options whose variable is set to �ABcd� would have the last two options disabled.

� Sub-ComponentsIf the checkbox control is being used to specify the components to be installed, and if the components have sub-components, enter the names of sub-component variables separated by commas.

� Control NameEnter 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-PositionSpecify the exact location of the control on the dialog in dialog units. You can also use the alignment commands to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 152.

144

About Dialog Controls

� Width / HeightSpecify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, though this is not as precise.

� ComponentsIf this is marked, the sizes of the components that correspond to the variable specified are displayed to the right of the checkboxes. Normally, you mark this checkbox only if you are selecting components and have specified the COMPONENTS variable.

� Retain DisabledIf you set the checkbox variable so that some of its options are disabled, those options become enabled if the end user proceeds to the next dialog and uses the Back button to backtrack. Mark this checkbox to make disabled radio button options retain their disabled state, even if end users go backward and forward on dialogs. This checkbox causes any lowercase letters in the variable to stay in the variable, even after the end user navigates between dialogs. If this checkbox is cleared, the variable takes on the value of the option that was selected, and the lowercase information is lost.

4. Click OK.

For information about scripting checkboxes to handle mouse events, see Enabling, Disabling, and Marking Controls in a Dialog on page 181.

Adding Combo Box ControlsA combo box can take three forms: a list box, a drop-down list, and a drop-down 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.

NoteWhen you place a combo box, you must resize the bounding box so that it is taller than the visible combo box. Otherwise, the drop-down list fails to drop down when you run the installation.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Add menu > Combo Box.

The Combo Box Control Settings dialog appears.

3. Complete the dialog:

� Combo Box TextEnter the text to be displayed in the list. Enter one item per line.

� SortMark this to sort the combo box items into ascending order.

� Vert. ScrollMark this to let the end user scroll vertically if there are more items than fit into the allocated space.

� Auto HScrollMark this to scroll the text entry field horizontally if more text is entered than fits.

145

About Dialog Controls

� ProgMan GroupsMark this to have the items in the Programs group of the Windows Start menu appear in the combo box. If the installer runs on Windows 3.1, the Program Manager groups appear in the combo box.

� Drive ListMark this to display the end user�s available drives in the combo box. The value returned is a letter and a colon (such as �C:�).

� DirectoryMark this to remove trailing backslashes from the text before it is placed in the variable.

� Confirm If ExistsMark this to prompt for confirmation if the pathname the end user entered already exists on the destination computer. Clear this checkbox if you do not want the �This directory already exists� message to appear.

� VariableEnter or select the name of the script variable that stores the return value of this dialog control.

NoteTo cause an option in the list to be pre-selected, use a Set Variable action to set a variable to the value of one of the options. Then choose that variable in the Variable field.

� Combo Box TypeSelect the combo box type:

" 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.

" Drop List. Drop-down list that only allows a selection from the list.

� Control NameEnter 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-PositionSpecify the exact location of the control on the dialog in dialog units. You can also use the alignment commands to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 152.

� Width / HeightSpecify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, though this is not as precise.

NoteWhen setting the width for a combo box field, make sure it is at least as wide as the longest option in the list.

Adding List Box ControlsA 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. If it returns letters, it 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.

146

About Dialog Controls

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Add menu > List Box.

The List Box Control Settings dialog appears.

3. Complete the dialog:

� List Box TextEach 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.

� VariableEnter or select the name of the script variable that stores the return value of this dialog control.

� Control NameEnter 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 TypeSelect the list box type:

" Normal. A simple list.

" Program Manager Groups. A list of the items in the Programs group of the Start menu. If the installer runs on Windows 3.1, the Program Manager groups appear in the list box.

" Directory Tree Browse. A directory tree browser including an edit field, directory tree, and disk drive list.

" List Box with Checkboxes. A list containing a checkbox for each item, allowing multiple items to be selected simultaneously.

� ComponentsIf this list box control is being used to specify the components to be installed, and if the components have sub-components, enter the names of sub-component variables separated by commas.

� SortMark this to sort the list box items in ascending order.

� Vert. Scroll / Horiz. ScrollMark this to add a vertical or horizontal scroll bar to the field.

� Disable No ScrollMark this to display a vertical scrollbar even if one is not needed.

� Multi-SelectMark this to allow the end user to select multiple items from the list.

� Return LettersMark this to cause the control to return a list of letters representing the item selected (that is, A for the first, B for the second, etc.) rather than the item text itself.

� Don�t AppendMark this to not append the �Program Files� directory name onto the Destination Directory selected by the end user.

147

About Dialog Controls

� Confirm If ExistsMark this to prompt for confirmation if the pathname the end user entered already exists on the destination computer. Clear this checkbox if you do not want the �This directory already exists� message to appear.

� ComponentsPopulate the Components field above and mark this checkbox to create named components.

� Store PositionMark this to store the position of the last selected item. The position is stored as a zero-padded, two-digit decimal number at the beginning of the variable. Example: If the end user selects the first, the third, then the fourth item, this control returns a value of 04ACD.

� X-Position / Y-PositionSpecify the exact location of the control on the dialog in dialog units. You can also use the alignment commands to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 152.

� Width / HeightSpecify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, though this is not as precise.

4. Click OK.

Adding Group Box ControlsA group box encloses a group of related controls with a rectangle. Example: The Placement section on the Group Box Control Settings dialog is a group box.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Add menu > Group Box.

The Group Box Control Settings dialog appears.

3. Complete the dialog:

� Group Box TextEnter a name to appear at the top of the group box. Example: On the Group Box Control Settings dialog, �Placement� is the group box text.

� Control NameEnter 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.

� Transparent Background. Mark this to make the background for this control transparent.

� X-Position / Y-PositionSpecify the exact location of the control on the dialog in dialog units. You can also use the alignment commands to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 152.

� Width / HeightSpecify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, though this is not as precise.

4. Click OK.

Adding Graphic ControlsYou 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.

148

About Dialog Controls

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Add menu > Graphic in Custom Dialog Editor.

The Graphic Control Settings dialog appears.

3. Complete the dialog:

� Graphic PathnameSpecify the pathname for the bitmap graphic to add to the dialog.

� Control NameEnter the name by which you plan to refer to this control in the dialog script. Leave this blank if you do not plan to manipulate this control with a script.

� Do not resize bitmap graphicNormally, graphics are resized if the dialog needs to be made larger (example: if the destination computer uses a larger font size). Mark this checkbox to keep the graphic at the same size, regardless of the system settings. Because this option may cause the graphic to appear in a different place on the dialog, test the installation thoroughly.

� X-Position / Y-PositionSpecify the exact location of the control on the dialog in dialog units. You can also use the alignment commands to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 152.

� Width / HeightSpecify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, though this is not as precise.

4. Click OK.

Adding Hot Text ControlsUse the Hot Text control to link an action to specific text. (Example: 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.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Add menu > Hot Text.

The Hot Text Control Settings dialog appears.

3. Complete the dialog:

� LabelEnter the text to use as hot text.

� VariableEnter or select the name of the script variable that stores the return value of this dialog control.

� ValueEnter the value that gets assigned to the variable. This can be useful in a script when you need to know which hot text the end user clicked.

� Control NameEnter 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.

� ActionChoose an action for the button.

" Return to Previous DialogDisplays the previously-displayed dialog in the dialog set. (Exception: The Back buttons on wizard dialogs do not use this option. They are controlled by

149

About Dialog Controls

the Wizard Loop script action.) If this is the first dialog displayed from the set, it returns to the installation script.

" Return to ScriptReturns to the installation script, even if this dialog was called from another dialog in the dialog set.

" Display DialogDisplays the selected dialog from the current set.

" Abort InstallationThe end user is asked to confirm that the installation should be aborted. If the end user confirms, the installation is exited.

" Display Help ContextIf the HELPFILE variable points to a valid copy of a Windows help file, the specified numeric help context is displayed.

" Execute ProgramLaunches another application or links to a Web page. Click Edit to specify and configure the application to be launched. See Specifying Execute Program Settings on page 152.

" Execute Named EventPasses a named event to the dialog script. The DLG_EVENT_TYPE variable is set to the entered text. See About the Dialog Script Editor on page 159.

� Set FontNormally, all controls use the default font, which you set on the Dialog Box Properties dialog. Click this to override the default font for this control. If the font you choose is not available on this computer, the system font is used.

� Default FontClick this to use the font specified on the Dialog Box Properties dialog.

� Disabled Color / Enabled ColorClick Color to choose from the palette or to define custom colors. Enabled Color is the color in which the hot text appears when the end user moves the mouse pointer moves over the text.

� Underline Enabled TextMark this to underline the hot text when the end user moves the mouse pointer over the text.

� X-Position / Y-PositionSpecify the exact location of the control on the dialog in dialog units. You can also use the alignment commands to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 152.

� Width / HeightSpecify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, though this is not as precise.

� Do Not Check FieldsMark this to suppress directory confirmation and field validity checking.

4. Click OK.

Adding Rectangle ControlUse the Rectangle dialog control to draw a box on the dialog. Rectangle controls are static controls, which means that the end user cannot make changes to them.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Add menu > Rectangle.

150

About Dialog Controls

The Frame/Rectangle Control Settings dialog appears.

3. Complete the dialog:

� TypeSelect Frame or Rectangle. On older operating systems, such as Windows NT 3.51 or Windows 3.1, rectangles are filled and frames are not. Newer operating systems do not distinguish between rectangles and frames.

� BevelSpecify 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 NameEnter 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-PositionSpecify the exact location of the control on the dialog in dialog units. You can also use the alignment commands to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 152.

� Width / HeightSpecify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, though this is not as precise.

4. Click OK.

Adding Play AVI ControlYou can play an animation on any of the installation dialogs by adding a Play AVI dialog control. (Example: You might want to provide marketing information or offer animated help on how to install your application.) The .AVI will play once or loop continuously.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136

2. Select Add menu > Play AVI.

The Play AVI Control Settings dialog appears.

3. Complete the dialog:

� .AVI PathnameSpecify the pathname for the movie (.AVI file) to play on the dialog.

� Control NameEnter 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-PositionSpecify the exact location of the control on the dialog in dialog units. You can also use the alignment commands to precisely arrange controls on the dialog. See Aligning and Spacing Dialog Controls on page 152.

� Width / HeightSpecify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, though this is not as precise.

� Loop ContinuouslyMark this to repeatedly start the movie from the beginning.

4. Click OK.

151

About Dialog Controls

Specifying Execute Program SettingsWhen you place a Hot Text control or a Push Button control on a dialog, you can execute a program or link to a Web page when the hot text or button is clicked.

1. Open the Hot Text or Push Button Control Settings dialog. See Adding Hot Text Controls on page 149 or Adding Push Button Controls on page 141.

2. Choose the Execute Program action and click Edit.

The Execute Program Settings dialog appears.

3. Complete the dialog:

� EXE PathSpecify the path to the application to be executed, including the application executable. Use variable substitution (example: %MAINDIR% to refer to the application directory) to ensure a valid path regardless the installation location. Enter only the filename if you set the path in the Default Directory field below.

� Command LineEnter the command line options for the application (example: /S /Q). To link to a Web page, type the URL for the Web page (example: http://www.wise.com).

� Default DirectorySpecify 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 also use variable substitution.

� Variables AddedAny script variables that were added by the executable program using a DDE link.

NoteVariables Added retained for backward compatibility only.

� Window SizeYou 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 ExitIf this is marked, the installation does not continue until the application has exited.

4. Click OK.

Aligning and Spacing Dialog ControlsThe alignment and spacing commands help you align and space controls in relation to one another.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Use Shift+click to select multiple items.

3. Select one of the following commands from the Layout menu:

� Align Controls LeftLines up the left edge of the selected controls with the left edge of the leftmost control.

� Align Controls RightLines up the right edge of the selected controls with the right edge of the rightmost control.

152

About Dialog Controls

� Align Controls TopLines up the top edge of the selected controls with the top edge of the topmost control.

� Align Controls BottomLines up the bottom edge of the selected controls with the bottom edge of the bottommost control.

� Space Evenly DownDistributes 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 AcrossDistributes 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 ControlsTab 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 order in which the dialog controls were created.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Layout menu > Tab Order.

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.

3. Specify the new tab order by clicking the controls in the desired order.

� As you click each control, its number turns black.

� When you have clicked the last control, the numbers disappear and the new tab order is applied.

153

About Dialog Controls

� To exit the tab order view, press the Esc key.

NoteAlthough static controls such as graphics, text messages, divider lines and so on are included in the tab order, they are ignored when the end user presses the Tab key. Thus, their actual tab order is irrelevant.

154

Solutions for Dialog Problems

Solutions for Dialog Problems

For solutions to some of the most common dialog editing problems, see:

Changing the Default Graphic on Wizard Dialogs on page 155Disabling the Appending of the Program Files Directory on page 155Disabling the Directory Already Exists Message on page 156Keeping Disabled Controls From Reactivating on page 156Dialogs and End User Input on page 156Creating Custom Dialogs on page 134

Changing the Default Graphic on Wizard DialogsBy default, wizard dialogs contain a graphic that is not part of the individual dialogs. It is specified on the Wizard Loop Settings dialog, where you configure the Wizard Loop script action. You can change this graphic and turn it off for selected dialogs.

To change the bitmap that applies to all wizard dialogs:

1. In Setup Editor, double-click the Wizard Loop script line. There are two Wizard Loop script lines: one for the main installation and one that contains the Finish dialog. Change both of these to have the same graphic on all dialogs.

The Wizard Loop Settings dialog appears. See Wizard Loop on page 131.

2. In the Wizard Bitmap section, in Pathname, specify a pathname for a new graphic.

This changes the graphic for all dialogs in the loop sequence.

3. Click OK.

To turn off the Wizard Bitmap on selected wizard dialogs:

1. In Setup Editor, double-click the Custom Dialog script line for the dialog.

The Custom Dialog Editor opens.

2. Select Edit menu > Dialog Box Properties.

The Dialog Box Properties dialog appears. For information on this dialog, see Setting Dialog Properties on page 137.

3. Towards the bottom of the dialog, mark Do not display wizard graphic on this dialog.

4. Click OK.

Disabling the Appending of the Program Files DirectoryIf you do not populate the Default Directory field on the Product Details page, and the end user changes the default directory using the Browse button on the Select Destination Directory dialog, a Program Files directory is appended to the selected directory. To prevent this, either populate the Default Directory field or disable the appending of Program Files.

1. From Setup Editor, double-click the following line in the script:

Custom Dialog �Select Destination Directory�

The dialog opens in Custom Dialog Editor.

2. Select Window menu > Select Destination Directory.

The Select Destination Directory dialog appears.

3. Double-click the list box control.

155

Solutions for Dialog Problems

The List Box Control Settings dialog appears.

4. Mark Don�t Append and click OK.

5. Select File menu > Save Changes and Exit.

Disabling the Directory Already Exists MessageWhen an end user runs the installer and selects an existing directory 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.

1. From Setup Editor, double-click the following line in the script:

Custom Dialog �Select Destination Directory�

The dialog opens in Custom Dialog Editor.

2. Select Window menu > Select Destination Directory.

The Select Destination Directory dialog opens.

3. Double-click the list box control.

The List Box Control Settings dialog appears.

4. Clear Confirm if Exists and click OK.

5. Select File menu > Save Changes and Exit.

Keeping Disabled Controls From ReactivatingThis problem affects radio buttons and checkboxes.

Example:

You have a dialog in a wizard loop that has a radio button with four options. You disable several options by setting the variable associated with the radio button to �ABcd.� The lowercase �c� and �d� disable the third and fourth options. The dialog works fine if the end user selects an option and continues through the wizard dialogs. However, if the end user clicks the Back button to return to the dialog that contains the radio button, then all four of the button�s options are now enabled.

To correct this problem, mark the Retain Disabled checkbox on the settings dialog for radio buttons and checkboxes. 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.

In the example 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 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.�

Dialogs and End User InputDialogs can exhibit different behaviors based on end user input. For details, see the sample scripts discussed in the topics below. These scripts are located in the Samples directory in the WiseScript Editor application directory.

Understanding Sample Scripts on page 175Configuring a Dialog to Handle Mouse Events on page 179Enabling, Disabling, and Marking Controls in a Dialog on page 181Displaying a License Agreement Dialog on page 183Showing or Skipping Dialogs Based on End User Input on page 181Letting the End User Select Components and Subcomponents on page 182

156

About Custom Dialog Sets

About Custom Dialog Sets

A single Custom Dialog script action can display a set of related dialogs. You do this by using a button on one dialog as a gateway to another dialog. This secondary dialog can link to another dialog, back to the master dialog, or return to the installation script. A single dialog set can contain up to 256 separate dialogs. The Select Destination Directory and Backup Replaced Files dialogs on the Dialogs page in Installation Expert are a dialog set.

Note Generally dialog sets are comprised of one dialog and the other dialogs that it calls. Example: A dialog might have an Options and Browse buttons, each of which brings up a dialog. The three dialogs together comprise a dialog set. The main dialogs that you see during installation are not a dialog set, but are controlled by a Wizard Loop action in the script.

Creating a Dialog Set1. Create the master dialog. See Adding a Dialog to the Installation on page 135.

The master dialog is the first dialog displayed when the associated Custom Dialog script action is executed.

2. In Custom Dialog Editor, select File menu > New Dialog to add another dialog to the set.

The Dialog Box Properties dialog appears.

3. Complete the dialog and click OK. See Setting Dialog Properties on page 137.

4. Configure the new dialog. See Adding and Editing Dialog Controls on page 138.

5. Link the set of dialogs together using push button controls. For information on the various actions you can assign to a button, see Adding Push Button Controls on page 141. You can link to another dialog, back to the master dialog, or return to the installation script.

To switch between dialogs in the set, select the dialogs from the Window menu. (You can also delete the current dialog using the Delete Dialog command on this menu.)

6. When you have finished creating the dialog set, choose File menu > Save Changes and Exit.

This saves all the dialogs in the set simultaneously.

Configuring Dialog Set PropertiesOn the Dialog Set Properties dialog, you name the dialog set and specify the variable on which to base the display of this set.

1. Open a dialog from the set in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select Edit menu > Dialog Set Properties.

The Dialog Set Properties dialog appears.

3. Complete the dialog:

� Dialog Set NameEnter 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 name must be unique within a wizard loop. This value is displayed in the installation script.

157

About Custom Dialog Sets

� Display VariableThe 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 FloatIf you are displaying a dialog outside a wizard loop, mark this checkbox to have called dialogs appear over the calling dialog. (Example: suppose you display a Select Destination Directory dialog that contains a Browse button. If this checkbox is marked, and the end user clicks Browse, the Browse dialog appears on top of the Select Destination Directory dialog instead of replacing it.) This behavior is built into the wizard loop dialogs by default.

4. Click OK.

158

About the Dialog Script Editor

About the Dialog Script Editor

Each dialog can include an attached WiseScript that lets you perform script actions in response to events inside a dialog. You create this WiseScript in 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. It lets you script dialogs to handle mouse movements, gather user input, and branch according to end user choices.

Events are generated 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 on the dialog (UPDATE), and verification of the validity of the contents of the dialog (VERIFY). Additional events, whose names you define, can be generated by choosing Execute Named Event on the settings dialog of push button or hot text controls.

To handle the generated events, you create a conditional structure in the dialog script that tests the variable DLG_EVENT_TYPE for the appropriate value. (Example: If DLG_EVENT_TYPE is equal to INIT, 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. The script can handle multiple events in different ways by including multiple conditional blocks, one after the other.

Creating a Custom Dialog Script

NoteBefore attempting to write a custom dialog script, review the introductory material in Setup Editor on page 62. Also see Conditionals and Loops on page 78 and Variables and Expressions on page 79.

1. Open the dialog in Custom Dialog Editor. See Editing Dialogs on page 136.

2. Select View menu > Dialog Script Editor.

The Dialog Script Editor opens.

3. Create the script as you would in Setup Editor.

For information about scripting a dialog to handle mouse events, see Configuring a Dialog to Handle Mouse Events on page 179.

Dialog Script ActionsThe script actions available in the Dialog Script Editor are a subset of the actions in Setup Editor, with the addition of 3 script actions: Set Control Attributes, Set Control Text, and Set Current Control. These 3 actions manipulate controls on the dialog programmatically. Controls without names cannot be manipulated with these 3 actions.

The available script actions are:

! Call DLL FunctionCalls an external program in a dynamically linked library. See Call DLL Function on page 88.

! Check ConfigurationTests aspects of the computer�s configuration (examples: amount of memory, OS type, and display depth). See Check Configuration on page 93.

159

About the Dialog Script Editor

! Check If File/Dir ExistsDetermines 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 95.

! Display MessageDisplays a message box on the screen, which is useful for error messages or alerts. See Display Message on page 103.

! Edit INI FileEdits the program�s private .INI files as well as the WIN.INI and System.ini files. This script action does not force Windows to restart, and might corrupt the file. See Edit INI File on page 105.

! Edit RegistryAdds, edits, or deletes keys or values in the registry. See Edit Registry on page 105.

! Else StatementMarks the beginning of a section of instructions. See Else Statement on page 107.

! ElseIf StatementMarks 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 107.

! End StatementMarks the end of an If block or a While loop. See End Statement on page 108.

! Get Registry Key ValueGets the value of a registry key and stores it in the specified script variable. See Get Registry Key Value on page 111.

! Get System InfoRetrieves system info (examples: date and time, Windows version, available RAM, owner name, and company name). See Get System Information on page 112.

! If StatementMarks the beginning of a conditional block of script. See If Statement on page 114.

! Parse StringSplits 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 120.

! Prompt for FilenameAsks the end user for a path for opening or saving a file. See Prompt for Filename on page 122.

! Read INI ValueReads an entry from an existing .INI file into a script variable. (Example: to obtain the pathname to an existing version of a program or other file.) See Read INI Value on page 123.

! RemarkUse to document the purpose of script sections. See Remark on page 125.

! Set Control AttributesShow and enable, disable, or hide a control on the current dialog. See Set Control Attributes on page 127.

! Set Control TextSet the text of any static text control or input field. Variable substitution is permitted to include the values of variables. See Set Control Text on page 128.

160

About the Dialog Script Editor

! Set Current ControlMoves the input focus to the specified control. See Set Current Control on page 128.

! Set VariableSets script variables to particular values and performs operations and calculations. See Set Variable on page 129.

! While StatementMarks the beginning of a loop. See While Statement on page 131.

Dialog Script Examples

To see an example of a dialog script:

1. Open the sample script Event Handler.wse in the Samples directory in the WiseScript Editor application directory.

2. In Setup Editor, double-click the Custom Dialog �Event Handler� script line.

The dialog opens in the Custom Dialog Editor.

3. Select View menu > Dialog Script Editor.

The script for the dialog appears in the Dialog Script Editor.

How you might use a dialog script:

! Have the INIT event enable buttons on 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 on 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 on the dialog and reject the end user�s 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 closing. If all fields are correct, do not change DLG_EVENT_TYPE.

! Create a button on the dialog that generates a custom event. Example: Create an event called DISKSPACE, and set it�s handler to show the amount of free disk space using a Display Message event.

161

Chapter 7Creating Custom Billboards

Billboards are a series of one or more graphics that present a slide show to the end user while files are being installed on the destination computer. These are typically used to encourage the end user to register the product, to promote related products, or to provide other useful information.

Topics include:

! Accessing the Custom Billboard Editor.

! About the Custom Billboard Editor.

! Opening and Saving Custom Billboards.

! Adding Objects to a Billboard.

162

Accessing the Custom Billboard Editor

Accessing the Custom Billboard Editor

1. Select Setup Editor.

2. At the bottom of the Actions List, click the Standard tab.

3. Double-click the Custom Billboard action.

The Custom Billboard Editor window opens.

The tools you need to work in the Custom Billboard Editor are accessible from its menu bar or the icons on the toolbar.

163

About the Custom Billboard Editor

About the Custom Billboard Editor

The Custom Billboard Editor provides a basic set of drawing tools for creating billboards. 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. 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 you can move, rearrange, recolor, or resize all objects. (Example: 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 programs, you can still use the Custom Billboard Editor to place other objects (example: editable text) over them.

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. You can specify the background that displays during the installation on the Screen page of Installation Expert.

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 assigned a .GRF file extension when saved as a separate file.

164

Opening and Saving Custom Billboards

Opening and Saving Custom Billboards

You can access the commands for creating, saving, exporting, and importing billboards from the File menu in the Custom Billboard Editor. There is no New command on the File menu because a new blank billboard screen displays when you open the Custom Billboard Editor.

The commands on the File menu are:

! OpenOpens a billboard from a .GRF file on disk, importing it to the current installation.

! Save AsSaves 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 SavingReturns to Setup Editor without saving any of the changes made to the billboard.

! Save Changes and ExitSaves the changes you made to the billboard and returns to Setup Editor. If you choose this command, the graphic is saved as part of the installation. It is only saved as a separate file if you use the Save As command.

165

Adding Objects to a Billboard

Adding Objects to a Billboard

The Custom Billboard Editor is object-based and lets you add different types of objects.

1. Access the Custom Billboard Editor. See Accessing the Custom Billboard Editor on page 163.

2. Select the Add menu and choose the object.

3. Drag in the work area to create the object. (The polygon tool requires that you click at each point of the polygon, then double-click at the last point.)

After you place the object in the work area, a settings dialog appears.

4. Complete the dialog:

� For text objects, see Editing Billboard Text Objects.

� For line objects, see Editing Billboard Line Objects on page 167.

� For rectangles, rounded rectangles, and ellipses, see Editing Billboard Rectangles and Ellipses on page 167.

� For polygons, see Editing Billboard Polygon Objects on page 168.

� For bitmaps, see Editing Billboard Bitmap Objects on page 168.

5. Click OK.

6. Position the object on the billboard. See Resizing, Moving, and Aligning Billboard Objects on page 169.

Editing Billboard Text ObjectsText 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.

1. Access the Custom Billboard Editor. See Accessing the Custom Billboard Editor on page 163.

2. Select Add menu > Text and drag the dimensions of the object in the billboard editor.

When you release the mouse button, the Text Settings dialog opens.

3. Complete the dialog:

� TextEnter the text to display. No variables can be referenced here, except compiler variables.

� Extra BoldMark this to display text in an extremely bold version of the typeface.

� ShadowMark this to display text using a 3D effect.

� AlignmentSpecify the alignment of the text within its bounding rectangle: left, center, or right.

� Text AngleSpecify the angle at which text should be displayed. If a non-zero text angle is used, the text is centered regardless of the alignment setting. This feature is available only if you have selected a TrueType font.

� Font StyleClick Set Font to choose the font, size, and style for this object.

166

Adding Objects to a Billboard

� Text ColorClick Pick to choose a color for the text using the standard Windows color picker.

� PlacementSpecify the size and location of the object in pixels. The upper left corner is 0,0. The black rectangle on the billboard editor defines an area of 640 x 480 pixels.

4. Click OK.

Editing Billboard Line ObjectsWhen 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.

1. Access the Custom Billboard Editor. See Accessing the Custom Billboard Editor on page 163.

2. Select Add menu > Line and drag the dimensions of the object in the billboard editor.

When you release the mouse button, the Line Settings dialog opens.

3. Complete the dialog:

� Line StyleChoose the texture for the line.

� Line ArrowsDetermines which ends of the line will have arrowheads, if any.

� Line DirectionDetermines 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 WidthThe width of the line in pixels.

� Line ColorClick Pick to choose a color for the line using the standard Windows color picker.

� PlacementSpecify the size and location of the object in pixels. The upper left corner is 0,0. The black rectangle on the billboard editor defines an area of 640 x 480 pixels.

4. Click OK.

Editing Billboard Rectangles and EllipsesThe procedure for editing rectangles, rounded rectangles, and ellipses is the same, except that rectangles also have a 3D option.

1. Access the Custom Billboard Editor. See Accessing the Custom Billboard Editor on page 163.

2. Select Add menu > Rectangle or Rounded Rectangle or Ellipse and drag the dimensions of the object in the billboard editor.

When you release the mouse button, the Object Settings dialog opens.

3. Complete the dialog:

� Line StyleChoose the texture for the line that outlines the shape.

� Fill StyleChoose from No Fill (line only), Solid Color, or a variety of crosshatch styles.

167

Adding Objects to a Billboard

� 3D(Rectangle only) Each option from this list gives the rectangle a different 3D effect.

� Line WidthThe width of the object�s outline in pixels.

� Line Color / Fill ColorClick Pick to choose a color for the line and fill using the standard Windows color picker.

� PlacementSpecify the size and location of the object in pixels. The upper left corner is 0,0. The black rectangle on the billboard editor defines an area of 640 x 480 pixels.

4. Click OK.

Editing Billboard Polygon ObjectsThe polygon object consists of a series of points that are connected by lines.

1. Access the Custom Billboard Editor. See Accessing the Custom Billboard Editor on page 163.

2. Select Add menu > Polygon, click where the points should be located, and close the polygon�s path by double-clicking on the starting point.

When you double-click the mouse button, the Polygon Settings dialog opens.

3. Complete the dialog:

� Line StyleChoose the texture for the line that outlines the polygon.

� Fill StyleChoose from No Fill (line only), Solid Color, or a variety of crosshatch styles.

� Line WidthThe width of the object�s outline in pixels.

� Polygon PointsThe list of points that define the polygon�s vertices. Click Delete to delete a selected point, or use the X and Y fields to move the selected point to new coordinates.

� Line Color / Fill ColorClick Pick to choose a color for the line and fill using the standard Windows color picker.

4. Click OK.

Editing Billboard Bitmap ObjectsUse the Bitmap object to import bitmap graphics created in other applications into your Custom Billboards. Use the text tool in the Custom Billboard Editor to add captions and

Closing the polygon.

168

Adding Objects to a Billboard

content to the graphics, rather than making the text part of the bitmap. You can then easily change the text if you need to translate it into a different language or update it.

The Custom Billboard Editor supports 256-color and true-color bitmap (.BMP) files. When using multiple bitmaps, it is important that they all be created using the same graphics editor so the files share a common color palette. Otherwise, the colors can shift when the bitmaps display on-screen.

NoteImported bitmap objects can appear distorted when the billboard is run with the Scale to Screen option enabled on the Billboard Settings dialog. This is not true of objects created in the Custom Billboard Editor.

1. Access the Custom Billboard Editor. See Accessing the Custom Billboard Editor on page 163.

2. Select Add menu > Bitmap and drag the dimensions of the bitmap frame in the billboard editor.

When you release the mouse button, the Bitmap Settings dialog opens.

3. Complete the dialog:

� PathnameEnter the pathname to the graphic on your computer.

� TransparentMark this to make the color chosen below transparent.

� Transparent ColorClick Pick to choose the transparent color using the standard Windows color picker. Every pixel in the image with this color becomes invisible on the billboard, meaning you can see everything behind it.

� PlacementSpecify 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 ObjectsYou resize an object in the Custom Billboard Editor by clicking the object and 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. Example: To nudge the object vertically by 1 pixel, click the object and 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.

To align billboard objects:

The alignment and spacing commands help you align and space objects in relation to one another.

1. Open the billboard in the Custom Billboard Editor by double-clicking its custom action in Setup Editor.

2. Use Shift+click to select multiple objects.

3. Select one of the following commands from the Layout menu:

169

Adding Objects to a Billboard

� Align LeftLines 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 TopLines up the top edge of the selected object with the top edge of the topmost object.

� Align BottomLines up the bottom edge of the selected object with the bottom edge of the bottommost object.

� Space Evenly DownDistributes the selected objects vertically between the topmost and bottommost objects. Their horizontal position is not changed. Use Align Left or Align Right to move them into a column.

� Space Evenly AcrossDistributes 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.

Setting Billboard PropertiesWhen you are done creating a billboard, use the Billboard Settings dialog to set the behavior of the 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.

1. Open the billboard in the Custom Billboard Editor by double-clicking its custom action in Setup Editor.

2. Select Edit menu > Graphic Properties.

The Billboard Settings dialog appears. The options on this dialog are a subset of the settings for the Display Billboard script action.

3. Complete the dialog:

� X Position, Y PositionIndicate the location on a 640 x 480 screen to place images. On larger screens, the billboard is placed proportionately based on the 640 x 480 location.

� Erase NumSpecify how many previously displayed graphics are erased before this image is displayed. To display one image at a time, set to 1. To display all images simultaneously, set to 0. The oldest image is removed first.

� Build EffectSpecify a transition effect.

� Center Horizontal

� Place at Right

� Scale to ScreenMark this for the image to cover the same percentage of the screen regardless of screen size.

� Hide Progress BarMark this to hide the progress bar during image display.

170

Adding Objects to a Billboard

� Center Vertical

� Place at Bottom

� Tile BackgroundMark this checkbox to repeat the graphic edge-to-edge to fill the entire screen.

� Erase AllMark this checkbox to remove all previous graphics from the screen before displaying the new one.

� Timed DisplayMark this checkbox to display a series of graphics at evenly-spaced intervals, which is calculated by the number of files to be installed. Place all Display Billboard actions before the first Install File(s) action if you are using Timed Display.

4. Click OK.

171

Chapter 8Advanced Scripting

Use the advanced scripting topics to automate the build process, create an installation that uses AutoPlay, and acquire an advanced understanding of Setup Editor scripts.

Topics include:

! Automating the Build Process.

! AutoPlay.

! About Sample Scripts.

! Using Sample Scripts.

! Sample Scripts That Perform Tasks.

! Sample Scripts That Restart the Destination Computer.

! Sample Scripts That Use Expression Operators.

! Sample Scripts That Use Complex Dialogs.

! Sample Scripts That Perform Web and FTP Transactions.

! Sample Scripts That Call .DLLs

! Sample Scripts That Check System Configuration

172

Automating the Build Process

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.

1. Enter the following command line statement into a batch file or program that has the ability to run command line statements:

�C:\Program Files\Wise Package Studio\WiseScript Editor\Wise32.exe� /c /s �C:\Development\Application.wse�

where �C:\Program Files\Wise Package Studio\WiseScript Editor\Wise32.exe� is the path to the WiseScript Editor executable, and �C:\Development\Application.wse� is the pathname for the script to be compiled.

2. Use Scheduled Tasks to schedule the running of the batch file.

Scheduled Tasks is in the Control Panel or My Computer, and is not available on some older operating systems.

NoteTo test the options without the scheduling program, open a command line window and type a command line statement. Select Windows Start menu > Run, type command (Windows 9x) or cmd (Windows 2000 or NT), and click OK.

173

AutoPlay

AutoPlay

The Windows operating system has the ability to automatically open a file on a compact disc (CD) when it is inserted into the computer. This feature is referred to as AutoPlay. When Windows detects that a CD drive has been accessed, it scans the root directory of the CD drive for a text file called AutoRun.inf. You can create this file in any text editor.

The AutoRun.inf file must have an [autorun] section, which identifies the lines that follow as AutoPlay commands. The [autorun] section contains an open statement that specifies the path of the file that should start when the CD is inserted. The icon statement specifies the file name that contains the icon. If the files are in the same directory as the AutoRun.inf file, enter just the file names. If the files are located inside a directory on the CD, enter a relative pathname. For more information about AutoPlay, go to msdn.microsoft.com and search for �AutoRun� or �AutoPlay�.

Following is an example of an AutoRun.inf File:

[autorun]open=Program.exeicon=filename.icoWhere Program.exe is any Windows program.

The sample script AutoPlay.wse, which presents the end user with choices, is the type of dialog you might display using the AutoPlay feature. For information on AutoPlay.wse, see Handling Mouse Events Without Scripting on page 180.

174

About Sample Scripts

About Sample Scripts

The Samples directory in the WiseScript Editor application directory contains an assortment of WiseScripts (.WSE files) that perform complex actions and provide interactivity to the end user. Use these to further your knowledge of WiseScript Editor. These sample scripts do not provide step-by-step instructions for solving a particular problem, but provide an example that you can study and use as a basis for your own script.

Some of these scripts run as stand-alone scripts while others contain only sections of code that you can copy and paste into your own script to achieve the desired effects. For details, see Understanding Sample Scripts.

Using Sample Scripts1. In Setup Editor, select File menu > Open and specify a sample script.

Sample scripts are in the Samples directory in the WiseScript Editor application directory.

2. To see what the script does, click Test.

If you see an error message that warns of a missing file, or a file that could not be opened, see Troubleshooting Sample Scripts on page 176.

3. To understand what the script does, read the remark script lines (Rem) throughout the script. See Understanding Sample Scripts on page 175.

4. If the script has a Custom Dialog script line, double-click it to open the dialog in Custom Dialog Editor. Do the following to see relevant settings:

� To open a control�s settings dialog, double-click the control.

� To see if a dialog has its own script and to view the script, select View menu > Dialog Script Editor.

� To view another dialog of a dialog set (if the dialog is part of a dialog set), select the dialog from the Window menu.

5. Determine how you can use the script. For information on the different types of sample scripts and how they can be used, see Understanding Sample Scripts.

Understanding Sample ScriptsYou can learn most of what you need to know about a sample script by reading its remark (Rem) script lines.

The header remarks follow this format:

! Rem Script NameContains the file name of the current script.

! Rem AuthorContains internal WiseScript information for tracking scripts.

! Rem Creation DateContains the creation date of the script.

! Rem Last ModifiedContains the date the script was last modified by Wise Solutions personnel.

! Rem VALID USETells you how the script can be used:

175

About Sample Scripts

� �Stand Alone ScriptIndicates that the script has all the elements necessary for an installation. You only need to customize it for your purposes. This might include substituting your own bitmaps, adding billboards, and installing your own files. When a sample script contains an Install File(s) script line, it usually references a file inside the WiseScript Editor application directory to ensure that the file exists.

� Cut/Paste ScriptIndicates that 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, copy the designated lines from this script and paste them into your own script. You might need to edit the lines to fix hard-coded pathnames, use different graphics, and so on.

� DemonstrationIndicates that this script is used to demonstrate a specific concept. It may not compile correctly, but it demonstrates the concept described in its remark script lines. These scripts are intended primarily as a learning tool.

! Rem PurposeTells you what this script does.

! Rem ACTIONS DEMONSTRATEDLists the script actions that are demonstrated within this script. This remark is only in some of the sample scripts.

There are other remarks 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.

Troubleshooting Sample Scripts

Messages About Converting the ScriptWhen you open a sample script and try to go to Installation Expert, a message might appear warning you that the script is not compatible with Installation Expert. If you get messages about converting the script, you should choose not to convert the script. To safely view Installation Expert without converting your script, select Setup Editor > Edit menu > Installation Properties, or press Ctrl+Z. This takes you to Installation Expert, but only shows you pages that do not affect the installation script. For details, see Navigating Between Views on page 13.

Messages About Missing Files

Sometimes when you try to run or test a sample script, messages appear 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.

! 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 WiseScript Editor application directory. However, sometimes the pathnames for these files are different on your computer than on the computer where the script was developed. You can resolve this problem by using the Source Directories menu command described in Changing Source Directories on page 18, or by redefining compiler variable paths on the Compiler Variables page in Installation Expert.

176

About Sample Scripts

Sample Scripts That Perform TasksSeveral sample scripts perform tasks that you might want to add to your script. These scripts perform the following tasks:

Creating an Installer That Can Be Customized During Compile on page 177Manipulating a Text File on page 177Placing Shortcuts in Subfolders on page 177Prompting the End User to Insert a Floppy Disk on page 177Creating a Connection Between a Database Client and Oracle Server on page 177

Creating an Installer That Can Be Customized During CompileYou can use compiler variables to customize an installer at compile time. See Compiler Variables on page 30.

The sample script Compvar.wse, which is in the Samples directory in the WiseScript Editor application directory, uses the Compiler Variable If action. To see the compiler variable settings for _GRAPHIC_ and _OPTIONS_, go to the Compiler Variables page in Installation Expert. When the script runs, the first dialog asks if you want Sample Files and .DLL Source Code to be part of the installer and the second dialog asks you for the path to a bitmap file to be used as part of the installer.

Manipulating a Text FileThe sample script TextFile.wse, which is in the Samples directory in the WiseScript Editor application directory, demonstrates how to insert lines, convert case, comment out lines, and delete lines in a text file.

Placing Shortcuts in SubfoldersThe sample Shortcuts in Subfolders.wse, which is in the Samples directory in the WiseScript Editor application directory, demonstrates 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, (example: Programs\WidgetWare\Readme). This script puts additional subfolders inside the main shortcut folder, so you can have shortcuts located in subfolders (example: Programs\WidgetWare\Documentation\ReadMe).

Prompting the End User to Insert a Floppy DiskThe sample script Newdisk.wse, which is in the Samples directory in the WiseScript Editor 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 (example: zip disk).

Creating a Connection Between a Database Client and Oracle ServerThe sample script Add Tnsnames entry.wse, which is in the Samples directory in the WiseScript Editor application directory, adds an entry to the tnsnames.ora file, which enables a connection from a database client to an Oracle server.

177

About Sample Scripts

Sample Script That Searches for Files or ApplicationsThe sample script Search.wse, which is in the Samples directory in the WiseScript Editor application directory, uses the Search for File, Find File in Path, and Get Registry Key Value script actions. It uses these script actions to search for:

! A file with a given name on all local drives or on the network of the destination computer.

! A file with a given name in the PATH environment variable or in specified directories of the destination computer.

! An application on the destination computer that�s associated with a particular file extension.

Sample Scripts That Restart the Destination ComputerThe sample scripts are in the Samples directory in the WiseScript Editor application directory.

Running a Program Once After Computer Restart

The sample script Runonce.wse causes an application to run once after the destination computer has been restarted.

Example: 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 develop a script to remove the files that you moved to the Temp directory. However, 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 forces the destination computer to restart after installation is complete. It works by setting the variable RESTART to �S.�

Sample Scripts That Use Expression OperatorsYou can use expression operators to parse strings and to perform calculations, such as addition. The sample scripts demonstrate the use of many of the expression operators.

The sample scripts are in the Samples directory in the WiseScript Editor application directory.

Performing Calculations on Integer Values

The sample scripts Adding.wse and Division.wse contains 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.

Error Checking User Input

The sample script Division.wse checks end user input to see if the divisor is zero. If it is zero, the prompt continues to appear until the 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.

178

About Sample Scripts

Parsing Strings

The following sample scripts demonstrate how to manipulate text strings using expression operators. See Expression Operators on page 195 for a complete list and usage.

! Before$.wse To return the characters in a string that occur before another string.

! After$.wse To returns the characters in a string that occur after another string.

! Concat$.wse To concatenate one string with another string.

! Instr.wse To determine if one string is present inside another string.

! Lcase$.wseTo change all characters in a string to lowercase.

! Left$.wseTo get the left portion of a string.

! Rtrim$.wse To remove all spaces at the end of a string.

! Ltrim$.wse To remove all spaces at the beginning of a string.

! Len.wse To determine the length of a string.

Converting a String to Lowercase or Uppercase

The sample script Lcase$.wse converts a string to all lowercase. You can easily change it to convert to all uppercase by using the expression operator Ucase$() instead of Lcase$().

Putting User Input Into Variables

The sample scripts Adding.wse, Division.wse, Concat$.wse, Instr.wse, Left$.wse, and Len.wse prompt the end user for information and put the input into variables. Most then perform calculations on the input or manipulate it in some way and then display the result.

Sample Scripts That Use Complex DialogsSome sample scripts come with complex dialogs built into them. These scripts demonstrate how to set up dialogs to do the following:

Configuring a Dialog to Handle Mouse Events on page 179Enabling, Disabling, and Marking Controls in a Dialog on page 181Showing or Skipping Dialogs Based on End User Input on page 181Letting the End User Select Components and Subcomponents on page 182Displaying a License Agreement Dialog on page 183

Configuring a Dialog to Handle Mouse EventsThe sample scripts Event Handler.wse, License Agreement.wse, and AutoPlay.wse contain dialogs that exhibit different behavior based on end user input. Event Handler.wse and License Agreement.wse handle mouse events with scripted dialogs. Using scripting to handle mouse events provides more control over what happens in

179

About Sample Scripts

dialogs, but you can also handle mouse events without scripting. The script AutoPlay.wse handles mouse events without scripting.

Sample scripts are in the Samples directory in the WiseScript Editor application directory.

Handling Mouse Events Without Scripting

To see how AutoPlay.wse handles mouse events without scripting:

1. In Setup Editor, open AutoPlay.wse.

2. In the installation script, double-click the Custom Dialog script line.

The dialog opens in Custom Dialog Editor.

3. Double-click the text �Launch Application.�

The Hot Text Control Settings dialog opens. Note that in the Action section of the dialog, the Execute Program option is marked. When the end user clicks the text, the program specified in the Execute 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. In Setup Editor, open License Agreement.wse.

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.

The Radio Button Control Settings dialog appears. Note that the variable is AGREEMENT. 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.

4. Click Cancel on the Radio Button Control Settings dialog.

5. Now double-click the Next button.

The Push Button Control Settings dialog appears. Note that the value of the Control Name field is AGREE.

6. Click Cancel on the Push Button Control Settings dialog.

7. Select View menu > Dialog Script Editor.

The following script appears:

Disable Control AGREEIf AGREEMENT Equals �A� thenEnable Control AGREEEnd

In this script the control AGREE (the Next button) is first set to disabled. When the end user clicks the first radio button (I Agree) the letter �A� is put into the variable AGREEMENT. When AGREEMENT equals �A,� the AGREE control (the Next button) is enabled.

8. Close the Dialog Script Editor.

The script for the dialog in License Agreement.wse contains only 4 lines of code. To see a more complex dialog script, open Event Handler.wse, double click the Custom Dialog script line, and select View menu > Dialog Script Editor. This script handles several different mouse events.

180

About Sample Scripts

Enabling, Disabling, and Marking Controls in a DialogThe sample scripts Event Handler.wse and License Agreement.wse enable or disable controls by using dialog scripts. See Configuring a Dialog to Handle Mouse Events on page 179.

The sample script Subcomp.wse sets checkboxes to be initially marked or unmarked by initializing the variables COMPONENTS, SAMPLE_SUB, and DLL_SUB, which are variables that are associated with specific controls in dialogs.

To see how this is accomplished:

1. In Setup Editor, open Subcomp.wse.

Sample scripts are in the Samples directory in the WiseScript Editor application directory.

2. In the installation script, find the script line:

Set Variable COMPONENTS to AB

The variable COMPONENTS determines the state of a control in the Select Components dialog.

3. In the installation script, double-click the script line:

Custom Dialog �Select Components�

The Select Components dialog opens.

4. Double-click the checkbox control.

The Checkbox Control Settings dialog appears. Note that the variable associated with this checkbox control is COMPONENTS, which was initialized as �AB� earlier in the script. A value of �A� in COMPONENTS means the first checkbox is marked and a value of �B� in COMPONENTS means the second checkbox is marked. Thus, when this dialog is first displayed to the end user, both checkboxes are marked by default because �A� and �B� are in the variable COMPONENTS.

If the script did not initialize COMPONENTS, then neither of these checkboxes would be marked. Conversely, if the end user, when presented with the dialog, clears the first checkbox, the value of COMPONENTS changes to �B.�

5. Click Cancel in the Checkbox Control Settings dialog and then select File menu > Exit Without Saving.

Showing or Skipping Dialogs Based on End User InputThe sample script Skipdialog.wse presents the end user with a dialog containing three options and either skips or displays subsequent dialogs based on the options the end user chose. When an end user selects an option on this dialog, it puts letters into the variable COMPONENTS. The contents of the COMPONENTS variable is used in the Wizard Loop statement to either skip or display dialogs.

To see how this is accomplished:

1. In Setup Editor, open Skipdialog.wse.

Sample scripts are in the Samples directory in the WiseScript Editor application directory.

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.

181

About Sample Scripts

The Radio Button Control Settings dialog appears. Note that the variable in the Variable drop-down list is COMPONENTS. When the end user marks a radio button, the following is put into the variable COMPONENTS:

� A capital �A� if the end user marks the first radio button.

� A capital �B� if the end user marks the second radio button.

� A capital �C� if the end user marks the third radio button.

4. Click Cancel in the Radio Button Control Settings dialog, then select File menu > Exit Without Saving.

5. In the installation script, double-click the script line:

Wizard Loop

The Wizard Loop Settings dialog opens.

6. In the dialogs list, click �Install2� and note its Skip Dialog settings.

The dialog �Install2� is skipped if COMPONENTS is not set to �B,� that is, if the end user didn�t mark the second radio button. Likewise, the dialog �Install1� is skipped if COMPONENTS is not set to �A.�

Letting the End User Select Components and SubcomponentsThe sample script Subcomp.wse gives the end user the ability to choose the components and subcomponents to install. End users are presented with a dialog where they can mark the checkboxes for two components. Each component also has an Options button that displays a dialog with the subcomponents that make up the component.

To see how this is accomplished:

1. In Setup Editor, open Subcomp.wse.

Sample scripts are in the Samples directory in the WiseScript Editor application directory.

2. Double-click the script line:

Custom Dialog �Select Components�

The dialog set opens and displays the Select Components dialog.

3. Double-click the checkboxes.

The Checkbox Control Settings dialog appears. Note that the variable in the Variable drop-down list is COMPONENTS. When the end user marks a checkbox, 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.

If there was a third checkbox, a capital �C� would be placed into COMPONENTS, and so on.

4. Click Cancel in the Checkbox Control Settings dialog.

5. Select Window menu > Sample Files Components.

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. It is part of the Select Components dialog set.

6. Double-click the checkboxes.

The Checkbox Control Settings dialog appears. Note that the variable in the Variable drop-down list is SAMPLE_SUB. When end users marks a checkbox, the

182

About Sample Scripts

results are put into the variable SAMPLE_SUB. A capital �A� is added to SAMPLE_SUB if the end user marks the first checkbox and a capital �B� if the end user marks the second checkbox.

7. Click Cancel in the Checkbox Control Settings dialog and select File menu > Exit Without Saving.

This returns you to Setup Editor.

8. Scroll down in the script until you see the script lines:

If COMPONENTS Contains Any Letters in �A� thenIf SAMPLE_SUB Contains Any Letters in �A� then

The first If statement checks if �A� is in COMPONENTS, which would be true if the end user marked the Sample Files checkbox in the Select Components dialog. The second checks if �A� is in SAMPLE_SUB, which would be true if the end user marked the DLL Samples checkbox in the Sample Files Components dialog. If the end user marked both, then both variables contain the letter �A,� and the Install File(s) script lines after the second If statement are executed.

For information on how the Subcomp.wse script sets checkboxes to be initially marked or unmarked, see Enabling, Disabling, and Marking Controls in a Dialog on page 181.

Displaying a License Agreement DialogThe sample script License Agreement.wse, which is in the Samples directory in the WiseScript Editor application directory, displays a license agreement dialog during installation. For details, see Handling Mouse Events With Scripting on page 180.

Sample Scripts That Perform Web and FTP TransactionsSample scripts are in the Samples directory in the WiseScript Editor application directory.

Checking an FTP Site for Newer Files

The sample script Wiseup.wse 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.

Downloading a File From a Web Site During Installation

The sample script Ftpcopy.wse uses Copy Local File(s) script lines to copy files from an FTP site during installation. It shows how to download and run a .TXT file from an FTP site.

Launching a Web Page From an Installer

The sample script Url.wse launches a Web page from an installer. It first determines the default browser, then opens the URL specified in the Execute Program statement.

Using WebDeploy Through a Proxy Server

The sample script Proxy.wse contains 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. This script contains a Proxy Settings Dialog that makes it possible for end users to enter proxy server information during installation.

183

About Sample Scripts

Sample Scripts That Call .DLLsThe Call DLL Function script action lets you call a .DLL during installation to perform specialized functionality. See Call DLL Function on page 88.

The following sample scripts use the Call DLL Function Script action. For other sample scripts that call a .DLL, see Sample Scripts That Check System Configuration on page 184. Sample scripts are in the Samples directory in the WiseScript Editor application directory.

Branching a Script Based on the .DLL Return Value

The sample script Prompt.wse demonstrates how you can use Call DLL script lines to branch based on the value returned to the installer from the .DLL. It calls a WiseScript-specific .DLL. It also demonstrates how 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 forces an application to quit from within the installer. The Application Kill.wse kills the application Microsoft Word by using information obtained from executing Windows system .DLLs.

Sample Scripts That Check System ConfigurationSample scripts are in the Samples directory in the WiseScript Editor application directory.

Checking for 256 Color Display

The sample script Checkvga.wse checks the color depth of the destination computer.

Determining the Destination Computer�s Color PaletteThe sample script Colors.wse checks 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.

NoteThe 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 checks disk space on the destination computer. While you can use a Check Disk Space script action to see if adequate disk space exists, it does not put the information in a variable that you can display to the end user. By using the sample script CheckDiskSpace.wse, you can put this information into a variable and gather more detailed information about the free space.

Detecting the Presence of Internet Explorer

The sample script DetectIE4or5.wse detects the registry key values that are normally present when Microsoft Internet Explorer 4.0 is installed.

184

About Sample Scripts

Detecting QuickTime Version

The sample Detect QuickTime Version.wse checks the version of QuickTime installed on a machine. It searches for a QuickTime file, gets the version of the file, and puts the version number in a variable.

185

Chapter 9Troubleshooting Installations

You have several options for debugging an installation. You can use:

! The installation log to determine what is happening during the installation, including what fails.

! The built-in debugger, as described in Using the Debug Commands on page 75.

! Compiler variables to build a debug version of your installer .EXE that displays values of variables and other useful information while it is executing. The compiler itself helps ensure stability because it checks that all required information is present before it builds an installer .EXE. See Compiler Variables on page 30.

Topics include:

! Using the Installation Log.

! File Replacement Problems in System32.

186

Using the Installation Log

Using the Installation Log

The installation log is a text file that helps you debug your script. The log is the most complete record you have of exactly what the installation is doing. As your script runs on the destination computer, each action it performs is logged in Install.log. This includes: failures of actions to execute, the reasons for the failure, and what changes on your system.

Use the installation log to determine where problems occur and why. Your testing group can use it to check the accuracy of the entire installation. It also helps with your technical support efforts because end users who have problems installing can simply e-mail you the installation log.

Use the Add Text to Install.log script action to add your own commands 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 85.

On the Installation Log page in Installation Expert, you can enable or disable the installation log and choose its location. See Installation Log on page 42.

187

File Replacement Problems in System32

File Replacement Problems in System32

Following are file replacement problems you might encounter:

! Files you assign to the application directory or to the Windows directory incorrectly install to the System or System32 directory.

! 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 operating system (OS) type and language, and it won�t 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 Install File Settings dialog that appears, if Check File is selected from the Replace Existing File drop-down list, 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 from the Replace Existing File drop-down list other than Check File.

! Bypass the default version checking code. By default, WiseScript calls a Microsoft .DLL for version checking. You can use WiseScript Editor�s version checking method instead of Microsoft�s. To change the version checking method to the WiseScript Editor 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 1Install File C:\Program Files\Application\country.sysSet Variable VER_CHECK_TYPE to

188

Chapter 10Quick Reference

Use the following reference material when developing installations.

! Standard Variables.

! Expression Operators.

! Windows Language Codes.

! Command Line Options.

189

Standard Variables

Standard Variables

The following variables are set by WiseScript Editor or by the script generated by Installation Expert. Many of these variables can be modified by a script, but their initial values are set before the script executes.

Automatic Compiler VariablesCompiler 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 30.

Automatic Runtime VariablesThese variables are set on the destination computer just before the script executes.

Variable Description

_WIN_ Windows directory (on build machine).

_WISE_ The directory containing WiseScript Editor.

_LOGFILE_PATH_ Path to the Install.log file.

_SYS_ The Windows system directory (on build machine).

_VAR_LIST_ Contains all the variables defined in this installation file (does not contain compiler variables).

Variable Description

BACKUPDIR If this is set to a path, any files that are replaced during installation are backed up. This variable is set by the end user on the Backup Replaced Files dialog.

CMDLINE The command line options passed to the installation .EXE.

CRLF Holds a carriage return/linefeed character for use in making lists and separating items in lists.

DISK_NUMBER (read-only)

The number of the disk currently being used by the installation. We recommend that you do not change this variable.

DLG_EVENT_TYPE Used for custom dialog scripts. Built-in dialog events are INIT, UPDATE, VERIFY (see About the Dialog Script Editor on page 159).

FONTS Pathname to directory where fonts should be installed.

HELPFILE Used by custom dialogs to display a help context. Set to full pathname of help file. We recommend that you do not modify this variable.

INST Pathname to directory containing installation .EXE. We recommend that you do not change this variable.

190

Standard Variables

INST_LOG_PATH Full path to place Install.log at end of installation.

INSTALL_RESULT (read-only)

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 similar 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 is 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) from the called application.

LANG The language the end user selects in a multi-language installation. We recommend that you do not change this variable.

PASSWORD Set to the password to be used for password-protected files. Setting this variable disables the password prompt. Set this for distributions that do not use prompting.

PROCEXITCODE (read-only)

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) from the called application.

Variable Description

191

Standard Variables

Runtime VariablesThe following runtime variables might be set or used by script actions generated by Installation Expert. Some variables might not have values assigned, depending on settings you chose in Installation Expert.

RESTART At the end of the script, set this variable to S to perform a full system boot at script completion. On Windows NT/2000/XP, if the current end 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. See Sample Scripts That Restart the Destination Computer on page 178.

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 left blank, it turns off the RESTART function.

SYS Windows System directory pathname. We recommend that you do not modify this variable.

SYS32 Pathname to the system directory for Win32 files under Windows NT/2000/XP. We recommend that you do not modify this variable.

TEMP Windows temporary directory pathname. We recommend that you do not modify this variable.

UNINSTALL_LANG Language information to make the UNWISE.EXE language match the installation language.

UNINSTALL_PATH Location to place UNWISE.EXE.

WIN Pathname to the Windows directory. We recommend that you do not modify this variable.

Variable Description

APPTITLE The title of the installation as entered in Installation Expert.

BACKUP Pathname to the end user�s selected backup directory on the destination computer.

BRANDING If set to 1, user information is written to CUSTDATA.INI in the directory containing the installation .EXE.

CDESKTOPDIR Common desktop directory for adding shortcuts to desktop.

Variable Description

192

Standard Variables

CGROUPDIR Path to the directory where shortcuts for all end users are stored on Windows NT/2000/XP operating systems.

COMMON Common files directory.

COMPONENTS A list of the components the end user selects for installation on the destination computer (A for first component, B for second, etc.).

CSTARTMENUDIR Common Start menu directory for adding shortcuts to Start menu.

CSTARTUPDIR Common StartUp directory for adding shortcuts to StartUp group.

DESKTOPDIR Desktop directory for adding shortcuts to desktop.

DIRECTION Used by Wizard Loop action to control direction of motion through dialogs.

DISPLAY Holds the name of the current wizard dialog (read-only).

DOBACKUP Holds the end user�s choice as to whether to back up replaced files.

DOBRAND If set to 1, this is the first time the installation has been branded and user information is written to CUSTDATA.INI.

EXPLORER If set to 1, the end user has a Windows 95-style user interface on the destination computer (95/98, NT 4 or later).

GROUP Default group (or Start menu Programs group) for application shortcuts.

GROUPDIR Path to directory where application shortcuts should be created (corresponds to GROUP variable).

MAINDIR Directory for application files.

NAME Used for branding and registration.

PROCEXITCODE Lets you add your own error codes to the built-in error codes that are returned from an installation. Check for an error condition and, if the error condition is true, put your own error text into PROCEXITCODE. If, at the end of the installation, PROCEXITCODE is not blank, the return code from the installation is set to the contents of PROCEXITCODE. This lets you write conditional code based on the results of an external program. Be sure to:! Mark the Wait for Program to Exit checkbox on the

Execute Program Settings dialog for the Execute Program action.

! Select True Win32 from the Destination Platforms drop-down list on the Build Settings page. (This variable is the same as WISE_ERROR_RTN.)

PROGRAM_FILES Windows Program Files directory.

STARTMENUDIR Directory of the Start menu for adding shortcuts.

Variable Description

193

Standard Variables

STARTUPDIR Directory of the StartUp group for adding shortcuts.

VER_CHECK_TYPE Set this to 1 to cause the installation to use Wise�s simple version checking method instead of the standard Microsoft version checking method. This can fix problems when files are not being replaced as you expect. Set it to 1 before the Install File(s) script line that exhibits the problem. See File Replacement Problems in System32 on page 188.

WISE_ERROR_RTN 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 contents of WISE_ERROR_RTN are written to the installation log.

Variable Description

194

Expression Operators

Expression Operators

In conditionals, loops, and Set Variable commands, you can use symbols (examples: + and �) for addition and subtraction, functions (example: Left$) to work with bits of text, and logical (Boolean) operators (examples: AND, OR) to combine several conditions into one.

Operators can operate on a variable or a constant. There are 2 types of constants: numeric and string. Numeric constants must be a positive or negative integer (example: 234 or -100). Strings must be enclosed in quotation marks.

If you enter a variable name instead of a number or string in any of the functions below, do not enter % around the variable name. Variables must follow the standard naming conventions, described in Variables and Expressions on page 79.

To read about scripts that demonstrate using expression operators, see Sample Scripts That Use Expression Operators on page 178.

Operator Description

+ Addition

� Subtraction

* Multiplication

/ Division

Left$(str, position) Returns left portion of string, where str is the string, and position is number of characters from the left to return. Example: Left$(�windows�,3) returns �win.�

Right$(str,position) Returns right portion of string, where str is the string, and position is the number of characters from the right to return. Example: Right$(�windows�,3) returns �ows.�

Mid$(str,position, length)

Returns 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. Example: Mid$(�windows�,2,3) returns �ind.�

Concat$(str1,str2) For appending 2 strings together.

Instr(str1,str2) Determines if a substring (str2) is present within an original string (str1). Do not include the $ character because this operator does not return a string.

Before$(str1,str2) Returns the portion of a string (str1) before the indicated substring (str2). Example: Before$(�windows�,�d�) returns �win.�

After$(str1,str2) Returns the portion of a string (str1) after the indicated substring (str2). Example: After$(�windows�,�d�) returns �ows.�

Len(str) Returns the length of a given string. Do not include the $ character because this operator does not return a string.

Lcase$(str) Converts all characters in a string to lowercase.

Ucase$(str) Converts all characters in a string to uppercase.

195

Expression Operators

Ltrim$(str) Deletes all leading spaces.

Rtrim$(str) Deletes all trailing spaces.

Logical Operator

Example Description

And A And B True only if expression A and B are both true.

Or A Or B True if either expression, A or B, is true, or if both A and B are true.

Not A Not B True only if one expression is true. Example: A but not B.

> X>Y True if expression X is numerically greater than Y.

< X<Y True if expression X is numerically less than Y.

>= X>=Y True if expression X is numerically greater than or equal to Y.

<= X<=Y True if expression X is numerically less than or equal to Y.

= X=Y True if expression X is numerically equal to Y.

<> X<>Y True if expression X is not numerically equal to Y.

Operator Description

196

Windows Language Codes

Windows Language Codes

Language Code Script

Greek ELL Other

Russian RUS Cyrillic

Turkish TRK Latin 2

Polish PLK Latin 2

Czech CSY Latin 2

Slovak SKY Latin 2

Hungarian HUN Latin 2

Danish DAN Latin 1

Dutch (Standard) NLD Latin 1

Belgian (Flemish) NLB Latin 1

English (American) ENU Latin 1

English (British) ENG Latin 1

English (Australian) ENA Latin 1

English (Canadian) ENC Latin 1

English (New Zealand) ENZ Latin 1

English (Ireland) ENI Latin 1

Finnish FIN Latin 1

French (Standard) FRA Latin 1

French (Belgian) FRB Latin 1

French (Canadian) FRC Latin 1

French (Swiss) FRS Latin 1

German (Standard) DEU Latin 1

German (Swiss) DES Latin 1

German (Austrian) DEA Latin 1

Icelandic ISL Latin 1

Italian (Standard) ITA Latin 1

Italian (Swiss) ITS Latin 1

Norwegian (Bokmal) NOR Latin 1

Norwegian (Nynorsk) NON Latin 1

Portuguese (Brazilian) PTB Latin 1

Portuguese (Standard) PTG Latin 1

Swedish SVE Latin 1

Spanish (Standard/Traditional) ESP Latin 1

197

Windows Language Codes

Spanish (Mexican) ESM Latin 1

Spanish (Modern) ESN Latin 1

198

Command Line Options

Command Line Options

You can set command line options when you run WiseScript Editor, the installer executable, and the uninstaller executable. These are especially useful for running 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 WiseScript Editor. When compile errors occur, a dialog appears during compile with a specific error message.

See:

WiseScript Editor (Wise32.EXE) on page 199WiseScript Installations (Setup.EXE) on page 199Uninstall (Unwise.EXE, Unwise32.EXE) on page 200

WiseScript Editor (Wise32.EXE)You can apply the following command line options to the WiseScript Editor executable file.

Examples:

! Compiling a .WSE file while defining a compiler variable named _PATH_:

"C:\Program Files\Wise Package Studio\WiseScript Editor\Wise32.exe" /d_PATH_=C:\TEST /c "C:\Development\Application.wse"

! Compiling a .WSE file while setting compiler variables defined in a text file named Compile.txt:

�C:\Program Files\Wise Package Studio\WiseScript Editor\Wise32.exe� /c /d=C:\Development\Compile.txt �C:\Development\Application.wse�

WiseScript Installations (Setup.EXE)You can apply the following command line options to .EXE files that you compile from WiseScript Editor projects.

Option Function

/c file.wse Compiles the installation script.

/c /s file.wse Compiles the installation script silently. You can use this option with the /d option.

/c /d_VAR_=value Defines one compiler variable for this run only. Additional compiler variables require additional /d switches. Do not put a space between the /d and the compiler variable name.

/c /d=file.txt Defines compiler variables from a text file for this run only. The format for the text file is _VAR_=value, with one entry per line. You can use the /s option with this option.

199

Command Line Options

Uninstall (Unwise.EXE, Unwise32.EXE)You can apply the following command line options to the WiseScript Editor uninstall executable file, which is named unwise.exe or unwise32.exe.

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:

Option Function

/T Installs in Test mode.

/X pathname Extracts files to pathname.

/Z pathname Extracts files to pathname, then reboots.

/M Runs the installation in manual mode, prompting for system directories (examples: Windows, System).

/M=filename Specifies a value file for installation. For information on reading variables, see Set Variable on page 129.

/M1 Displays the name of each self-registering .OCX or .DLL as it is registered.

/M2 Reserved for internal use by WiseScript Editor during debugging sessions.

/M5=dir_name 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 which the end user has write privileges.

/S Installs in silent (automatic) mode with no end user choices.

Option Function

/Z Remove empty directories, including the one with Unwise itself.

/A Automatic mode. The Wise splash screen appears on the destination computer, and the uninstall proceeds immediately with no end user choices, except for questions about uninstalling shared files.

/S Silent mode. The uninstall proceeds silently with no splash screen, no dialogs, and no end user choices.

/R Rollback mode.

/U This option removes the Select Uninstall Method dialog, which means the end user does not see options for a custom, automatic, or repair uninstall.

200

Command Line Options

"C:\Program Files\Application\UNWISE.EXE" /A "C:\Program Files\Application\INSTALL.LOG" Application Uninstall

You can specify the title of the Uninstall dialog that appears. Type the title at the end of the command line after all other options. In the example above, the title would be �Application Uninstall.�

201

Index

Symbols% sign with compiler variable 80_LOGFILE_PATH_ 42, 190_SYS_ 190_VAR_LIST_ 190_WIN_ 190_WISE_ 190

Numerics386 33386Enh 33, 883D-style dialogs 294-digit year 113

Aaction

adding to script 67creating 70custom list 69list 64repeating 78user-defined, See user-defined

actionActive Directory page 26Add BDE Alias 83Add Directory to Path 84Add ProgMan Icons 84Add Text to Install.log 85Add to Autoexec.bat 86Add to Config.sys 87Add to System.ini 87Add/Remove control panel 27Add/Remove Programs page 27Adding.wse 178administrator rights, checking 93After$ 179, 195After$.wse 179All view 21Allow Floppy Disk Change 88animated help 151append data to registry key 49, 107application

executing 108exit code 109in Add/Remove Programs 27killing with .DLL 184name 45Program Files directory 155repairing 20

running after restart 178searching for by association 178

Application Kill.wse 184APPTITLE 192ASP 121association

See file associationauthenticode 34Autoexec.bat

adding command 27, 28backing up before editing 29, 87editing 86PATH variable 84

Autoexec.bat page 27automated build process 30, 173automatic runtime variable 190automatic self-repair 20, 39, 117AutoPlay 174, 174AutoPlay.wse 174, 180AutoRun.inf 174, 174, 174AVI, playing during installation 120

Bback up replaced file on destination computer 34background of installer

displaying images in 102setting 49

background processing 24BACKUP 192backup copy during save 24BACKUPDIR 190, 190batch file

scheduling to run 173beep for next disk 29Before$ 179, 195Before.wse 179Belgian language code 197billboard

about 164adding to script 102arranging object 169bitmap, adding 168determine how many display 170editing text 166ellipse, adding 167exporting 165importing 165line, adding 167location 170

moving object 169object, adding 166opening 165overlapping object 169polygon, adding 168properties 170rectangle, adding 167resizing object 169saving 165scalable 164scaling to screen 170settings 170slowing down 171timing the display 171transition 170working with 164

binary filereading from 124writing to 124

bitmapadding to billboard 168displaying in background 102,

162Bitmap Settings dialog 169blank line

in edit text control 140in script 125in text control 139

blank script 14, 14, 21, 63branching script 184BRANDING 192branding/registration 33Browse for Directory 88BUFFERS 129Build Settings page 29build, automated 30, 173building installation 14built-in dialog event 159button

adding 141enabling 156

CC language variable 80calculation, performing 178, 178Call DLL Function

example using structure 91script action 88

cancel script 65carriage return

in edit text control 140

202

Index

in text control 139CD

copying files from 29, 98storing installation 43

CDESKTOPDIR 192CD-ROM drive, getting 113CGI 121CGROUPDIR 193Check Configuration 93Check Disk Space 94Check HTTP Connection 94Check If File/Dir Exists 95Check In-use File 96Check Service 96checkbox

about 144adding 144control 144disabling 156, 179enabling 156, 179marking initially 181unmarking initially 181

CheckDiskSpace.wse 184Checkvga.wse 184Chinese installation 43CMDLINE 190color depth

checking with .DLL 184color palette

finding with .DLL 184color, in script 24, 64Colors.wse 184combo box

about 145adding 145pre-selected option 146size 146

command line optionautomated build 173WiseScript Editor uninstall

executable 200command line options

about 199compile 199silent compile 199silent installation 200silent uninstall 200test mode 200uninstall 200WiseScript Editor executable 199WiseScript Editor project 199

commenting out lines 66comments in scripts 125COMMON 193company name, getting 112compile

automated 30, 173

errors 199from command line 199in background 24installation 17options 29silently 199speeding 24stopping 114

compiler variableabout 80data entry options 31default value 31description 190disabling prompt 31entering into an expression 80example 76, 177list of 190naming 31percent sign 80prompting for value 30, 31properties 31referenced in script 30sample script 30setting 30underscore 80

Compiler Variable If/Else/End 97Compiler Variables page 30complex structure 91component

adding to installation 31conditional statement with 32disk space for 140installed by default 32list box for 147naming 32optional 34, 81program file for 32selecting for installation 34, 126

component size, modify 119component-based installation 31, 140, 182COMPONENTS 81, 94, 119, 181, 193Components page 31Compvar.wse 177Concat$ 179, 195Concat$.wse 179conditional loop 78Config ODBC Data Source 97Config.sys

adding command 32, 32backing up before editing 33, 87editing 87

Config.sys page 32Configure BDE 84connection line 66Contained within structure 92control

about 138

adding 138aligning 152attributes 127blank line in text 139changing text 128checkbox, See checkboxcombo box, See combo boxconfiguring 138disabling 159, 181drop-downediting 138enabling 159, 181frame 150graphic 148group box 148hot text, See hot textlist box, See list boxlocation 152manipulating 181marking by default 156option pre-selected 146play AVI 151property 138push button 141radio button, See radio buttonrectangle 150setting to current 128size 152spacing 152static 139, 148tab order, setting 153text 139, 140user text 140

convert path torelative 19UNC-based 18

convert script message 13, 13Copy Local File(s) 98CRC 29Create Directory 100Create Service 100Create Shortcut 101CRLF 190CSTARTMENUDIR 193CSTARTUPDIR 193custom action list 69Custom Billboard 102Custom Billboard Editor

about 162accessing 163window 163

custom dialog 102Also see dialog

Custom Dialog Editorabout 135accessing 135toolbar 138

custom dialog scriptabout 159

203

Index

examples for 161custom dialog set

See dialog setcustom installation template 21custom script code, incompatible 13custom splash screen 46Custom tab 64, 69customizing

development environment 21, 69page group 22

CUT/PASTE 176cyclic redundancy check 29Czech language code 197

DDanish language code 197database client, connecting 177date/time file modified

getting 112getting 4-digit year 113

date/time, currentgetting 112getting 4-digit year 113

debug version, building 76debugging

commenting out script lines 66script 75, 75

default directory 45, 155default script

changing 21Delete File(s) 102dependency, service 51, 100Desktop icon 51DESKTOPDIR 193destination computer

searching for file on 178destination directory

append directory problem 155default, setting 45dir exists message 156user-select 34

destination platform 30Detect QuickTime Version.wse 185DetectIE4or5.wse 184development environment 21, 69development process, streamlining 21, 70device 87device driver

adding to System.ini 33defining 33

Devices page 33dialog

adding 34aligning 152Also see dialog set

Also see dialog, addingAlso see dialog, displayingappearance 137calling dialogs 157changing control text 128common problems 155creating 102, 135default image, changing 155disabling control 159, 181dismissing 141display to user 103displaying text file 104editing, See dialog, editingenabling control 159, 181event, built-in 159executing program from 152floating 158font problems 43handling mouse event 156, 179installation wizard 33license agreement 183list box 140listing Program groups 147manipulating control 181movie 151properties 137push button 141saving 136script 159scripting 127, 128, 156, 180selecting 136settings 137showing 181size 137skipping 181spacing 152stop "dir exists" message 156stop appending to path 155tab order, setting 153text box 140text field, editing 140title 137to get filename 122to get text input 122to let user browse 88toolbar 138Web link 150wizard loop dialogs 131

dialog setcreating 157, 157custom 157defined 157editing 157example 157floating dialog 158master dialog 157naming 157properties 157sample script for 179

dialog template, editing 136dialog, adding

button 141

checkbox, See checkboxcombo box, See combo boxcontrol 138control, See controldrop-down 145frame 150graphic control 148group box control 148hot text control, See hot textlist box 146movie 151radio button, See radio buttonrectangle

control 150text 140text control 139to script 135

dialog, displayingrich text 140

dialog, editingabout 136control 138from Dialogs page 136from Setup Editor 136template 136

Dialogs page 33Digital Signature page 34DIRECTION 193directory

appended 155changing 18check if exists 95contents, adding 38creating empty 100default, setting 45in installation 18renaming 125

disablingcheckbox 156, 179control 159, 181radio button 179script lines 66

disk spacechecking 94checking with .DLL 184getting 113

DISK_NUMBER 190DISPLAY 193Display Billboard 102Display Message

example 76script action 103

Display Progress Message 104Display Text File 104dividing numbers 178Division.wse 178, 178DLG 136DLG_EVENT_TYPE 190DLL

204

Index

call function 88, 184check if loaded 95excluding with

ApplicationWatch 25excluding with Import VB

Project 25self-registering 99, 117, 127sending parameters 90shared 39using to find color 184using to kill application 184

DOBACKUP 193DOBRAND 193document type 35documentation, Wise 9DOS version, getting 112double-byte language 43download installation 58, 183drive

CD-ROM, getting 113getting first network drive 113type, getting 112

driverdefining device driver 33ODBC 118

DRV 33duplicate files in script 68Dutch language code 197dword 90dword pointer 91

EEdit INI File 105Edit Registry 105ellipse in billboard 167Else Statement 107ElseIf Statement 107empty project 14, 14, 21, 63empty registry key 47enabling

checkbox 156, 179control 159, 181radio button 156, 179

End Statement 108English language code 197environment variable

getting 110reading 112

error checking user input 178error message

about missing file 176Also refer to online

Knowledgebasechanging text for 23compiler variable 23for script sample 176version error 24

evaluate expression 130Evaluate Windows Installer Condition 108Event Handler.wse 179, 181event script

area 65cancel 65choosing 65exit script 65mainline 65

EXEcompiling 17getting pathname 113location after compile 30naming 30running silently 109self-registering 99, 117, 127version resource 41

execute installation 17execute program

from dialog 152script action 108

exit code 109Exit Installation 109exit script 65Exit Without Saving 165EXPLORER 193expression

about 79evaluating 130example 178

expression operatorabout 195example 179list of 195

Expression True 108, 114, 131, 132extension, finding application for 178extensions

See the first lettersee the first letter

Ffast create 24feature

See component 31file

4-digit modified date 113adding particular type 38adding to installation 36associating file type with

program 35association, See file associationattributes 128auto-addition of associated 36backing up replaced file on

destination computer 34check if exists 95converting path 18, 19

converting short to long 129copying from CD-ROM 29copying to destination

computer 116date/time modified 112deleting 102downloading from Web 98, 183duplicate file 36error during compile 18extension, See file associationfinding on destination

computer 178FTP from Web 98, 183in use 96installation settings 38long filename 129not opening 18open automatically 174removing from installation 37renaming 125replacing in System32 188replacing on destination

computer 39, 99, 117requiring password 39searching for 126, 178searching in PATH variable 178self-repairing 20, 39, 53, 101,

117, 117short filename 129size, getting 113troubleshooting replacement 188version checking 39, 99, 117version, getting 112

file associationcreating 35editing 36

File Associations page 35file extensions

See the first letterfile name

prompting for 122file type

Also see file associationassociating with program 35

Files page 36Find File in Path 110Finished dialog 34Finnish language code 197firewall 183First element of structure 92floppy disk

allowing change 88configuring installation for 29, 43prompting user to insert 177

FON 40font 40, 125Fonts page 40FONTS variable 190free disk space, getting 113

205

Index

French language code 197, 197FTP

copying files via 98protocol through proxy server 59transactions 183

Ftpcopy.wse 183function

DLL function 88, 184sending parameters 90

GGeneral Information page 41Get Environment Variable 110Get Name/Serial Number 111Get ProgMan Group 111Get Registry Key Value 111Get System Information 112Get Temporary Filename 113Get Windows Installer Property 114Getting Started Guide 9global options, setting 23graphics

checking support 93displaying in background 102,

162in wizard dialog 155

Greek language code 197GRF file 164GROUP 193group box control 148group for service 51, 100group name for icon on destination computer 34GROUPDIR 193

HHalt Compilation 114hardware, checking 93header remark

CUT/PASTE 176format 175stand-alone script 176

helpabout 9using 10

HELPFILE 190hot text

about 149adding 149control 149link to Web 150properties 149

hot text controlSee hot text

HTTPchecking connection 94

copying files via 98protocol 59

HTTP POST 121HTTP server, post to 121Hungarian language code 197

IIcelandic language code 197icon

adding 101adding automatically 24Also see shortcutfor installation .EXE 30group name 34

If Statementending 108starting 114

image, displaying in background 102, 162include file tab 24include script

about 65, 65action 115adding 115editing 65saving 65tab 24, 64, 65Wise-created 65

incompatible custom script code 13INI file

creating 41editing 105reading value 123settings 41updating on destination

computer 41INI Files page 41initialization splash screen 46Insert Line into Text File 115INST 190INST_LOG_PATH 191Install DirectX 84Install File(s) 116Install ODBC Driver 118Install WinCE Component 84Install WiseUpdate Client 84Install.log 42, 187

adding text 85open/close 119

INSTALL_RESULT 108, 191installation

Also see installation, addingbackground 49beep for next disk 29billboard, displaying 102blank script 14building 14, 17, 30

compiling 17compiling, See compilecomponent-based 31, 182copying from 98creating new 14, 14creation options 14customizing during compile 177,

177debugging 76default directory 45destination platform 30detecting previous 55distributing 60fast create 24file error during compile 18getting started 14icon for 30Internet-based 39, 58, 60, 183language 23, 30log file 42maintaining 18managing 14manual mode 24media 43message, changing 23naming 30optional items 31patching 39pausing 120progress bar 45prompt, changing 23prompting to save 23rebuilding automatically 24recording activity 187reducing traffic 29removing file from 37repair option 19saving automatically 23script, See scriptself-repairing 20, 39, 117serial number 44shortcut 51single-file 17, 43temp directory 30template, See installation

templatetesting 17title 45troubleshooting 186upgrade 53verify authenticity 34version 30, 41Web page, launching from 183wizard dialog 33Zip format-compatible 29

Installation Expertabout 15customizing page group 22customizing view 21defined 13getting help 15navigating to 13

206

Index

page navigation 15Pages menu 21relation to Setup Editor 63resetting page 15undoing page entry 15

installation file information 41installation from

Internet 183Web 183

installation logadding text 85creating 42default location 42for uninstall 57open/close 119using 187

Installation Log page 42installation template

about 14creating 21editing 21

installation, addingentire directory 38file 36font 40particular file type 38registry entries 46script 16WiseScript instructions 16

installerAlso see installationicon 30naming 30opening automatically 174

installer .EXEadapting to destination

computer 79building 17pathname 113prompting for file location 24rebuilding automatically 24

installer messagechanging 23editing 23language 23

Instr$ 179, 195Instr.wse 179integer, calculation on 178international installation 43Internet check 94Internet Explorer, presence of 184Internet transactions 183Internet-based installation

creating 58download option 39FTP protocol 59HTTP protocol 59proxy server, working

through 183

WebDeploy process 60with WebDeploy 60

intranet installation 58, 183in-use file, forced replacement 29IPF file, opening 15Italian language code 197

JJapanese, font for 43

LLANG 191language

adding 43code 197copying text between dialogs 43defining 43directory for 23font problems 43message 23selecting for installation 23specifying 64using another .INI for 30Windows codes 197

Language directory 23Languages page 43launch WiseScript Editor 14Lcase$ 179, 195Lcase$() 179Lcase$.wse 179, 179Left$ 179, 195Left$.wse 179Len$ 179, 195Len.wse 179license agreement 183License Agreement.wse 180, 181, 183line

adding to billboard 167in edit text control 140in text control 139number 66

list boxcontrol 146misinterpreted item 24problem selecting item from 24with checkboxes 147

log fileSee installation log

logging 42, 57, 187logon name, getting 113long 90long pointer 90loop

beginning 131ending 108

lowercase, converting 129, 179

Ltrim$ 179, 196Ltrim$.wse 179

Mmain installation script 65MAINDIR 193mainline script 64, 65managing installation 18manual

accessing online 9manual mode 24master dialog 157maximum compression 29Media page 43media-based installation 44memory

checking 93finding 112

messagechanging text for 23displaying to user 103

Microsoft Active Directory 26Microsoft SMS page 44Mid$ 195MIF file

creating 44opening 15

Modify Component Size 119mouse event 156, 179, 180movie on dialog 151multimedia file, playing 120multiple instances of same file 36multiple scripts 66

NNAME 193name script 64navigating between views 13network

drive, getting 113installation 29traffic, reducing 29

new featuresRefer to Release Notes

Newdisk.wse 177newsgroups 10non-English dialog 23non-properties view 13Norwegian language code 197

OOCX

excluding with ApplicationWatch 25

207

Index

exluding with Import VB Project 25

self-registering 99, 117, 127ODBC

data source, installing 97driver, installing 118

Open Software Description 101Open/Close Install.log 119operating system

checking 93requirements 54

operators 195optional installation item

See componentoptions for command line 199Oracle Server 177OSD 101owner name, getting 112

PPackage Definition File (PDF) 44page group, customizing 22page, resetting 15Pages menu 21paging 93Parameter Type 90parameters

passing to function 91Parse String 120parsing text 178, 179passive FTP transfer 58PASSWORD 191Password page 44password, requiring 39, 39, 44, 44, 98, 117patch installation 39, 40, 53, 118PATH variable 27, 84, 110pathname

changing directory 18relative path 19UNC path 18

Pause 120PDF (Package Definition File) 44percent sign with compiler variable 80play AVI control 151Play Multimedia File 120Polish language code 197polygon in billboard 168Portuguese language code 197Post to HTTP Server 121preferences, setting 23preprocessor variable 80Previous Version page

See System Search page

previous version, searching for 55, 55processor, checking 93PROCEXITCODE 108, 193Product Details page 45ProgMan 51, 84ProgMan group, getting 111program

executing 108, 152running silently 109

Program Files directory 155Program Manager

adding icon 84adding shortcut 51hiding 49

PROGRAM_FILES 193progress bar

calculation 45placement 45suppressing 39

Progress Bar page 45progress message 104Prompt for Filename 122Prompt for Text 122prompt, changing text for 23Prompt.wse 184prompting user for

information 179installation directory selection 34

propertiesgetting 114setting 130

Properties view 21Proxy.wse 183push button control 141

QQuickTime, checking version 185

Rradio button

about 143adding 143control 143disabling 179enabling 179

Radio Button Dialog 123Read INI Value 123Read/Update Text File 124Read/Write Binary File 124ReadMe

for application 33readme

See release notesreboot

at script completion 125, 192forcing 178

message, turning off 29running program after 178

Reboot System 125rebuild installation after changes 24rectangle

control 150in billboard 167

reference manualSee manual

REG fileadding 46importing 46, 47, 105

REG_EXPAND_SZ 112register .OCX/.DLL/.EXE/.TLB 39register files 99, 117Register Font 125registry

adding automatically 24Also see REG fileAlso see registry keyediting 105importing file 47keys 47specifying entries on destination

computer 46registry file

See REG fileregistry key

adding 47appending to 49, 107creating 47editing 47, 47getting value 111, 160removing from destination

computer 48, 106removing from installation 47,

105, 106self-repair 49, 101, 107settings 47, 106

Registry page 46registry value

See registry keyrelative path 19release notes 9REM statement

about 175Also see header remark

Remark 125remark header, See header remarkremovable media 43Rename File/Directory 125repair

about 19Also see self-repairapplication 49, 53, 101, 107, 117during uninstall 19, 57, 60turning on 53, 101

require password 98, 117

208

Index

resetting page 15RESTART 192restart

at script completion 125, 192forcing 178message, turning off 29running program after 178

restart.wse 178return code 199rich text, displaying in dialog 140Right$ 195right-click menu in Dialog Editor 137rollback, from command line 200rollback.wse 65, 65Rtrim$ 179, 196Rtrim$.wse 179run installation 17run program from installation 108Runonce.wse 178runtime variable

about 80automatic 190with script actions 192

Russian language code 197

Ssales contact, Wise Solutions 11sample script

dialog built into 179Samples directory 175Save Changes and Exit 165, 165saving installation automatically 23scheduling task 173screen color requirements 54Screen page 49screen resolution requirements 54script

adding action to 67basic concepts 78blank 72branching 184colors 24commenting out lines 66comments 125conditional statement for

component 32connection line 66converting 13debugging 75, 75duplicate files in 68editing 65, 67, 68event script, See event scriptexplained 81file copy 81file name 175finding text in 67include script, See include script

initialization 81line number 66mainline 64naming 64opening multiple 66performing calculation with 178placing new lines 24referencing compiler variable 30replacing text in 68saving 65saving to text file 66sections 81selecting for editing 64, 65stand-alone 176testing 17tracking 175user input 81

script actions 83Also see actions by namecolors for 64

script sampledocumentation 175missing file message 176opening 175REM statement 175troubleshooting 175, 176using 175

scripting dialog 180Search for File 126Search.wse 178Select Components 126self-register files 39, 99, 117Self-Register OCXs/DLLs 127self-repair

about 19application 20, 39, 117automatic 20, 39, 117file 20, 39, 117registry value 49, 107turning on 53, 101using 20, 39, 117

serial numbergetting from user 111specifying 44

server, Internet 58, 183service

adding 50, 100checking 96controlling behavior 50, 100creating 50, 100dependency 51, 100group 51, 100settings 50, 100starting 51, 101starting, stopping 130

service pack number, getting 113Services page 50Set Control Attributes 127Set Control Text 128

Set Current Control 128Set File Attributes 128Set Files/Buffers 129Set Variable 129Set Windows Installer Property 130Setup Editor

about 16, 63actions list 64actions, customizing list 69creating action 70defined 13line color 24, 64navigating to 13relation to Installation Expert 63Setup Editor window 16working with 63

setup program, changing 30Setup.EXE

command line options 199shared .DLL 39, 39, 99, 117shared directory for user-defined action 24, 70shared file

keeping track of 39shell execute 109shell link 51, 101short 90short pointer 90shortcut

adding 51creating, editing 101editing 52in subfolders 177installation hierarchy 177

Shortcuts page 51silent compile 199silent installation

from command line 200reboot message 29

silent uninstall 200single installation file 17, 44size of file, getting 113Skipdialog.wse 181Slovak language code 197smart create 24SmartPatch 40, 118SmartPatch page 53SMS

installation 44opening an SMS installation 15

sound support requirements 54source directory 18source file

changing location 18relative path 19UNC path 18

209

Index

space, checking 94Spanish language code 197splash screen 46stand-alone script 176Standard tab 64Start menu 51, 101, 147start WiseScript Editor 14Start/Stop Service 130STARTMENUDIR 193STARTUPDIR 194static control 139, 148status MIF file 44string

buffer 91parsing 120, 178pointer 90

structurepassing structure example 91passing to DLL 91

Subcomp.wse 181, 181, 182Subfolders.wse 177support, Wise 10

newsgroups 10online support 10

Swedish language code 197SYS 33, 192SYS32 192system information

getting 112obtaining with sample scripts 184

system requirementschecking 93operating system 54screen color 54screen resolution 54sound support 54specifying 54

System Requirements page 54system requirements, Wise product

Refer to Getting Started Guidesystem restore (Windows Me) 29System Search page 55System.ini

adding device 33System.ini, adding device 87System32

installing files 188replacing files 188

Systems Management ServerSee SMS

Ttab order in dialog 153tabs in Setup Editor 65technical support, Wise 10

newsgroups 10

online support 10Temp 113TEMP variable 192template

for creating installations 14for installation 14

temporary filedirectory 30

temporary filename, getting 113testing installation 17, 75

from command line 200text

adding to billboards 166manipulating 120, 178prompting for 122reading from file 124splitting into variables 178updating in file 124

text control 140text file

changing 177displaying in dialog 104editing 115manipulating 177

text in scriptreplacing 68searching 67

Textfile.wse 177title of installation 45TLB, self-registering 99, 117Tools tab 14training 11translation

See languagetroubleshooting

dialog 155installations 186

TrueType font 40, 125TTF file 40, 125Turkish language code 197tutorial

Refer to Getting Started Guide

UUcase$ 195Ucase$() 179UNC path

converting to 18pathname, getting 113

underscore in compiler variable 80undo page entry 15uninstal.wse 65uninstall

Also see uninstallerinitiating repair 19repair option 57, 60

Uninstall page 57UNINSTALL_LANG 192UNINSTALL_PATH 192uninstaller

adding command 57customizing 57customizing with log file 119deleting files 57deleting registry keys 57executing programs 58logged installation 42using installation log 85

uninstaller dialog, text for 23unwise.exe 20, 57, 200unwise32.exe 200upgrading 53, 55uppercase, converting 129, 179URL check 94Url.wse 183user-defined action

about 70blank script for 72changing parameter 70creating 70, 70dialog for 72in actions list 71interacting with developer 72parameters for action 72shared directory 24, 70testing 73tutorial 71

Vvalues file 130variable

about 79automatic runtime 190compiler 80, 190filling from file 130incrementing, decrementing 129list of 190runtime 80, 192setting value 129standard 190

VER_CHECK_TYPE 194Verisign 34version checking 24, 39, 99, 117version number, getting 112volume label, getting 113VXD 33

WWAV, playing during installation 120Web page, launching from installer 183Web transactions 183WebDeploy

distributing 60

210

Index

process overview 60using through proxy 183

WebDeploy page 58Welcome dialog 33While Statement

beginning 131ending 108

WIN 192Win16 SDK 91Win32 System Directory 131Win32s version, getting 113window background 49Windows

logon name, getting 113version, getting 112

Windows Installer condition, evaluate 108Windows Installer property

getting 114setting 130

Windows language code 197Windows service

adding 50, 100checking 96controlling behavior 50, 100creating 50, 100starting, stopping 130

WinSock 59, 94Wise include script

See include scriptWise Installation System script actions 83Wise scripting language 83Wise Solutions

consulting 10sales contact 11technical support 10training 11

WISE_ERROR_RTN 109, 194Wise32.EXE, run from command 199

WiseScriptactions 83adding to installation 16

WiseScript Editorlaunching 14

wizard dialogchanging image 155disabling radio button 156enabling radio button 156for installation 33

Wizard Loopaction 131adding dialog 102

word 90word pointer 90WSE 175

ZZAP file, creating 26ZIP format, compatible with 29

211


Recommended