wisescript package editor reference -...

268
WiseScript™ Package Editor Reference

Upload: nguyenkiet

Post on 11-Apr-2018

243 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript™ Package Editor Reference

Page 2: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
Legal NoticeThe software described in this document is furnished under a license agreement and may be used only in accordance with the terms of the agreement.

WiseScript™ Package Editor (Wise Package Studio® 7.0 SP3)

Copyright © 1994-2008 Symantec Corporation. All rights reserved.

Symantec, the Symantec Logo, Altiris, and any Altiris and Symantec trademarks used in the product are trademarks or registered trademarks of Symantec Corporation or its affiliates in the U.S. and other countries. Other names may be trademarks of their respective owners.

The product described in this document is distributed under licenses restricting its use, copying, distribution, and decompilation/reverse engineering. No part of this document may be reproduced in any form by any means without prior written authorization of Symantec Corporation and its licensors, if any.

THE DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. SYMANTEC CORPORATION SHALL NOT BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING, PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE INFORMATION CONTAINED IN THIS DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE.

The Licensed Software and Documentation are deemed to be commercial computer software as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19 “Commercial Computer Software - Restricted Rights” and DFARS 227.7202, “Rights in Commercial Computer Software or Commercial Computer Software Documentation”, as applicable, and any successor regulations. Any use, modification, reproduction release, performance, display or disclosure of the Licensed Software and Documentation by the U.S. Government shall be solely in accordance with the terms of this Agreement.

ConflictManager® is protected by U.S. Patent No. 7,028,019.

Symantec Corporation20330 Stevens Creek Blvd.Cupertino, CA 95014http://www.symantec.com

Altiris, Inc.47911 Halyard Dr.Plymouth, MI 48170http://www.altiris.com

WiseScript Package Editor Reference 2

Page 3: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Technical Support Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Chapter 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11About WiseScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11WiseScript Benefits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Starting the Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Opening a Microsoft SMS Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15The Product Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Using WiseScripts in a Windows Installer Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Compiling, Testing, and Running a WiseScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Creating a Portable Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Chapter 2: Setting Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19How to Customize Your Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Creating and Editing Installation Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Customizing Installation Expert Page Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Editing Installation Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Setting Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Downloading Application Runtimes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Chapter 3: Installation Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Changing Source Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Converting to UNC-Based Source File Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Converting to Relative Source File Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Using Self-Repair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Language Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Processes for Adding Language Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Distributing an Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Chapter 4: Creating WiseScript Installations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33About Installation Expert. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Using Installation Expert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34About the Project Settings View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Active Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Add/Remove Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Autoexec.bat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Specifying How to Add Commands to AUTOEXEC.BAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Billboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Build Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41CAB Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Compiler Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Config.sys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

WiseScript Package Editor Reference 3

Page 4: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
Digital Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49File Associations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Editing File Association Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Adding Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Adding Contents of Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Specifying Installation File Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56General Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57INI Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Editing INI File Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Updating an Existing .INI File on the Destination Computer . . . . . . . . . . . . . . . . . . . . . . . . . . 59

Installation Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Languages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61Microsoft SMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61ODBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Online Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Password. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Product Details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Progress Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

Creating or Editing Registry Key Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66Configuring Registry Key Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

Runtimes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

Configuring Service Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Editing Shortcut Details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74SmartPatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77System Search. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

Searching for Files or Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Searching for INI Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Searching for Registry Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

Uninstall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Adding Additional Commands for the Uninstaller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

WebDeploy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83The WebDeploy Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Creating a WebDeploy Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Uploading a WebDeploy Installation to the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

WiseUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

Chapter 5: Using WiseUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87About WiseUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87The WiseUpdate Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Using WiseUpdate in an Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

Configuring the WiseUpdate Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89About the WiseUpdate Update File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Uploading WiseUpdate Files With an FTP Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Testing WiseUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Options for Running WiseUpdate Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93WiseUpdate Tips. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

WiseScript Package Editor Reference 4

Page 5: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
Troubleshooting WiseUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

Chapter 6: Using Script Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96About Script Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96The Script Editor Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

Customizing the List of Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Types of Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Adding an Action to a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Editing Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

Finding and Replacing Text in a Script. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Checking for Duplicate Files in Include Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

About User-Defined Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103Creating a User-Defined Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Creating a User-Defined Action: Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

Using the Debug Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Building a Debug Version. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

Basic Scripting Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Conditions and Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Variables and Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112Compiler Variables and Run-time Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Anatomy of an Installation Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114About Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

Chapter 7: WiseScript Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116About WiseScript Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119About SVS Script Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Activate SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121Add Directory to PATH. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121Add File to SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121Add Text to INSTALL.LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122Add to AUTOEXEC.BAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Add to CONFIG.SYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Add to SYSTEM.INI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125Browse for Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Call DLL Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

DLL Parameter Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Passing Complex Structures to a .DLL: An Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

Capture Application to SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Change SVS Layer GUID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Check Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Check Disk Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Check HTTP Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135Check If File/Dir Exists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Check In-use File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137Check Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137Compiler Variable Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Config ODBC Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139Copy Local File(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139Create Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142Create Directory in SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142Create Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143Create Shortcut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144Create Shortcut in SVS Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145Create SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

WiseScript Package Editor Reference 5

Page 6: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
Create Virtual Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147Custom Billboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147Custom Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147Deactivate SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147Delete File from SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148Delete File(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148Delete SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149Display Billboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149Display Message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151Display Progress Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151Display Text File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152Edit INI File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152Edit Registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

Registry Key Settings Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154Edit Registry for SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156Else Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157ElseIf Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157End Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158Evaluate Windows Installer Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158Execute Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158Execute VBScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

Editing a VBScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160Debugging a VBScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161VBScript Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162Calling a COM Object in a VBScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

Exit Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164Export SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164Find File in Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165Find First SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166Find Next SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166Find SVS Layer GUID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166Get Environment Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Get Name/Serial Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Get Registry Key Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168Get SVS Layer Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168Get System Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169Get Temporary Filename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171Get Windows Installer Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172Halt Compilation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172If Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172Import SVS Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173Include Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174Initialize SVS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174Insert Line Into Text File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175Install File(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176Install SVS Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178Install WiseUpdate Client. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179About Windows Mobile Installations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

Process for Adding Mobile Device Support to a WiseScript . . . . . . . . . . . . . . . . . . . . . . . . . . 181Install Windows Mobile Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

Modify Component Size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182Open/Close Install.log. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182Parse String. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183Pause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

WiseScript Package Editor Reference 6

Page 7: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
Play Multimedia File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184Post to HTTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185Prompt for Filename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185Prompt for Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186Radio Button Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187Read INI Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187Read/Update Text File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188Read/Write Binary File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189Reboot System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189Register Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190Remark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190Remove SVS Exclude Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190Rename File/Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191Rename File or Directory in SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191Rename SVS Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192Search for File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193Self-Register OCXs/DLLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193Set Activate SVS Layer on Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194Set Control Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194Set Control Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195Set Current Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195Set File Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196Set Files/Buffers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196Set SVS Exclude Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197Set Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197Set Web Permissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198Set Windows Installer Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199Start/Stop Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199While Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200Win32 System Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201Wizard Loop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

Chapter 8: Creating Custom Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202About Dialog Boxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202About the Custom Dialog Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

Adding a Dialog Box to the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203Editing Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204Editing Dialog Box Templates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204Setting Dialog Box Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

About Dialog Box Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206Adding and Editing Dialog Box Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

Adding Check Box Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207Adding Combo Box Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208Adding Edit Text Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210Adding Graphic Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212Adding Group Box Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213Adding Hot Text Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213Adding List Box Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215Adding Play AVI Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217Adding Push Button Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217Adding Radio Button Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219Adding Rectangle Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220Adding Text Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221Specifying Execute Program Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

WiseScript Package Editor Reference 7

Page 8: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
Aligning and Spacing Dialog Box Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223Setting Tab Order of Dialog Box Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

Solutions for Dialog Box Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225Changing the Default Graphic on Wizard Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225Disabling the Appending of the Program Files Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . 226Disabling the Directory Already Exists Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226Keeping Disabled Controls From Reactivating. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

About Custom Dialog Box Sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227Creating a Dialog Box Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227Configuring Dialog Box Set Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228

Creating a Custom Dialog Box Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228Dialog Box Script Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229Dialog Box Script Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

Chapter 9: Creating Custom Billboards. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231About Billboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231Accessing the Custom Billboard Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231About the Custom Billboard Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232Opening and Saving Custom Billboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233Adding Objects to a Billboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

Editing Billboard Text Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234Editing Billboard Line Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234Editing Billboard Rectangles and Ellipses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235Editing Billboard Polygon Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235Editing Billboard Bitmap Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236Resizing, Moving, and Aligning Billboard Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237Setting Billboard Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

Chapter 10: Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239About WiseScript Package Editor Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239ApplicationWatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239Import Visual Basic Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

Chapter 11: Troubleshooting WiseScripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243About Troubleshooting a WiseScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243Using the Installation Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243File Replacement Problems in System32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244

Chapter 12: Quick Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245Automatic Compiler Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245Automatic Run-time Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246Run-time Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248SVS Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250Expression Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253Windows Language Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254Command-Line Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255

WiseScript Command-Line Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256WiseScript Installations Command-Line Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257Uninstall Command-Line Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259

WiseScript Package Editor Reference 8

Page 9: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Preface

This chapter includes the following topics:

Product Documentation on page 9

Technical Support Resources on page 10

Product DocumentationThis 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 this product.

NoteThis documentation covers both WiseScript Package Editor and WiseScript Editor. WiseScript Editor contains the same scripting interface as WiseScript Package Editor, but it does not contain the Installation Expert interface or other installation development tools. Therefore, some of the information in this document does not apply to WiseScript Editor.

Online Help

The online help contains detailed technical information and step-by-step instructions for performing common tasks.

Access help in the following ways:

To display context-sensitive help for the active window or dialog box, press F1.

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

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 Getting Started Guide contains system requirements and installation instructions. You can access a .PDF version of the Getting Started Guide from the Windows Start menu.

Release Notes

The product release notes cover new features, enhancements, bug fixes, and known

issues for the current version of this product. Access the release notes in the following ways:

Browse the product CD.

Select Release Notes from the Altiris program group on the Windows Start menu.

WiseScript Package Editor Reference 9

Page 10: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
Technical Support Resources

If you need help beyond what the product documentation provides, visit the Altiris Service Center, which is your complete online resource for Altiris product support. Access the Altiris Service Center from the Support section of the Altiris Web site.

Use the Altiris Service Center to access the following Altiris support tools and services.

Before you contact technical support, obtain the following information:

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.

Knowledgebase Provides a central repository for technical information at Altiris. Articles are reviewed and refined by Altiris personnel and provide information about past problems and their resolutions.

Support forums Lets Altiris users collaborate and share information. The support forums are monitored by experienced customers, Altiris partners and Altiris personnel.

License Management Portal

Manages and provides access to Altiris product licenses.

Altiris Support Helpdesk Lets Altiris premium and enterprise support customers use a Web-based tool to log new support incidents, update existing incidents and communicate with Altiris support personnel.

User groups Provide a place for Altiris users to discuss IT management projects, learn best practices, discover the latest product features, and network with other users.

WiseScript Package Editor Reference 10

Page 11: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Chapter 1Introduction

This chapter includes the following topics:

About WiseScript on page 11

WiseScript Benefits on page 12

Getting Started on page 13

Starting the Software on page 13

The Product Interface on page 15

Using WiseScripts in a Windows Installer Installation on page 16

Compiling, Testing, and Running a WiseScript on page 17

About WiseScriptWiseScript Package Editor

WiseScript Package Editor is an application development tool for creating and editing installation packages based on the WiseScript™ scripting language. Use WiseScript Package Editor to edit and refine installations that you have imported from legacy installations, or that you have recreated with SetupCapture or ApplicationWatch.

The Installation Expert view in WiseScript Package Editor lets you create and edit basic installations and provides an easy-to-use, task-oriented user interface to set the most common installation tasks. Each page of Installation Expert lets you configure a specific aspect of your installation.

For advanced customization, you can edit the installation script in Script Editor, which provides a powerful and easy-to-use scripting environment based on the WiseScript™ scripting language. You create and edit lines in the script by setting options in dialog boxes, which decreases the chances of syntax or other errors.

WiseScript Package Editor is in the Professional Edition of Wise Package Studio.

WiseScript Editor

WiseScript Editor is a WiseScript™ authoring environment that you can use to automate administrative tasks. You also can use it to create .EXEs to use as custom actions in Windows Installer installations. These custom actions can extend the capabilities of Microsoft Windows Installer and simplify installation tasks (example: parsing and arithmetic functions) that are difficult to accomplish with Windows Installer.

WiseScript Editor is embedded within Windows Installer Editor and appears when you create a custom action that calls a WiseScript.

WiseScript Editor contains the same scripting interface as WiseScript Package Editor, but it does not contain the Installation Expert interface or other installation development tools. Therefore, some of the information in this document does not apply to WiseScript Editor.

WiseScript Package Editor Reference 11

Page 12: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Introduction

WiseScript BenefitsWiseScript is a high-level scripting language that consolidates dozens or hundreds of lines of code into predefined script actions.

What Makes WiseScript Unique

Easy to learnWiseScript supports a point-and-click method of scripting. The script author is prompted for the parameters needed by each script action, so a script can be created and tested very quickly. The script is displayed in clear, English-like statements. For those who need additional flexibility and control, WiseScript provides advanced features (examples: IF blocks, WHILE loops, UI dialog boxes).

No runtime neededWiseScripts are compiled into self-contained .EXEs that do not require an agent or runtime files on the destination computer.

Compact sizeA WiseScript .EXE is small in size (about 100 KB). If a script uses any files that may not be on the destination computer, it can compress those files into the .EXE. (Example: A script that detects and removes spyware might temporarily install Kill.exe on the destination computer while the script is running.)

Built-in rollbackWiseScripts can be rolled back after they are executed on the destination computer.

User interfaceWiseScripts can incorporate any type of dialog box to either inform the end user or prompt for input.

WiseScript is powerfulIn addition to the dozens of predefined actions, WiseScripts can call VBScripts and DLL functions, making it possible to use any Windows system call.

WiseScript is fastBecause the WiseScript engine is written in C++, when you build a WiseScript, you are building a C++ program. A WiseScript executes faster than a VBScript that performs the same operation.

WiseScript is extensibleYou can streamline your scripting process by creating your own script actions for tasks that you perform frequently. To create a user-defined action, create a WiseScript .WSE (project file) and save it in the Actions subdirectory of the WiseScript product’s installation directory. Your action will be available for use in future scripts.

WiseScript Examples

In addition to creating installation packages, following are just a few of the tasks you can accomplish with WiseScript. For samples of some of these scripts, see the article Performing System Administration Tasks With WiseScripts in the Altiris Knowledgebase (Article #27374).

Move files and directories.

Modify a machine resource (example: registry key or .INI file).

Locate and delete a file and its directory (example: to remove a spyware program).

WiseScript Package Editor Reference 12

Page 13: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Introduction

Free disk space by clearing the Temp directory, the Recycle Bin, or the Internet cache.

Find the current Windows version.

Find and report system information and take action depending on the results.

Map a network drive.

Create, edit, or manage virtual software layers on computers that have the SVS Driver (Altiris Software Virtualization Agent). For details, see the article Using WiseScripts to Manage and Update Virtual Software Packages in the Altiris Knowledgebase (article 27373).

Assign license numbers from a text file.

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

1. Create a new installation or WiseScript.

See Starting the Software on page 13.

2. (WiseScript Package Editor only) Set options on the Installation Expert pages to create basic installation functionality.

See About Installation Expert on page 34.

3. Edit the script in Script Editor to create advanced installation functionality.

See About Script Editor on page 96 and About WiseScript Actions on page 119.

4. Create or customize dialog boxes.

See About Dialog Boxes on page 202.

5. Test and debug the installation.

See Compiling, Testing, and Running a WiseScript on page 17 and Using the Debug Commands on page 108.

6. (WiseScript Package Editor only) Explore options for outputting the installation .EXE file and prepare it for distribution.

See Media on page 61 and WebDeploy on page 83.

7. To create a compiled .EXE, click Compile.

See Compiling, Testing, and Running a WiseScript on page 17.

8. Use the Package Distribution tool to distribute the installation.

See Package Distribution in the Wise Package Studio Help.

Starting the SoftwareWiseScript Editor

The WiseScript Editor interface is embedded within MSI Script in Windows Installer Editor. This lets you create WiseScripts for Windows Installer custom actions.

In MSI Script, add or double-click a custom action that runs a WiseScript. On the Details tab of the Run WiseScript dialog box, click Options.

WiseScript Package Editor Reference 13

Page 14: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Introduction

To open a blank script, select Create New WiseScript from the button menu.

To open an existing script, select Edit Existing WiseScript from the button menu.

You can begin to add or edit script actions. For information on adding script actions, see Adding an Action to a Script on page 101. For a description of each script action, see About WiseScript Actions on page 119.

You also can access WiseScript Editor from the Tools tab or Projects tab in Workbench. This lets you create WiseScripts that can be used alone or within a Windows Installer custom action.

WiseScript Package Editor

WiseScript Package Editor is an application development tool for creating and editing installation packages based on the WiseScript™ scripting language.

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 Package 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 Package Editor.

2. Select File menu > New.

The New Installation File dialog box appears.

3. Select one of the following:

Empty ProjectCreate an installation project file based on the Empty Project.wse installation template. It contains a default script in which the basic elements of an installation are already configured.

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

Blank ScriptBuild an installation or custom .EXE entirely in Script Editor. If you select this, some pages in Installation Expert are not available.

See Switching Between Installation Expert and Script Editor on page 15.

4. Click OK.

The installation opens, and you can edit it in Installation Expert or Script Editor.

See also:

Getting StartedAbout Installation Expert on page 34About Script Editor on page 96

WiseScript Package Editor Reference 14

Page 15: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Introduction

Opening a Microsoft SMS Installation

WiseScript Package Editor only

You can open Microsoft SMS files (.IPF) and edit them just as you edit .WSE files. For information about SMS, search for “SMS” at www.microsoft.com.

1. Select File menu > Open.

The Open dialog box appears.

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

3. Specify the .IPF file.

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

See also:

Starting the Software on page 13

The Product InterfaceWiseScript Package Editor has the following views:

Project Settings(WiseScript Editor only) The Project Settings view contains several pages that provide information that is required by certain script actions.

See About the Project Settings View on page 36.

Installation Expert(WiseScript Package Editor only) Installation Expert lets you build an installation by pointing and clicking to fill out options.

See Using Installation Expert on page 34.

Script EditorScript Editor provides a powerful and easy-to-use scripting environment based on the WiseScript™ scripting language.

See About Script Editor on page 96.

Script Editor lets you develop more complex installations. Also use it to create powerful .EXEs to use as custom actions in a Windows Installer installation.

To navigate between views, click the navigation tabs at the lower left of the main window.

The Installation Expert and Script Editor views are interrelated. As you build an installation using Installation Expert, a script is also created in Script 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.

Switching Between Installation Expert and Script Editor

When you switch between the Installation Expert and Script Editor views, you might see the following messages:

WiseScript Package Editor Reference 15

Page 16: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Introduction

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 in Script Editor, then try to switch to Installation Expert. Click No to preserve the custom script.

You are trying to open an installation in Installation Expert, which is not compatible with some custom scripts, so the script will be opened in Script Editor instead.

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 Script Editor, or press Ctrl+Z. When Installation Expert opens, only the pages that do not affect the script appear.

Additional Interfaces

The Tools menu offers specialized tools with which you can start an installation script.

See About WiseScript Package Editor Tools on page 239.

The Compile, Test, Debug, and Run buttons let you test and compile the installation.

See Compiling, Testing, and Running a WiseScript on page 17.

Using WiseScripts in a Windows Installer Installation

Windows Installer Editor compiles installations into Windows Installer (.MSI) format. Therefore, it can provide only those capabilities that are provided by the Windows Installer SDK environment. WiseScript Package Editor provides an additional authoring environment that has a larger selection of more versatile script actions than those provided by Windows Installer products.

You can use WiseScript-based .EXEs in the same way that you use functions in .DLLs. You write the main installation in a Windows Installer product, but when you need to perform an advanced function, you can create a WiseScript .EXE and call it with a custom action in the Windows Installer installation.

Creating a WiseScript .EXE has some advantages over writing a custom program to create an .EXE:

WiseScript Editor uses predefined, easy-to-use script actions to accomplish common installation tasks.

You can pass Windows Installer properties in and out of the WiseScript .EXE.

See Get Windows Installer Property on page 172 and Set Windows Installer Property on page 199.

You can evaluate Windows Installer conditions within a WiseScript .EXE.

See Evaluate Windows Installer Condition on page 158.

The disadvantage of using a WiseScript .EXE is that Windows Installer does not know about or manage system changes performed by a WiseScript .EXE (example: installation of a file).

See Uninstalling Changes Made by a WiseScript in the Windows Installer Editor Help.

If you use a WiseScript .EXE in a Windows Installer installation that will run on Windows Vista, you must specify a manifest file that indicates the run level for the .EXE.

WiseScript Package Editor Reference 16

Page 17: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Introduction

See Build Settings on page 41.

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

NoteIn WiseScript Package Editor, you also can use the Script Editor debugging functions to test the script.

See Using the Debug Commands on page 108.

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 installation .EXE that you distribute to end users. If any files are absent or not readable, error messages appear when compiling.

In WiseScript Package Editor, the installation is saved each time you compile unless you mark the Prompt to Save check box 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 tries to open ReadMe, the second script line fails because the ReadMe is not in the Temp directory.

RunClick Run to execute the installation just as it would execute on the destination computer. Files are installed on your computer and your system is modified.

Creating a Portable ProjectYou can create a portable WiseScript project that contains all of the files in a WiseScript including its source files. A portable project is a self-extracting .EXE. Use it to:

Easily move WiseScript projects from one computer to another without having to copy source files.

Share WiseScript projects with others, who can then open and edit your WiseScript with all of its source files.

To create a portable project

1. Select File menu > Create Project Package.

2. Complete the Create Project Package dialog box:

Project NameEnter a name for the portable project. When the portable project .EXE is run, it extracts the project’s files and puts them in a directory with this name.

WiseScript Package Editor Reference 17

Page 18: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Introduction

Add default scripts that are included in this WiseScriptMark this to add any default WiseScripts or VBScripts that are included in the WiseScript. These default scripts are in the WiseScript Editor\Actions or WiseScript Editor\Include directories. If you have modified these scripts and they are included in the WiseScript, then you should include them in the project

Password protect the project packageTo add password protection to the project, mark this option and then enter and confirm the password.

3. Click OK.

The Save As dialog box appears.

4. Specify the file name and location for the portable WiseScript project and click Save.

WiseScript Package Editor Reference 18

Page 19: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Chapter 2Setting Up

This chapter includes the following topics:

How to Customize Your Development Environment on page 19

Creating and Editing Installation Templates on page 20

Customizing Installation Expert Page Groups on page 21

Editing Installation Messages on page 22

Setting Preferences on page 23

Downloading Application Runtimes on page 24

How to Customize Your Development EnvironmentWiseScript Package Editor only

You can do the following to customize your development environment:

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

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

See Customizing Installation Expert Page Groups on page 21.

Change prompts and error messages displayed by the installation.

See Editing Installation Messages on page 22.

Set preferences.

See Setting Preferences on page 23.

Set the actions list in Script Editor to display only those actions you use most frequently and add your own actions to the list.

See Customizing the List of Actions on page 99 and Creating a User-Defined Action on page 104.

Change the dialog boxes that display during installation by editing default dialog boxes.

See Editing Dialog Box Templates on page 204.

NoteThis documentation covers both WiseScript Package Editor and WiseScript Editor. WiseScript Editor contains the same scripting interface as WiseScript Package Editor, but it does not contain the Installation Expert interface or other installation development tools. Therefore, some of the information in this document does not apply to WiseScript Editor.

WiseScript Package Editor Reference 19

Page 20: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Setting Up

Creating and Editing Installation TemplatesWiseScript Package Editor only

When you create a new installation, it gets its configuration from a template file. Templates contain logical defaults and commonly used settings. Some template files are predefined and appear when you create a new installation. You also can create your own templates.

Examples:

If all your installations have the same system configuration requirements and document file extensions, you can create a template with these changes preconfigured.

If your installations require a language that is not pre-translated, you can add translated custom dialog boxes to a template to make the dialog box translations available to future installations.

WarningEditing predefined templates is not recommended, because they might be overwritten during upgrades. Instead, save customized templates with different names, or make copies of the predefined templates and edit the copies.

Template Location

Templates are stored in the WiseScript Editor\Template subdirectory of this product’s installation directory.

To create a custom template

1. Select File menu > New.

The New Installation File dialog box appears.

2. Select Empty Project and click OK.

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

4. Save the file:

a. Select File menu > Save As.

b. Name the file and save it in the Template directory as a .WSE.

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

The New Installation File dialog box appears and includes the template you just created. If the New Installation File dialog box does not contain the new template, verify that you saved it in the Templates directory.

6. Select the template you just created and click OK.

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

See also:

Language Support on page 29

WiseScript Package Editor Reference 20

Page 21: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Setting Up

Customizing Installation Expert Page GroupsWiseScript Package Editor only

By 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:

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 Script Editor > Edit menu > Installation Properties.

You can add 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.

To add a page group

1. Select Pages menu > Customize.

The Customize Pages dialog box appears.

2. From Name, select <new>.

3. On the dialog box that appears, specify a name for the 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 box appears.

Buttons to edit page groups and pages are unavailable when a predefined page view is selected in Name.

These pages appear under the group selected in Page Groups.

The page groups appear on the left side of Installation Expert.

These pages appear under the group selected in Page Groups.

WiseScript Package Editor Reference 21

Page 22: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Setting Up

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.

Editing Installation MessagesWiseScript Package Editor only

You can edit the prompts and error messages that are displayed by an installation.

Installation messages are stored in wise.ini, which is in the WiseScript Editor subdirectory of this product’s installation directory. Changes that you make to installation messages become available to all installations. To back up the installation messages before editing them, back up wise.ini.

When you add multiple-language support to an installation, you can edit or add installation messages in languages other than English. Messages are provided for the following pre-translated languages: English, French, German, Italian, and Spanish. To add support for any other language, obtain translations of the message text and enter the translated strings on the Installer Messages dialog box.

For information on adding language support to an installation, see Language Support on page 29.

To edit installation messages

1. Select Edit menu > Installer Messages.

The Installer Messages dialog box appears.

2. Complete the dialog box:

Language NameSelect the language for which you will edit messages.

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

Language CodeA three-letter code that matches the Windows-defined language to WiseScript Package Editor.

See Windows Language Codes on page 254.

MessagesSelect the message to edit. You can edit as many of the messages as necessary.

Message TextEnter or edit the message.

If you select a language that is not predefined, the messages are in English.

Select Language DialogWhen end users run an installation that supports multiple languages, the Select Language dialog box appears first, where they select a language. Changes that you make in these fields apply to all languages.

WiseScript Package Editor Reference 22

Page 23: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Setting Up

Dialog TitleThe title of the Select Language dialog box.

Dialog TextThis text appears on the Select Language dialog box. If the installation supports multiple languages, enter instructions in all supported languages.

Setting PreferencesWiseScript Package Editor only

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

1. Select Edit menu > Preferences.

2. Complete the Preferences dialog box:

Prompt to SaveMark this to have Script Editor prompt you to save the installation script each time you build a new installation .EXE. If you do not mark this check box, 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 in which the WiseScript Editor installation 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 installation 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 Script 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 Package Editor. If items you select from list boxes are continually misinterpreted, mark this check box to eliminate list box problems.

Create Backup Copy During SaveMark this to create a new backup file every time you save. The backup file name consists of 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 option because a new file is created every time you save.

This option can also be set from Wise Package Studio Preferences; use this check box to override the Wise Package Studio setting.

WiseScript Package Editor Reference 23

Page 24: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Setting Up

Show Tabs for Wise Include ScriptsMark this to show tabs for include scripts in Script Editor.

Color SelectionSelect the colors for the types of script actions recognized by Script Editor. Select the type of script action and 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 during compile. This slows compiling by about 50%. If this is cleared, user input is ignored during compile.

Smart CreateMark this to compile the installation .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 check box only when testing and clear it for the final build.

Fast CreateMark this to speed compiling by copying the compressed version of a file from the previous version of the installation .EXE to the new one. If the size or date of a file has changed, it is recompressed. Mark this check box only when testing and clear it for the final build.

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

Shared DirectoryNormally, user-defined actions are stored in the WiseScript Package Editor Actions directory. Use this field to specify an additional directory to hold user-defined actions. This can be a local or shared network directory. The actions stored in this directory appear in the Actions list in Script Editor in addition to the ones in the Actions 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. 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.

Downloading Application RuntimesWiseScript Package Editor only

The Download Runtimes wizard provides an easy way to get runtime files or runtime installations that you plan to deploy with your application. You can also use this wizard to download updates to runtimes you currently have. The runtime versions are free, and you can download as many as you need.

WiseScript Package Editor Reference 24

Page 25: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Setting Up

If you need to go through a firewall or proxy server to get to the Internet, the Download Runtimes wizard uses your browser’s proxy settings. To change your Internet connection settings, refer to your browser’s documentation.

To download application runtimes

1. Connect to the Internet.

2. Select Help menu > Download Runtimes.

The Check for Updates page appears.

3. Click Next on the Check for Updates page.

The Select Runtimes page appears. This lists the runtimes you currently have installed, and lists all the runtimes that are available for downloading.

4. On the Select Runtime page, mark the check box for each runtime you want to download. You can click Select All to select all the runtimes, or click Clear All to clear your selections. As you mark check boxes, the Download Size field displays the total size of the files you selected.

5. When you finish selecting runtimes, click Next.

The Start Update Download page appears.

6. Click Next to begin the download.

The selected runtime updates are downloaded from the Internet and installed in the appropriate Wise runtime directory. When the download is finished, the Update Complete page appears.

7. Click Finish.

WiseScript Package Editor Reference 25

Page 26: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Chapter 3Installation Management

This chapter includes the following topics:

Changing Source Directories on page 26

Converting to UNC-Based Source File Paths on page 27

Converting to Relative Source File Paths on page 27

Using Self-Repair on page 28

Language Support on page 29

Distributing an Installation on page 32

Changing Source DirectoriesNoteThis documentation covers both WiseScript Package Editor and WiseScript Editor. WiseScript Editor contains the same scripting interface as WiseScript Package Editor, but it does not contain the Installation Expert interface or other installation development tools. Therefore, some of the information in this document does not apply to WiseScript Editor.

WiseScript Package Editor only

As you work on an installation, paths to files in the installation can become note valid if you:

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

Move the installation file itself from your computer to another computer.

Use relative paths and then move the installation file.

Rename a directory.

If the paths are not valid, then during compile, error messages warn that files cannot be opened. Rather than adding the files again, you can specify the new source directories for these files.

1. Select Edit menu > Source Directories.

The Change Source Directories dialog box appears and lists all the directories referenced in the script.

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.

WiseScript Package Editor Reference 26

Page 27: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Installation Management

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 that contains 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 the subdirectories of the selected directory.

5. When you finish editing directories, click OK.

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

Converting to UNC-Based Source File PathsWiseScript Package Editor only

You can convert the mapped drive paths of source files to UNC-based (Uniform Naming Convention) paths. This helps prevent compile errors when installation source files are on a central file server.

Example: If you add files to a script from your Y:\ drive, which is mapped to a file server, the paths in the installation begin with Y:\. If a co-worker opens and compiles the script on a computer that doesn’t have its Y:\ drive mapped to the same file server, the compile 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 the script without encountering errors.Instead of a path such as Y:\Application.ini, a file has a fully qualified path such as \\Server\Development\Application\Application.ini.

1. Select Edit menu > Source Directories.

The Change Source Directories dialog box appears and lists all the directories referenced in the script.

2. From Type, select Change source paths to UNC paths.

3. Click OK. This action cannot be undone.

A one-time conversion of all the network paths in a script is performed. Paths to files that are on local drives are not converted. All network files you add subsequently are converted to UNC-based paths.

If you later change Type to Do not modify source paths, the converted paths stay converted, but new files you add do not have UNC-based paths.

Converting to Relative Source File PathsWiseScript Package Editor only

You can convert the paths of source files to relative paths. You might do this to keep all your source files in a central version and source control system. (Example: Microsoft Visual SourceSafe. In Microsoft Visual SourceSafe, if you copy the installation files to a different directory each time you do a Get, you can use this feature to ensure that the paths are always valid, even though the directory structure changes.)

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

WiseScript Package Editor Reference 27

Page 28: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Installation Management

Example: If the path to the .WSI is C:\Development\Application.wsi, and you add the file C:\Program Files\Application.ini, the relative path of Application.ini is ..\Program Files\Application.ini.

1. Select Edit menu > Source Directories.

The Change Source Directories dialog box appears and lists all the directories referenced in the script.

2. From Type, select Change source paths to relative paths.

3. Click OK. This action cannot be undone.

A one-time conversion of the paths in the script is performed. Paths to files that are not on the same drive as the script file are not converted, because they cannot be written as relative paths. All files you add subsequently are converted to relative paths.

If you later change Type to Do not modify source paths, the converted paths stay converted, but new files you add do not have relative paths.

Using Self-RepairWiseScript Package Editor only

You can enable an application to repair itself. You can implement repair in either of two ways:

Through the uninstall wizard, which is included in every installation you create.

Through automatic self-repair, which 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 started by means of its shortcut, a self-repair process is started.

Self-repair 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 Run by the End User

Every installation you create contains a repair option that is available to the end user as part of the uninstall wizard.

To run this repair option, the end user selects the application in the Add/Remove Programs Control Panel and selects 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-Repair

You 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 start it. Whenever the end user starts the application by means of 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.

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

WiseScript Package Editor Reference 28

Page 29: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Installation Management

These files and registry keys are checked when the application starts, so limit the number of items to prevent the start time from increasing.

2. Designate each of these files and registry entries for self-repair as follows:

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 box, mark Repair application if this file is missing.

Registry entry: Do either of the following:

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 box that appears.

In Script 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. 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 Script Editor. On the Shortcut Details dialog box, mark Check self-repair items when this shortcut is opened.

See Shortcuts on page 74 or Create Shortcut on page 144.

When the application is installed, the list of required items is written to a special registry key. When the end user clicks the shortcut that runs the application, the shortcut 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 does not see this, and if the number of required items is few, the extra time to start 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 at startup.

Language SupportWiseScript Package Editor only

You can add language support to an installation, which provides the text in the installation’s user interface elements in a different language. It does not translate your application or any user interface elements that you customize in the installation.

You add language support on the Languages page. When an end user runs an installation that supports multiple languages, the Select Language dialog box appears first, and prompts the user to select a language. Subsequent installation messages and dialog boxes appear in the selected language.

To add language support, you use the Languages page, the Installer Messages dialog box, and custom dialog boxes.

See Processes for Adding Language Support on page 30.

What Languages Are Supported?

You can add support for as many as 15 different languages to a single installation. WiseScript Package Editor contains the following pre-translated languages in addition to English: French, German, Italian, Spanish. If the language you need is not one of the

WiseScript Package Editor Reference 29

Page 30: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Installation Management

pre-translated languages, you can add it to the Languages page and add translated text for that language. Then you can add support for the new language to the installation.

Example: You want to translate an installation into Swiss French. However, that language is not one of the pre-translated languages. You can add Swiss French to the Languages page and add Swiss French text strings to the installation. Then, you can compile an installation that displays Swiss French on all installation messages and dialog boxes.

Double-Byte Languages

Some languages (example: Chinese, Japanese, and Korean) require double-byte character sets, in which each character is represented by two bytes.

WiseScript Package Editor supports double-byte languages. However, if you add support for a double-byte language, do not add any other languages. Including double-byte and 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.

Processes for Adding Language Support

WiseScript Package Editor only

You can add language support to an installation, which provides the text in the installation’s user interface elements in a different language.

Adding Language Support for a Pre-Translated Language

1. In Installation Expert > Languages page, add the language and mark its check box.

See Languages on page 60.

2. If you have added custom dialog boxes to the installation, provide translations for those dialog boxes.

See step 3 in Adding Language Support for a New Language.

3. If you have changed the text for any installation messages, provide updated translations for those messages.

See Editing Installation Messages on page 22.

Adding Language Support for a New Language

1. Use the Installer Messages dialog box to add translations of installation messages for the new language. This also adds the language to the list of languages that are available on the Languages page.

Changes that you make to installation messages become available to all installations.

See Editing Installation Messages on page 22.

2. In Installation Expert > Languages page, add the language and mark its check box.

See Languages on page 60.

3. Provide translations for dialog boxes in the installation.

a. In Script Editor, select the language from the Language drop-down list. This list is populated with the languages that are marked on the Languages page.

WiseScript Package Editor Reference 30

Page 31: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Installation Management

b. In the script, double-click the Custom Dialog action that references the dialog box you are changing. (Use Edit menu > Find to find the action quickly.)

c. Edit the dialog box text and controls, replacing the existing text with the text in the selected language.

See Editing Dialog Boxes on page 204.

d. Repeat these steps for all dialog boxes in the installation.

NoteThe dialog box name that appears in the Custom Dialog script action always appears in English. This information is not displayed to the end user.

4. Provide translations for every script line that presents text to the end user:

a. In Script Editor, select the language from the Language drop-down list. This list is populated with the languages that are marked on the Languages page.

b. In the script, double-click the script action that contains text. (Use Edit menu > Find to find the action quickly.)

c. Replace the existing text with the text in the selected language.

5. If necessary, translate the uninstall dialog boxes.

See Translating the Uninstall Dialog Boxes.

Text for the uninstall dialog boxes is stored in text files in the WiseScript Editor\Language subdirectory of this product’s installation directory. The three-letter language codes are used as the file extensions.

NoteChanges that you make to dialog boxes and script action text are added to the current installation only. To make the dialog box translations available to future installations, add them to an installation template instead of to a specific installation.

See Creating and Editing Installation Templates on page 20.

Translating the Uninstall Dialog Boxes

Text for the uninstall dialog boxes is stored in text files in the WiseScript Package Editor\Language subdirectory of this product’s installation directory.

To add text for a new language

1. Send a copy of the English file (Unwise.eng) to your translator.

2. Have the text strings translated to the new language. The translator should translate the strings in place in the same file, to ensure the returned file is formatted identically.

3. Rename the translated file, using the three-letter language code as the file extension. Example: Unwise.frs for Swiss French.

4. Place the translated file in the Languages directory.

See also:

Windows Language Codes on page 254

WiseScript Package Editor Reference 31

Page 32: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Installation Management

Distributing an InstallationWiseScript Package Editor only

When you complete and compile an installation, you can use Package Distribution to share or deploy it by:

Copying a Package to the Share Point Directory

Copying a Package to a Network Directory

Copying a Compiled Installation to an FTP Server

See these topics in the Wise Package Studio Help.

WiseScript Package Editor Reference 32

Page 33: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Chapter 4Creating WiseScript Installations

This chapter includes the following topics:

About Installation Expert on page 34

Active Directory on page 36

Add/Remove Programs on page 37

Autoexec.bat on page 38

Billboards on page 39

Build Settings on page 41

CAB Files on page 43

Compiler Variables on page 44

Components on page 45

Config.sys on page 46

Devices on page 47

Dialogs on page 48

Digital Signature on page 49

File Associations on page 50

Files on page 51

Fonts on page 56

General Information on page 57

INI Files on page 57

Installation Log on page 59

Languages on page 60

Media on page 61

Microsoft SMS on page 61

ODBC on page 62

Online Registration on page 63

Password on page 64

Product Details on page 64

Progress Bar on page 65

Registry on page 66

Runtimes on page 69

Screen on page 71

WiseScript Package Editor Reference 33

Page 34: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Services on page 72

Shortcuts on page 74

SmartPatch on page 75

System Requirements on page 77

System Search on page 78

Uninstall on page 81

WebDeploy on page 83

WiseUpdate on page 86

About Installation ExpertThe Installation Expert view in WiseScript Package Editor lets you create and edit basic

installations and provides an easy-to-use, task-oriented user interface to perform the most common installation tasks. Each page of Installation Expert lets you configure a specific aspect of your installation.

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 are arranged alphabetically.

See Using Installation Expert on page 34.

Installation Expert does not appear in the embedded WiseScript Editor interface. However, several Installation Expert pages are needed to provide support for certain WiseScript actions:

Compiler Variables

Digital Signature

General Information

These pages are provided in the Project Settings view.

See About the Project Settings View on page 36.

NoteThis documentation covers both WiseScript Package Editor and WiseScript Editor. WiseScript Editor contains the same scripting interface as WiseScript Package Editor, but it does not contain the Installation Expert interface or other installation development tools. Therefore, some of the information in this document does not apply to WiseScript Editor.

Using Installation ExpertWiseScript Package Editor only

To access Installation Expert, click Installation Expert at the bottom of the WiseScript Package Editor main window.

WiseScript Package Editor Reference 34

Page 35: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Page Groups

Pages are organized into page groups. When you select a page view, its pages are organized into page groups. Click the group name to expand or collapse its pages. Click a page name to display that page.

You can create a customized view of page groups and pages.

See Customizing Installation Expert Page Groups on page 21.

Page Area

When you click a page name in a page group, this area displays the page’s options. Each page lets you define a specific aspect of the installation. (Examples: On the Files page, you define what files are included in the installation. On the Registry page, you define what registry keys and values are created on the destination computer.) Complete only the pages that are pertinent to your particular installation, in any order. If required information is missing, an error message appears during compile.

Use on the toolbar to navigate from page to page, or click the page name in the list of pages.

To display help for the current page, press F1.

To return a page to its last saved state, select Edit menu > Reset Page.

View Navigation

Click these tabs to change views.

Page AreaPage Groups

Compile, Test, and RunView Navigation

WiseScript Package Editor Reference 35

Page 36: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Compiling and Testing

Compile, Test, Debug, and Run buttons test and compile the WiseScript.

See also:

About Installation Expert on page 34

About the Project Settings ViewWiseScript Editor only

The Project Settings view contains several pages that provide information that is required by certain script actions. (Example: The Compiler Variable If action requires a compiler variable to be defined on the Compiler Variables page.)

Project Settings is available only in WiseScript Editor.

To access Project Settings, click Project Settings at the lower left of the WiseScript Editor main window.

The Project Settings view works just like Installation Expert.

See Using Installation Expert on page 34.

Active DirectoryWiseScript Package Editor only

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

Before you complete the Active Directory page, complete the Product Details and Add/Remove pages. Some of the fields on the Active Directory page obtain their values from fields on those pages.

Select Installation Expert > Active Directory page and complete the page:

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.

Several command-line options are available.

See WiseScript Installations Command-Line Options on page 257.

WiseScript Package Editor Reference 36

Page 37: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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 Compiled package on the Distribution Method page. 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.

Add/Remove ProgramsWiseScript Package Editor only

Windows operating systems have an Add/Remove Programs or Programs and Features applet that let end users uninstall, change, or repair programs. Use the Add/Remove Programs page to enter the information necessary to support these capabilities.

Select Installation Expert > Add/Remove Programs page and complete the page:

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 box 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 Control Panel.

PublisherEnter the name of the company that makes 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.

WiseScript Package Editor Reference 37

Page 38: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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.batWiseScript Package Editor only

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

Select Installation Expert > Autoexec.bat page and complete the page:

Directory to add to PATHEnter the path of the directory to be added. To start the directory path, use a built-in run-time variable. Example: %MAINDIR% for the Application directory or %SYS% for the Windows System directory.

See Automatic Run-time Variables on page 246.

Location of new directorySpecify where in the PATH variable the directory should be added.

Path selectionSpecify which PATH statements the directory should be added to.

Commands to add to AUTOEXEC.BATEnter commands to add to the AUTOEXEC.BAT file.

To add a command line to the AUTOEXEC.BAT file, click Add and enter the command line in the dialog box. To specify how to add the command line to the AUTOEXEC.BAT file, double-click the line.

See Specifying How to Add Commands to AUTOEXEC.BAT on page 38.

See also:

Add to AUTOEXEC.BAT on page 123

Specifying How to Add Commands to AUTOEXEC.BAT

WiseScript Package Editor only

The Add Command to AUTOEXEC.BAt dialog box 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 box appears.

3. Complete the dialog box:

WiseScript Package Editor Reference 38

Page 39: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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

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

Case SensitiveMark this to match case.

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

4. Click OK.

See also:

Autoexec.bat on page 38

BillboardsWiseScript Package Editor only

Use the Billboards page to add billboard graphics to display during installation. The page lists the billboards in the order they appear during the installation. Use these graphics to inform end users of software features, to remind them to register the application, or to advertise related products.

Guidelines for Using Billboard Graphics

Billboard graphics must be .BMP (bitmap) files.

WiseScript Package Editor Reference 39

Page 40: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

All color palettes are supported. However, large color images decrease installation speed.

The destination computer must be set to display true colors in order for true color billboards to display correctly.

If you simultaneously display multiple color images that use different color palettes, the colors might not appear correctly.

To add a billboard

1. Select Installation Expert > Billboards page.

2. Click Add at the right of the page and specify the billboard graphic file.

The billboard is added to the list on the Billboards page.

3. Double-click the billboard.

The Billboard Settings dialog box appears.

4. Complete the dialog box:

PathnameSpecify the full path 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 graphics. 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 graphic is displayed. To display one graphic at a time, set this to 1. To display all graphics simultaneously, set this to 0. The oldest graphic is removed first.

Build EffectSelect a transition effect.

TransparentMark this to have pure blue (R=0, G=0, B=255) parts of the graphic become transparent.

Center Horizontal

Place at Right

Scale to ScreenMark this for the graphic to cover the same percentage of the screen regardless of screen size.

Hide Progress BarMark this to hide the progress bar during graphic display.

Center Vertical

Place at Bottom

Tile BackgroundMark this to repeat the graphic edge-to-edge to fill the entire screen.

Erase AllMark this to remove all previous graphics from the screen before displaying the new one.

WiseScript Package Editor Reference 40

Page 41: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Timed DisplayMark this to display a series of graphics at evenly-spaced intervals, which is calculated by the number of files to be installed. This is marked by default and should remain marked for billboards to work correctly.

NoteIf the billboards display too quickly during installation, mark the Slow Installation Speed check box on the Build Settings page.

Local GraphicNormally, you specify graphic 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.

5. Click OK.

The end user sees the billboards in the order in which they appear on the Billboards page. To rearrange billboards, click Move Up and Move Down at the right of the page.

See also:

Display Billboard on page 149

Build SettingsWiseScript Package Editor only

Use the Build Settings page to specify options for compiling the WiseScript and to specify a manifest file for WiseScripts that will run on Windows Vista.

Select Installation Expert > Build Settings page and complete the page:

Maximum CompressionMark this to make the compiled installation file as small as possible. Because it takes longer to compile with maximum compression, disable this during development.

Slow Installation SpeedMark this to slow down the installation on the destination computer. Do this when you have a short installation to ensure that your billboard graphics are displayed.

Use Internal 3D EffectsThis option is unavailable because it is no longer used.

No Reboot Message During Silent InstallsNormally, when an installation runs silently, it displays a message that the system must be restarted after installation. Mark this to suppress the warning message and to restart the system without warning. You can run an installation silently 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

WiseScript Package Editor Reference 41

Page 42: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

to perform when this is marked. This works only if you enable it in the Windows Me operating system.

Replace In-Use FilesMark this to have the installation force the replacement of in-use files by performing a restart 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-based installation, you can use the Copy Local Files script action to copy files from the CD to the end user’s hard disk, rather than embedding these files in the installation .EXE. Mark this to have these files included in the installation .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 check box.

See Copy Local File(s) on page 139.

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

Pathnames

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

Installation .EXE NameSpecify a name and location for storing the executable file after it is compiled. Leave this blank to have the name of the installation executable default to the name of the installation file (*.WSE).

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

Setup Icon PathnameYou can leave this blank to use the default icon file. If you specify your own icon file, you should use an icon file that has the following six icon modes.

Three sizes: 16 X 16, 32 X 32, and 48 X 48

Two colors for each size: 16 and 256 color mode.

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

WiseScript Package Editor Reference 42

Page 43: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Temp. Files DirectorySpecify the path to a directory to store temporary files in while building the installation. If this directory is not specified, the Windows temporary directory is used.

Manifest File

If this WiseScript is intended to run on Windows Vista, or if you will use this WiseScript in a Windows Installer installation that will run on Windows Vista, complete this section to specify a manifest file that indicates the run level for the .EXE at run time. The manifest file is embedded in the .EXE during compile.

Add a predefined manifest file for a specific run levelSelect one of the following options to add a predefined manifest for the user level you specify.

When you start a new WiseScript as a blank script (which is typically a custom action), this defaults to asInvoker. When you start a new WiseScript as an empty project (which is typically an installation), this defaults to requireAdministrator.

asInvokerSelect this option for a WiseScript that runs as a custom action in an .MSI. The WiseScript runs with the level of the user who runs the .MSI. This prevents failure of the .MSI due to UAC prompting on the custom action execution.

If the WiseScript performs an action that requires elevation, then place the custom action in the Execute Deferred sequence between the InstallInitialize and InstallFinalize actions. This lets the action run with elevated privileges. However, if the user who runs the .MSI does not have elevated privileges, then the WiseScript will fail and cause the .MSI installation to fail.

highestAvailableSelect this option for a WiseScript installation only, typically one that runs differently depending on the level of the user. If an administrator runs the .EXE, the UAC prompt appears. If a standard user runs the .EXE, the UAC prompt does not appear and the .EXE runs as a standard user.

Do not select this option for a WiseScript custom action.

requireAdministratorSelect this option for a WiseScript installation only. When the WiseScript installation is run, the UAC prompt appears.

Do not select this option for a WiseScript custom action. If you do, the .MSI installation will fail due to UAC prompting on the custom action execution.

Specify a manifest fileTo embed a specified manifest file in the .EXE instead of the default manifest, select this option and specify a manifest file that is in XML format.

For details on manifests and UAC, search for “Application Manifest” and “User Account Control” in the MSDN Library (msdn.microsoft.com/library/).

CAB FilesWiseScript Package Editor only

Use the CAB Files page to place the compiled .EXE into a cabinet (.CAB) file for automatic download and installation from a Web page. For information about .CAB files,

WiseScript Package Editor Reference 43

Page 44: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

search for “cabinet files” and “internet component download” on the Microsoft Web site (www.microsoft.com).

Select Installation Expert > CAB Files page and complete the page:

Place installation .EXE in .CAB FileMark this to generate a SETUP.INF file that contains instructions for calling the Microsoft CAB wizard and for copying files to the .CAB file. The SETUP.INF file is part of the .CAB file, not in the directory structure.

Optional SETUP.INF Contents(Optional) Enter or paste additional .INF file instructions for running the application.

Compiler VariablesUse the Compiler Variables page to set compiler variables that change the WiseScript during compile. You can use compiler variables to include or exclude portions of script from the compiled .EXE or to build a debug version of the WiseScript.

You set the default value of compiler variables on the Compiler Variables page, and then you select the compiler variables in the Compiler Variable If action in Script Editor. Compiler variables are surrounded by % characters in the script. (Example: %_DEBUG_%)

You can change the value of compiler variables when you compile.

The sample script Compvar.wse uses compiler variables. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

To add a compiler variable

1. Do one of the following:

(WiseScript Package Editor) Select Installation Expert > Compiler Variables page.

(WiseScript Editor) Select Project Settings > Compiler Variables page.

2. Click Add.

The Compiler Variable Settings dialog box appears.

3. Complete the dialog box:

Variable NameEnter the name of the compiler variable. By convention, compiler variables begin and end with an underscore character (_). Although this convention is not enforced, it helps distinguish compiler variables from regular variables in scripts.

Default ValueEnter the default value of the compiler variable.

DescriptionBriefly describe how the variable is used. This appears on the dialog box when you are asked to choose a value for the variable.

Value ListFor compiler variables that are displayed as a list, enter a list of valid values, each on a separate line.

See also Building a Debug Version on page 109

WiseScript Package Editor Reference 44

Page 45: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Data Entry TypeSelect the method to use to enter data for the compiler variable.

Do Not Prompt for ValueIf this is marked, you are not prompted for the value of this variable when compiling even if Prompt for Compiler Variables is marked on the Compiler Variables page. Mark this for variables that you do not expect to change frequently.

4. Click OK.

5. On the Compiler Variables page, mark one of the following:

Compiling from Command LineMark this to be prompted for the value of compiler variables when you compile from the command line. Use this for automated build processes. You can specify compiler variable values by entering the value directly on the command line or by storing the values in a text file.

See Command-Line Options on page 255.

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

See also:

Automatic Compiler Variables on page 245

ComponentsWiseScript Package Editor only

Use the Components page to add components, which are optional pieces, such as a spell checker, a tutorial, sample files, and other add-ons. When the WiseScript runs, end users can select the components to install.

Components that you create appear elsewhere in Installation Expert to let you assign specific resources to components. Example: when you add a shortcut, you can specify which component it belongs to. The shortcut is installed only if the component it belongs to is installed.

If you use components, you must add files to each component on the Files page.

The sample script Compvar.wse builds a component-based installation. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory in this product’s installation directory.

WiseScript Package Editor Reference 45

Page 46: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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

To add a component

Select Installation Expert > Components page, click Add at the right of the page, and complete the Component Details dialog box:

Component NameEnter the component name.

Install This Component By DefaultMark this to have the component appears to the end user, who can install it or deactivate it.

The end user sees the component in the order in which they appear on the Components page. To rearrange components, click Move Up and Move Down at the right of the page.

Config.sysWiseScript Package Editor only

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

1. Select Installation Expert > Config.sys page.

2. Click Add at the bottom of the page.

3. Enter the line to add and click OK.

4. On the Config.sys page, double-click the command line.

The Add Command to CONFIG.SYS dialog box appears.

5. Complete the dialog box:

Text to InsertEnter the line to add to Config.sys. If the line refers to a file, use a path. 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 box 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.

WiseScript Package Editor Reference 46

Page 47: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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.

6. Click OK.

See also:

Add to CONFIG.SYS on page 124

DevicesWiseScript Package Editor only

Use the Devices page to define device drivers to be installed on Windows 3.1x and Windows 9x. Devices are added to the [386Enh] section of the System.ini file. Drivers usually have one of the following file extensions: .386, .drv, .vxd, or .sys.

Before you complete this page, add the device driver file on the Files page.

1. Select Installation Expert > Devices page.

2. Click Add at the bottom of the page.

The Select File from Installation dialog box appears, which displays the directories and files in this WiseScript.

3. In the left pane, navigate to the folder that contains the device driver file.

4. In the right pane, select the device driver to add and click OK.

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

WiseScript Package Editor Reference 47

Page 48: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

DialogsWiseScript Package Editor only

Use the Dialogs page to view, activate, and edit the dialog boxes that appear to end users during installation. The dialog boxes you activate determine the level of control the end user has over the installation. The predefined dialog boxes are:

Welcome

ReadMeDisplays the ReadMe file for the application. When you select this dialog box, 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.

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 Program Manager or Start menu.

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

Finished

To activate a dialog box

Mark the check box next to the name of the dialog box.

To edit dialog box details and attributes

1. Mark the check box next to the name of the dialog box and click Edit.

2. In the Custom Dialog Editor, edit the dialog.

See About Dialog Boxes on page 202.

The changes you make affect only the dialog boxes in this WiseScript.

To add a dialog box

Click the Add button and complete the Dialog Box Properties dialog.

See Setting Dialog Box Properties on page 205.

WiseScript Package Editor Reference 48

Page 49: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Digital SignatureUse the Digital Signature page to add an Authenticode digital signature to an installation file so its integrity and authenticity can be verified.

Digital signature methods

The file signing tool that is used to digitally sign a file depends on the type of your digital certificate:

Public/private key pair files

This method requires a credentials file (.SPC or .CER) and a private key file (.PVK). This method is supported by the signcode.exe tool. For details, search for “Signcode” in the MSDN Library (msdn.microsoft.com/library/).

Personal Information Exchange file

This method requires a Personal Information Exchange file (.PFX), which is a container file for the public/private key information. This method is supported by the signtool.exe tool. For details, search for “Signtool” in the MSDN Library (msdn.microsoft.com/library/).

Requirements

You must have a valid code signing certificate, which you can obtain from a commercial certificate authority such as Verisign. For a list of certificate authorities, search for “Microsoft Root Certificate Program Members” in the MSDN Library (msdn.microsoft.com/library/).

You must have the signtool.exe or signcode.exe tool on your computer.

Signtool.exe requires the CAPICOM 2.0 redistributable to be installed and registered on your computer. CAPICOM provides services for digitally signing applications, and is available from the Microsoft Web site.

The location of signtool.exe or signcode.exe must be added to your Path environment variable.

To add a digital signature

(WiseScript Package Editor) Select Installation Expert > Digital Signature page and complete the page.

(WiseScript Editor) Select Project Settings > Digital Signature and complete the page.

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 5 K), 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 Web site address.

WiseScript Package Editor Reference 49

Page 50: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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

TimeStamp URLSpecify the URL you use for your timestamping service. Timestamping lets end users distinguish between a certificate that has 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 on your computer to build the installation but does not need to be available to the end user running the installation.

Certificate options

Signtool.exe with Personal Information Exchange fileMark this to use signtool.exe and then specify the Personal Information Exchange file (.PFX) to use.

Signcode.exe with public/private key pair filesMark this to use signcode.exe and then specify the credentials file (.SPC or .CER) that contains your Digital ID, and your private key file (.PVK).

File AssociationsWiseScript Package Editor only

Use the File Associations page to associate file extensions with executables to determine which application to start when the end user double-clicks a file with a certain extension. You can associate file extensions with any executable file in an installation. File associations are a type of advertising and are stored in the registry.

To add a file association

1. Select Installation Expert > File Associations page.

2. Click Add at the bottom of the page.

The Select File from Installation dialog box appears, which displays directories and .EXE files from this installation.

3. At the bottom of the dialog box, enter the three-character extension that is associated with the program.

4. Navigate to and select the .EXE to associate with this file type.

5. Click OK.

The new file association appears on the File Associations page.

To edit an existing file association, double-click it.

See Editing File Association Details.

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

WiseScript Package Editor Reference 50

Page 51: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Editing File Association Details

WiseScript Package Editor only

1. Select Installation Expert > File Associations page.

2. Double-click a file association.

The Association Details dialog box appears.

3. Complete the dialog box:

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 command to the right-click menu for files of that document type.

Source Pathname(Read-only) This is the path to the .EXE program associated with the specified document extension.

4. Click OK.

See also:

File Associations on page 50

FilesWiseScript Package Editor only

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

See Changing Source Directories on page 26.

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 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 Script Editor > Edit menu > Duplicate Files Report, to find duplicate files.

WiseScript Package Editor Reference 51

Page 52: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Working With the Files Page

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.

Drag directories or files to the page from Windows Explorer.

Drag directories or files from the upper list boxes to the lower list boxes.

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 on page 53.

Add FileAdd single or multiple files.

See Adding Files on page 52.

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 on page 54.

Adding Files

WiseScript Package Editor only

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

WiseScript Package Editor Reference 52

Page 53: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

The files in this directory are listed in the upper-right list box.

5. From the upper-right list box, select the files to added to the destination directory:

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

To add 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 box and click OK.

See Adding Contents of Directories on page 53.

7. Repeat the preceding steps to add all application files.

You can also drag files from Windows Explorer and drop them in a directory under the Destination Computer icon. When you drop the file, the Drag and Drop Settings dialog box opens so you can set file properties (this is the same as the Install File Settings dialog box.) 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 remove 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 box.

See Specifying Installation File Settings on page 54.

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.

Adding Contents of Directories

WiseScript Package Editor only

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

1. Select Installation Expert > Files page.

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

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

4. Click Add Contents.

The Add Wildcards dialog box appears.

5. Complete the Add Wildcards dialog box:

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.

WiseScript Package Editor Reference 53

Page 54: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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.

See also:

Specifying Installation File Settings on page 54Adding Files on page 52

Specifying Installation File Settings

WiseScript Package Editor only

1. 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 box appears. If you selected multiple files, the Multiple File Settings dialog box appears.

3. Complete the dialog box:

Source PathnameSpecify the path of the file on your computer.

Destination PathnameSpecify the path the file will have on the destination computer. Use variables to start the path (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 on the 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.

WiseScript Package Editor Reference 54

Page 55: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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 check box 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 check box to put the file in the installation .EXE rather than storing it as a separate file.

Repair application if this file is missingMark this to start self-repair if this file is missing when the application starts. This prevents your application from failing if this file is accidently deleted.

See Using Self-Repair on page 28.

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.

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.

WiseScript Package Editor Reference 55

Page 56: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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 check box.

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 path 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 75.

4. Click OK.

See also:

Adding Contents of Directories on page 53Files on page 51

FontsWiseScript Package Editor only

Use the Fonts page to add fonts to an installation. You only need to add fonts when they are required by the application being installed. Any fonts that were added on the Files page are listed here.

Select Installation Expert > Fonts page, click Add at the right of the page, and complete the Select Fonts dialog box:

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

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

In the right list box, select the font.

The font is added to the selected component.

WiseScript Package Editor Reference 56

Page 57: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

General InformationUse the General Information page to set the summary information for the compiled .EXE file. End users can see the summary information by right-clicking the compiled .EXE in Windows Explorer 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 44.

(WiseScript Package Editor) Select Installation Expert > General Information page and complete the page.

(WiseScript Editor) Select Project Settings > General Information and complete the page.

Installation VersionThe version number of the WiseScript.

DescriptionA description of the WiseScript, perhaps including your application’s name.

CopyrightThe copyright notice for the WiseScript.

Company Name

INI FilesWiseScript Package Editor only

The INI Files page lets you create a new .INI file 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.

The Edit INI File Settings dialog box appears.

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.

WiseScript Package Editor Reference 57

Page 58: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

7. Click OK.

To remove an .INI file from the installation, 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 Settings

WiseScript Package Editor only

1. Select Installation Expert > INI Files page.

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

The Edit INI File Settings dialog box appears.

3. Complete the dialog box:

FileDisplays the path 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 112.

4. Click OK.

See also:

INI Files on page 57Updating an Existing .INI File on the Destination ComputerEdit INI File on page 152

WiseScript Package Editor Reference 58

Page 59: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Updating an Existing .INI File on the Destination Computer

WiseScript Package Editor only

You can make changes to one or more of the existing system files on the destination system, such as the Win.INI and System.INI file.

1. Select Installation Expert > INI Files page.

2. Select the folder where the existing system file is located.

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

4. From File, select the path where the .INI file you want to update is stored.

For example, %SYS32%\NONAME.INI

5. Overwrite the NONAME.INI text with the name of the .INI file that you want to update, such as System.ini.

6. In INI File Contents, enter the information that you want to add to the .INI file.

During the installation, your settings are merged into the existing system file.

Any duplicate settings are overwritten with the values you enter here.

7. Click OK.

See also:

INI Files on page 57Editing INI File Settings on page 58

Installation LogWiseScript Package Editor only

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

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

Select Installation Expert > Installation Log page and complete the page:

Do not create installation logMark this to prevent an installation log from being created. If you do this, the end user will get an error upon trying 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 backward compatibility.

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

WiseScript Package Editor Reference 59

Page 60: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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.

See also:

Add Text to INSTALL.LOG on page 122Open/Close Install.log on page 182

LanguagesWiseScript Package Editor only

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

For information on adding language support to an installation, see Language Support on page 29.

To set language settings

Select Installation Expert > Languages page and complete the page:

Languages listMark the check box next to each language to translate this installation to. This list of languages is presented to the end user at the start of the installation.

If the language you need is not listed, add it to the installation.

See To add a language to the installation on page 61.

NoteIf you add support for a double-byte language, do not include any other languages in the installation. Including double-byte and 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.

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.

Copy DefaultMark 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 the Script Editor 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.

WiseScript Package Editor Reference 60

Page 61: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

To add a language to the installation

If the language you need is not listed on the Languages page:

1. Click Add on the Languages page.

The Select Languages dialog box appears, which lists the languages that are available. This dialog box is populated with the pre-translated languages plus any languages that you add on the Installer Messages dialog box. If the language you need is not listed, add it to the installation.

See Editing Installation Messages on page 22.

2. Select the language and click OK.

The language you select is added to the list on the Languages page.

Clearing or Deleting a Language

When you mark a language check box, then clear it, the translation remains in the installation but is not added to the compiled installation. This lets you omit a language from the compile without losing any translated text strings. This is especially important when you have added custom translated text.

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 translations that you entered on the Installer Messages dialog box.

MediaWiseScript Package Editor only

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

Select Installation Expert > Media page and complete the page:

Single File InstallationMark this to pack all the files into a single installation file. This is useful for distributing the installation over a LAN or 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.

Custom SizeIf you selected Custom in the Media Type field, enter the formatted capacity of the media you are using in this field.

Microsoft SMSWiseScript Package Editor only

If an installation runs in a Microsoft Systems Management Server (SMS) environment, you can have the installation create a status .MIF file and a definition file (.PDF or .SMS)

WiseScript Package Editor Reference 61

Page 62: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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.

NoteYou can use the Exit Installation script action to write text and a success/failure flag to the status MIF file.

See Exit Installation on page 164.

Select Installation Expert > Microsoft SMS page and complete the page:

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, VersionThese 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 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 Compiled package option on the Distribution Method page. 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.

ODBCWiseScript Package Editor only

Use the ODBC page to add ODBC data sources that are required by the application on the destination computer. To add ODBC driver support, select MDAC on the Runtimes page.

Select Installation Expert > ODBC page, click Add at the right of the page, and complete the Configure ODBC Data Source dialog box:

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.

WiseScript Package Editor Reference 62

Page 63: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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.

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 dialog boxes to the end user. Otherwise, the data source is configured with default settings.

System DSNMark this to make the data source available to all user accounts on the destination computer.

See also:

Config ODBC Data Source on page 139

Online RegistrationWiseScript Package Editor only

Use the Online Registration page to configure the online registration feature. This lets the end user register the program after the installation has been completed successfully. Product registration is supported through a CGI program or Active Server Page that accepts the data through the HTTP POST operation.

Select Installation Expert > Online Registration page and complete the page:

No Online RegistrationMark this if you do not support online registration.

Online RegistrationMark this if you support online registration. The following fields become enabled:

Post to URLEnter the URL of the CGI program or Active Server Page that accepts the data through the HTTP POST operation. Registration is passed to the Web server in the named fields NAME, COMPANY, ADDRESS1, ADDRESS2, ADDRESS3, EMAIL, WEBADDRESS, PURCHASEDATE, SERIALNO, PHONE, PRODINFO, CITY, STATE, and ZIP.

Registration INI File NameIn the directory structure of the installation that is displayed above this field, specify the location of the file that will contain the registration data on the destination computer. Use the New Folder button to create a new directory within the Application or Windows directory.

Enter a name for the file that will contain the registration data. Future installations use this file to pre-enter the user’s registration details, such as name and company. The end user can still change the fields before registering.

WiseScript Package Editor Reference 63

Page 64: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

PasswordWiseScript Package Editor only

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

Select Installation Expert > Password page and complete the page:

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 one-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 54.

Product DetailsWiseScript Package Editor only

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

Select Installation Expert > Product Details page and complete the page:

Installation TitleEnter the name of the application. It appears on the background screen and on the dialog boxes during the installation.

WiseScript Package Editor Reference 64

Page 65: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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 BarWiseScript Package Editor only

Use the Progress Bar page to set options for the progress bar that displays while the installation is running. The default progress bar uses a .DLL that is in the WiseScript Editor\Progress subdirectory of this product’s installation directory. The source code for this .DLL is in the WiseScript Editor\Dll\Progress directory. You also can use an external .DLL for displaying the progress bar.

Select Installation Expert > Progress Bar page and complete the page:

Progress Dialog PlacementSelect a screen position for the progress bar.

Progress Bar Based OnSelect how progress should be calculated.

Custom Progress Bar .DLLBy default, this path points to an operating system-specific .DLL that displays a custom progress bar. 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 dialog boxes 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 dialog boxes 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 box 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.

WiseScript Package Editor Reference 65

Page 66: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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.

RegistryWiseScript Package Editor only

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

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

Working With the Registry Page

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

See also:

Configuring Registry Key Settings on page 67Creating or Editing Registry Key Settings on page 66

Creating or Editing Registry Key Settings

WiseScript Package Editor only

On the Registry page in Installation Expert, you can add new registry keys, edit existing registry values, and import registry files.

WiseScript Package Editor Reference 66

Page 67: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

To add an empty registry key

1. Select Installation Expert > Registry page.

2. In the lower-left list box, select the location for the key.

3. Click New and select Key.

The Registry Key Settings dialog box appears.

4. From Operation, select Create empty key.

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

6. Click OK.

To add a registry value

1. Select Installation Expert > Registry page.

2. In the lower-left list box, select the key to contain the value you’re adding.

3. Click New and select Key.

The Registry Key Settings dialog box appears.

4. Complete the dialog box and click OK.

See Configuring Registry Key Settings.

The registry value is added and appears in the lower-right list box. To edit it, double-click its name. To delete it, use the right-click menu.

To import a registry file

1. Select Installation Expert > Registry page.

2. Click New and select Import.

3. On the Select Registry File to import dialog box, specify the registry file (.REG file).

See also:

Registry on page 66

Configuring Registry Key Settings

WiseScript Package Editor only

Use the Registry Key Settings dialog box to set or edit registry key settings.

1. Select Installation Expert > Registry page.

2. Do one of the following:

Click New > Key.

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

The Registry Key Settings dialog box appears.

3. Complete the dialog box:

WiseScript Package Editor Reference 67

Page 68: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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 paths. (Example: Entering Protocol\StdFileEditing creates the StdFileEditing key inside the Protocol key.) Any keys in the path that do not exist are automatically created.

Value NameEnter the name of a new named value.

Data ValueEnter the data for the value. To insert multiple lines of data here, press Ctrl+Enter to begin a new line.

If the Data Type (below) is Double word (DWORD), enter the data in decimal notation.

Data TypeSelect the type of data contained in the named value.

The associated Windows API data types are in parentheses below.

String(REG_SZ) Identifies the value as an expandable string. To include a Windows system variable, enclose it in double percent signs. For example, %%WIN%%.

Unexpanded string(REG_EXPAND_SZ) Identifies the value as a string that contains unexpanded references to environment variables that are expanded when the value is retrieved. Enclose the environment variables in single percent signs. For example, %PATH%.

If you do not want the variable to be expanded, enclose it in double percent signs. For example, %%WIN%%. This allows Windows system variables to be embedded.

WiseScript Package Editor Reference 68

Page 69: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Multiple strings(REG_MULTI_SZ) Identifies the value as a series of null-terminated strings. Type the value as multiple pieces of text and press Ctrl+Enter after each one.

Double word(REG_DWORD) Identifies the value as a 32-bit number in decimal notation.

Binary/Hex(REG_BINARY) Identifies the value as a binary in hexadecimal notation. Separate each byte by at least one space, like the following example:

AD 30 C0 A9 40 20 A8 FC 4C 00 08

NoneThis option 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 check box to start self-repair if this registry value is missing when the application starts. 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 Using Self-Repair on page 28.

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 check box. This option is unavailable unless Multiple Strings is selected in the Data Type drop-down list.

4. Click OK.

See also:

Creating or Editing Registry Key Settings on page 66Registry on page 66Edit Registry on page 153

RuntimesWiseScript Package Editor only

Use the Runtimes page to select various runtimes to include with the installation. Runtimes are sometimes pre-selected after running the Import Visual Basic Project tool or ApplicationWatch. To add ODBC data sources, use the ODBC page. See ODBC on page 62.

WarningInstalling the wrong version of runtime support files can cause the end user's applications to stop running properly and can even disable the operating system. Before deploying any installation that installs runtimes, select Help menu > Download Runtimes to get the latest runtime updates.

WiseScript Package Editor Reference 69

Page 70: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

To add a runtime

1. Select Installation Expert > Runtimes page.

2. Mark the check box of the runtime to add.

For many runtimes, a dialog box then appears where you can specify the version of the runtime or other settings. You can edit these runtime settings by selecting the runtime and clicking Details. If no dialog box appears when you mark a runtime, then that runtime has no settings to edit.

A description section at the bottom of the Runtimes page provides information on the currently-selected runtime.

Microsoft Data Access Components

The MDAC section of the Runtimes page lists the different versions of Microsoft Data Access Components (MDAC) that are available to distribute with your application.

Database Runtime

The Database Runtime section of the Runtimes page lists connectivity runtimes. If your application requires any database connectivity, you probably need to include one of these options in the installation.

Visual Studio Support

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

Windows Runtime

The Windows Runtime section of the Runtimes page lists common Windows runtimes. Add these runtimes when the runtime is critical to the application you are deploying, and when you expect that the end users do not have the runtime installed.

Crystal Reports Runtime

The Crystal Reports Runtime section of the Runtimes page lists Crystal Reports™ runtimes.

NoteTo include Crystal Reports runtimes in your application, you must have Crystal Reports installed on your local computer.

Software Virtualization Solution

The Software Virtualization Solution section of the Runtimes page lists the SVS Driver runtime. When you distribute a virtual runtime archive file (.VRA), use this runtime to ensure that the target computer has the SVS Driver runtime installed before installing the .VRA file. A .VRA file cannot be installed if the SVS Driver runtime or a compatible driver is installed.

When you include the SVS Driver runtime, you must define the compiler variable _SVSDRIVERINC_ on the Compiler Variables page. You can assign the variable a value of 1 or 0. If you assign it a value of 1, the SVS Driver is included with the installation. If

WiseScript Package Editor Reference 70

Page 71: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

you assign it a value of 0, the driver is downloaded during installation and the size of the installation is reduced significantly.

See Compiler Variables on page 44.

The SVS Driver runtime requires a reboot of the end user’s computer after it is installed. Design your WiseScript so that it resumes properly after the reboot. For a good example of how to handle a reboot when installing the SVS Driver, see the VsaWrapper.wse WiseScript that is in the Virtual Package Editor\Templates directory.

The SVS Driver runtime does not appear in Add/Remove Programs on the end user’s computer. The end user can remove the SVS Driver runtime by using the following command line: Msiexec.exe /x {7D8DBB7C-1C55-4950-A107-043C164F379A}.

WarningIf the end user removes the SVS Driver runtime, any application that is installed into an SVS layer becomes non-functional.

You can download the latest SVS Driver runtime from the Help menu.

See Downloading Application Runtimes on page 24.

ScreenWiseScript Package Editor only

Use the Screen page to set the background pattern and font for the installation.

Select installation Expert > Screen page and complete the page:

Background GradientSelect the background gradient.

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 dialog boxes.

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 font option.

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.

WiseScript Package Editor Reference 71

Page 72: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Point SizeSpecify the point size for text displayed on the installation dialog boxes. 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.

ServicesWiseScript Package Editor only

The Services page lets you define applications to be installed as a Windows NT service. The .EXE file you define as a service must already be a part of the installation. Consult 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 at the bottom of the page.

The Select File from Installation dialog box opens, which displays directories and .EXE files from this installation.

5. Navigate to and select the .EXE.

6. Click OK.

The service appears in the list on the Services page.

To change the .EXE file for a service, select it from the list and click Details.

See Configuring Service Settings.

To remove an existing service from the installation, select it from the list and click Delete.

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

See also:

Create Service on page 143

Configuring Service Settings

WiseScript Package Editor only

1. Select Installation Expert > Services page.

2. Select a service and click Details.

WiseScript Package Editor Reference 72

Page 73: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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

3. Complete the dialog box:

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, 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 starting the last known good configuration, startup continues. Otherwise, it restarts with the last known good configuration.

Critical ErrorLogs the error if possible. If the computer is starting the last known good configuration, startup fails. Otherwise, it restarts with 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.

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.

WiseScript Package Editor Reference 73

Page 74: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

See also:

Services on page 72

ShortcutsWiseScript Package Editor only

Use the Shortcuts page to add shortcuts to the Startup Group, desktop, or Start menu 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 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 Start menu shortcuts.

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

3. Click Add.

The Select File from Installation dialog box opens.

4. Navigate to and select a file to create a shortcut for.

5. Click OK.

The Shortcut Details dialog box appears.

6. Complete the dialog box and click OK.

See Editing Shortcut Details on page 74.

The new shortcut appears on the Shortcuts page.

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

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.

See also:

Create Shortcut on page 144

Editing Shortcut Details

WiseScript Package Editor only

1. Select Installation Expert > Shortcuts page.

2. Select the shortcut and click Details.

The Shortcut Details dialog box appears.

WiseScript Package Editor Reference 74

Page 75: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

To customize a shortcut further or to place it in a subfolder in the Start menu, go to Script Editor and double-click the Create Shortcut line within the If System Has Windows 95 Shell Interface statement.

3. Complete the dialog box:

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 running 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 path of the file that is opened by the shortcut.

Shortcut LocationSelect where to place the shortcut.

Enable Access For All Windows NT UsersFor Windows NT, mark this to give all users access to the shortcut. This only works if the user logged in during installation has administrator privileges.

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. Typically, use this for a shortcut that starts the application.

See Using Self-Repair on page 28.

4. Click OK.

See also:

Shortcuts on page 74

SmartPatchWiseScript Package Editor only

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

To create a smart patch, make sure your computer contains a copy of the old software that is being upgraded. After you specify the path to the old software, the SmartPatch

WiseScript Package Editor Reference 75

Page 76: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

feature compares the older versions of the application to the version being installed and generates a patch installation that contains only the differences between the two versions. This can result in a significantly smaller installation file. If you specify multiple previous versions, they’re upgraded no matter what version is on the destination computer.

Select Installation Expert > SmartPatch page and complete the page:

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

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.

WiseScript Package Editor Reference 76

Page 77: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

System RequirementsWiseScript Package Editor only

Use the System Requirements page to specify minimum hardware and software requirements for the installation and to set warning messages that display to the end user if the destination computer does not meet the requirements.

To set a system requirement

This procedure applies to any system requirement that you set on the System Requirements page. Notes on specific system requirements follow the procedure.

1. Select Installation Expert > System Requirements page.

2. Double-click a requirement.

The Minimum System Requirements dialog box appears.

3. From the drop-down list at the top of the dialog box, select a requirement.

Requirements that begin with “All” or “Do not check” indicate that this requirement is not checked. Any requirement you select includes not only the requirement but also any greater value. Example: Selecting a Windows version of Windows XP lets an installation run on any computer with Windows XP or later operating system.

4. From Type, select an option:

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.

5. When you specify a requirement, the Display Messages fields are enabled.

Message TitleEnter a name to appear in the title bar of the error message.

Message TextEnter the error message that appears if the destination computer doesn’t meet the system requirement. It should communicate to the user why the installation cannot run.

6. Click OK.

Windows Version

The requirements you set for the Windows version apply only if the destination computer is running one of the following operating systems:

Windows 95Window 98Windows Me

WiseScript Package Editor Reference 77

Page 78: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

If the destination computer is running a version of Windows NT, the minimum system requirements specified under the Windows NT Version item are checked instead.

Windows NT Version

The requirements you set for the Windows NT version apply only if the destination computer is running one of the following operating systems:

Windows NT 4.0 Window 2000Windows XPWindows Server 2003Windows Vista

If the destination computer is running Windows 95, Windows 98, or Windows Me, the minimum system requirements specified under the Windows Version item are checked instead.

Screen Resolution

The minimum required screen resolution.

Screen Colors

The minimum required screen depth. 24 Million Colors corresponds to True Color in the Display Control Panel.

Sound Support

The audio support options that are required.

System SearchWiseScript Package Editor only

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

System Search Usage

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 path you find is put into the variable %MAINDIR%. The variable %MAINDIR% represents the default installation directory of the installation.

If, during the previous installation, you wrote the installation directory path into an .INI file or into the registry, you can search for that path using this page. If you know the path ends with a file name, mark Remove File Name when configuring the registry or .INI search.

If you search for an .INI value, make sure the .INI Item Name contains a valid path. If the search finds the .INI Item Name, its value is put into %MAINDIR%.

WiseScript Package Editor Reference 78

Page 79: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

If you search for a registry value, make sure the registry value contains a valid directory or path. If the search finds the registry Value Name, its Value Data is put into %MAINDIR%.

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 rearrange the order of items on the System Search page, click the Move Up or Move Down buttons.

See:

Searching for Files or Directories on page 79

Searching for INI Values on page 80

Searching for Registry Values on page 81

Searching for Files or Directories

WiseScript Package Editor only

On the System Search page, you can set up a search for a file or directory on the destination computer. To find a directory, you must search for a specific file contained inside the directory. When you search for a file, Windows Installer stops searching as soon as it finds the first file or directory that matches your specification. Therefore, it’s important that you specify unique file or directory attributes for your search. You can specify to return either the full file path or just the directory that contains the file.

1. Select Installation Expert > System Search page.

2. Click Add at the right of the page and select Search for File.

The Search for File dialog box appears.

3. Complete the dialog box:

File NameEnter the name of the file.

DescriptionEnter the message to display on the progress dialog box 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. Click OK.

To edit an entry, double-click its name. To rearrange the entry in the list, click the Move Up and Move Down buttons.

See also:

System Search on page 78

WiseScript Package Editor Reference 79

Page 80: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Searching for INI Values

WiseScript Package Editor only

On the System Search page, you can set up a search for a value in an .INI file on the destination computer. Use this only to get an .INI value that you know to be a valid path on the destination computer.

.INI File Terminology

An .INI file consists of sections with the following syntax:

[DirectoriesAndFiles]

SrcDir=E:\Application\

SrcFiles=E:\Application\Application.exe, E:\Sample\sample.dll

In the section above, DirectoriesAndFiles is an INI Section Name and SrcDir is an INI Item Name.

Item Field refers to the number of the item in a comma-delimited list. Example: The Item Field for E:\Sample\sample.dll in the section above is 2 because it is the second item in the list.

To add an .INI file to the search list

1. Select Installation Expert > System Search page.

2. Click Add at the right of the page and select Read INI Value.

The Read INI Value dialog box appears.

3. Complete the dialog box:

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.

4. Click OK.

To edit an entry, double-click its name. To rearrange the entry in the list, click the Move Up and Move Down buttons.

See also:

System Search on page 78

WiseScript Package Editor Reference 80

Page 81: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

Searching for Registry Values

WiseScript Package Editor only

On the System Search page, you can set up a search for a registry value on the destination computer. Use this only to get an .INI value that you know to be a valid path on the destination computer.

1. Select Installation Expert > System Search page.

2. Click Add at the right of the page and select Read Registry Value.

The Read Registry Value dialog box appears.

3. Complete the dialog box:

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 NameMark this to return only the directory name if it ends with a file name.

4. Click OK.

To edit an entry, double-click its name. To rearrange the entry in the list, click the Move Up and Move Down buttons.

See also:

System Search on page 78

UninstallWiseScript Package Editor only

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

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.

Select Installation Expert > Uninstall page and complete the page.

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.

WiseScript Package Editor Reference 81

Page 82: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

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 dialog boxes. 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.

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

See Adding Additional Commands for the Uninstaller.

Adding Additional Commands for the Uninstaller

WiseScript Package Editor only

It is not necessary to add commands to delete files or registry entries that the installation created.

1. Select Installation Expert > Uninstall page.

2. Click Add and select the type of command to enter.

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

Use this command to delete additional files, such as those created by your program on first run.

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.

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

Use this command to delete registry entries, such as those created during the execution of your program.

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.

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

Navigate to and select the program to be executed (or enter its name in File name). 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.

WiseScript Package Editor Reference 82

Page 83: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

6. On the Uninstall page, mark Delete in-use files during uninstall to delete even those files that are in use when the uninstall program is running.

See also:

Uninstall on page 81

WebDeployWiseScript Package Editor only

The WebDeploy page provides an efficient method for creating true Internet-based installations for your application. It creates a small stub installation that downloads the compressed files from a Web server as needed.

When you compile a WebDeploy installation, stub files and data files are created. The stub files are designed to be distributed over the Internet, that is, they contain all the server connection information. When an end user clicks the stub file, WebDeploy connects to the appropriate Web site, checks the system on the destination computer to determine what it needs, then starts downloading files. After it has finished downloading the files, it starts the installation.

NoteWebDeploy supports only basic authentication. In your Web server software, verify that the directory you use for WebDeploy is secured with basic, not domain, authentication. Also, if you use the FTP protocol for WebDeploy, note that WebDeploy does not support passive transfers through FTP. Some firewalls and gateways require passive FTP transfers.

See:

The WebDeploy Process on page 84Creating a WebDeploy Installation on page 84Uploading a WebDeploy Installation to the Web on page 86

WiseScript Package Editor Reference 83

Page 84: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

The WebDeploy Process

See also:

WebDeploy on page 83

Creating a WebDeploy InstallationThe WebDeploy™ page lets you enable an installation for distribution through the Web. You do this by setting options for compiling the installation and for connecting to the Web server that will contain the installation files.

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

When you develop the installation, you:Configure WebDeploy by specifying the location of installation files on the Web serverCompile the installationUpload the installation files to the Web serverNotify end users of the Web link to the .EXE

Your Computer Your Internet Host (FTP/HTTP) ServerContains the installation

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

Phase 1:

Upload files through FTP

(HTTP Protocol)

Destination ComputerPhase 2:

The end user:Runs the installation .EXE from your Web server

Your Internet Host (FTP/HTTP) ServerContains the installation .EXE and other files

When the end user runs the .EXE, it:Runs an installation wizardDetermines which pieces of the application are neededDownloads and installs the appropriate pieces of the application

(HTTP Protocol)

Your Internet Host (FTP/HTTP) ServerContains the pieces of an installation ready for downloadContains the new installation and its ReadMe

Phase 3: Destination Computer

WiseScript Package Editor Reference 84

Page 85: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

To create a WebDeploy 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 that are enabled:

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 everyone with a copy of the installation .EXE uses the same user name 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:

HTTP ProtocolThis option is more universal because it can be used both outside and behind a firewall. The HTTP protocol tries 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, we recommend the use of the HTTP protocol.

FTP ProtocolThis option is used within an intranet for organizations that 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 logon without a password.

To have the FTP protocol work through a proxy server, see the workaround solution in the sample script Proxy.wse, in the WiseScript Editor\Samples subdirectory of this product’s installation directory. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory in this product’s installation directory.

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

WiseScript Package Editor Reference 85

Page 86: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating WiseScript Installations

minimizes the amount of files that a given installation must download because only the necessary files are downloaded.

Example:

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

4. Save, compile, and close the installation.

See also:

WebDeploy on page 83The WebDeploy Process on page 84Uploading a WebDeploy Installation to the Web on page 86

Uploading a WebDeploy Installation to the WebTo upload the files in a WebDeploy installation, you can use any FTP client.

To upload a WebDeploy installation with an FTP client

1. Verify that a directory exists on the Web server at the address you specified on the WebDeploy page.

2. Using an FTP client, upload the installation files.

3. Distribute the installation media or notify your end users of the Web link to the .EXE.

To test the installation

After 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 the Microsoft VER.DLL. If the Internet connection is interrupted during the download, WebDeploy picks up where the installation was cut off when download resumes.

See The WebDeploy Process.

See also:

WebDeploy on page 83Creating a WebDeploy Installation on page 84

WiseUpdateFor information on using WiseUpdate, see Using WiseUpdate in an Installation on page 89.

WiseScript Package Editor Reference 86

Page 87: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Chapter 5Using WiseUpdate

This chapter includes the following topics:

About WiseUpdate on page 87

The WiseUpdate Process on page 88

Using WiseUpdate in an Installation on page 89

Options for Running WiseUpdate Client on page 93

WiseUpdate Tips on page 94

Troubleshooting WiseUpdate on page 95

About WiseUpdateWiseScript Package Editor only

WiseUpdate® offers an easy method for updating your application on your end users’ computers, ensuring that end users are always working with the most current version of your application. Based on settings you specify on the WiseUpdate page, WiseUpdate installs a small client application (WiseUpdt.exe) along with your application. You can place a shortcut to this application in the end user’s Startup group so that it checks for updates when the destination computer is started or an end user logs on to Windows. WiseUpdate Client checks for newer versions of your application at the Web location you specified. If it finds a new installation, it downloads and runs it.

WiseUpdate, by itself, does not deploy the current version of your application; it simply adds a Web-based update mechanism to your end users’ computers. The first time you configure WiseUpdate, you enable that version to check for later versions over the Internet. Once WiseUpdate is integrated into your application, it simplifies the upgrade process for you and your end users for future updates to your application. See Configuring the WiseUpdate Page on page 89.

NoteThis documentation covers both WiseScript Package Editor and WiseScript Editor. WiseScript Editor contains the same scripting interface as WiseScript Package Editor, but it does not contain the Installation Expert interface or other installation development tools. Therefore, some of the information in this document does not apply to WiseScript Editor.

WiseScript Package Editor Reference 87

Page 88: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using WiseUpdate

The WiseUpdate ProcessWiseScript Package Editor only

3. Upload to the Web server:WiseUpdate update fileInstallation files and Readme

Your Web Server (FTP/HTTP):Contains the WiseUpdate update file that stores:

The current version numberURLs to the installation files

Contains the installation files and Readme

Phase 1:When you first use WiseUpdate, you:1. Develop the installation2. Configure WiseUpdate and specify:

Location of updates on the Web serverCurrent version of the application

Your Computer

(FTP)

Phase 2:The end user:1. Obtains your application through normal distribution channels2. Installs your application:

WiseUpdate Client is copied to the application directoryA shortcut to WiseUpdate client is placed on the destination computer

Destination Computer

3. Upload to the Web server:WiseUpdate update fileInstallation files and Readme

Your Web Server (FTP/HTTP):Contains the WiseUpdate update file that stores:

The new version numberURLs to the new installation files

Contains the new installation files and Readme

Phase 3:When you update your application to a new version, you:1. Develop an upgrade or patch2. Configure WiseUpdate and specify:

Same Web location as the originalNew version of the application

Your Computer

(FTP)

Phase 4: Destination Computer Your Web Server (FTP/HTTP)

(HTTP)

When WiseUpdate Client is run on the destination computer, it:Runs an upgrade wizardReads the WiseUpdate update file on the Web serverDetermines that a new version existsDisplays the ReadmeDownloads and runs new installation filesUpdates the local version

WiseScript Package Editor Reference 88

Page 89: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using WiseUpdate

Using WiseUpdate in an InstallationWiseScript Package Editor only

To use WiseUpdate® effectively, you must use it in two or more successive versions of your application. Using it in one version of your application only enables that version to check for later versions over the Internet.

NoteTo avoid web connection errors when you use WiseUpdate with IIS 6.0 or later, you must add a MIME type to the IIS server for each type of file that you let users download from the Internet.

Process for Using WiseUpdate Effectively

1. Select Installation Expert > WiseUpdate page.

2. Mark Include WiseUpdate Client.

This causes WiseUpdate Client, a small executable file (WiseUpdt.exe), to be included in the installation and installed on the destination computer in the main application directory along with your application.

3. Configure the WiseUpdate page.

See Configuring the WiseUpdate Page on page 89.

4. When the installation is tested and ready for distribution, upload the installation files, the Readme file, and the update file to a Web server.

See Uploading WiseUpdate Files With an FTP Client on page 92.

WarningIf you do not upload the files before deploying your application to end users, an error occurs when they check for upgrades.

5. Test the WiseUpdate process.

See Testing WiseUpdate on page 92.

6. Distribute your application using your usual method. Examples: CD or WebDeploy.

7. The next time you update your application, do the following:

a. Format it as an upgrade or a patch.

b. Update the Version field on the Product Details page, otherwise the maintenance mode will be entered.

c. Upload the updated installation files to the Web server.

After you upload the updated application, end users who have WiseUpdate will be prompted to update their application over the Internet.

Configuring the WiseUpdate Page

WiseScript Package Editor only

Completing the WiseUpdate page causes the WiseUpdate Client to be installed in the application directory on the destination computer along with your application. Most of

WiseScript Package Editor Reference 89

Page 90: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using WiseUpdate

the fields on this page specify information to be embedded inside WiseUpdate Client. This information tells the client when, how, and where to check the Web location for new versions.

The first time you configure WiseUpdate, you enable that version to check for later versions over the Internet. To enable the Internet updating capability, you must use WiseUpdate for each successive version of your application.

1. Select Installation Expert > WiseUpdate page.

2. Mark Include WiseUpdate Client.

3. Complete the page:

Host AddressEnter the Web server address where you plan to store updated installation files. (Example: www.company.com) You can also enter the server’s IP address.

NoteThe Web location you select should be accessible through both the FTP and the HTTP protocols—you typically use FTP to transfer files to it, and end users use HTTP (WiseUpdate Client) to read and download files from it.

See WiseUpdate Tips on page 94.

Host UsernameIf necessary, enter the user name that’s required to connect to the host address. Typically, Web servers don’t require user names and passwords. This is used for basic HTTP authentication.

Host PasswordIf necessary, enter the password that’s required to connect to the host address. Enter this only if the Host Username is entered above.

Host DirectoryEnter the directory on the Web server where you plan to store updated installation files, including the WiseUpdate update file. To put the files in the root directory of the host, leave this blank.

If you are working in an update, the directory must be the same as in the original version of the installation.

Update FilenameEnter a name for the WiseUpdate update file and use the extension .INI. (Example: WiseUpdate.ini) This file is created during compile. In subsequent versions of this installation, the file name must be the same as in the original version of the installation.

See About the WiseUpdate Update File on page 91.

Product VersionEnter the current version of the installation. This version is stored with your application on the destination computer and is compared to the version stored in the update file on the Web server.

Check Interval (days)Enter the frequency at which to remind the end user to check for updates. This works in conjunction with the Add client to StartUp group check box below.

If you place the WiseUpdate shortcut in the StartUp group on the destination computer, WiseUpdate Client runs when the destination computer is started or

WiseScript Package Editor Reference 90

Page 91: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using WiseUpdate

the end user logs on to Windows. If the check interval has been reached, WiseUpdate Client runs normally, prompting the end user to check for updates. If the check interval has not been reached, WiseUpdate Client runs silently and quits.

Alternate Web PageEnter a URL to direct the end user to if WiseUpdate Client cannot check for updates or download the installation files. You might direct the end user to a Web page that contains technical support information, upgrade information, or a discussion of possible problems.

Start Menu IconThis is enabled when you mark the Add client to StartUp group check box below. Enter a name for a shortcut to be created in the Startup group of the destination computer’s Windows Start menu. This name cannot contain special characters such as /, :, *, or ?.

Add client to StartUp groupMark this to have the installation add a shortcut for WiseUpdate Client to the Startup group of the Windows Start menu on the destination computer. Then, when the destination computer is started or the end user logs on to Windows, the shortcut runs WiseUpdate Client according to the Check Interval (days) setting described above.

If you do not mark this check box, then WiseUpdate Client will never run on the end user’s computer unless you code your application to run it.

See Options for Running WiseUpdate Client on page 93.

About the WiseUpdate Update File

WiseScript Package Editor only

On the WiseUpdate page, you enter a name for the WiseUpdate update file, which is created during compile. Later, the update file is uploaded to a Web server. When WiseUpdate Client runs on the destination computer, it reads the update file to determine if a new version exists, and if so, where to find the new version and its Readme.

The update file is in .INI format and contains information that you enter on the WiseUpdate page. It is formatted as follows:

[WiseUpdate]Version=2.0Size=1095391Install=http://www.company.com/updates/Application.exeReadMe=http://www.company.com/updates/Readme.rtf

where:

Version is the version of installation that is available on the server.

Size is the size of the installation in bytes.

Install is the URL to the installation.

ReadMe is the URL to the installation’s Readme file. If there is no Readme file, the Readme line is omitted.

WiseScript Package Editor Reference 91

Page 92: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using WiseUpdate

Uploading WiseUpdate Files With an FTP Client

WiseScript Package Editor only

Use an FTP client to upload the following items to the Host Address and Host Directory you specified on the WiseUpdate page:

The compiled installation file or files.

An optional Readme file.

The WiseUpdate update file, which specifies the current version of the application, the URL to the installation files, and the URL to the Readme.

See About the WiseUpdate Update File on page 91.

You can place the installation files and Readme at any Web location, provided their URLs are recorded correctly in the WiseUpdate update file.

When you enter the URLs in the FTP client, make sure they match the case of the actual path on the Web server. Some HTTP servers are case-sensitive and display errors if the case does not match exactly.

Testing WiseUpdate

WiseScript Package Editor only

After you configure the WiseUpdate page and upload files to the FTP server, you should test the WiseUpdate process.

To test how WiseUpdate works when an update is not needed

In this test, the end user’s version of your application matches the version on the Web server.

1. Install the first version of your application on a testing computer (not your development computer).

2. On the testing computer, open your application’s installation directory and double-click the file WiseUpdt.exe. Normally, this file is run automatically at prescribed intervals at startup, but for testing purposes, you run the .EXE directly.

WiseUpdate Client opens, customized with your application’s name.

3. Click Next.

WiseUpdate Client uses the HTTP connection information that you specified on the WiseUpdate page to read the WiseUpdate update file on the Web server. If you are running the same version of your application as that on the server, a message notifies you that you are running the latest version.

4. Close the WiseUpdate Client window.

If this test is not successful, try to determine the problem.

See WiseUpdate Tips on page 94 and Troubleshooting WiseUpdate on page 95.

If this test is successful, follow the next procedure to test what happens when the version of your application on the Web server is later than the end user’s version.

WiseScript Package Editor Reference 92

Page 93: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using WiseUpdate

To test how WiseUpdate works when an update is needed

1. To make the application on the server appear to be a later version:

a. On your development computer, on the WiseUpdate page, enter a later product version. (Example: If the original version was 1.0.0, enter 1.0.2)

b. Compile the installation to create a new update file.

c. Upload the new update file to the Web server.

2. On the testing computer, open your application’s installation directory and double-click the file WiseUpdt.exe. Then click Next.

Because the version on the Web server is now later than the version on the testing computer, WiseUpdate Client displays the Readme file and then displays an option to download and run the installation.

3. You can download and run the installation, but installation will fail unless the version on the server is an upgrade or patch that updates the currently installed version. In a real-life scenario, when you put updates on the server, they must be configured as upgrades or patches.

4. To restore the correct version information to the server, repeat step 1, except enter the original product version.

If this test is not successful, try to determine the problem.

See WiseUpdate Tips on page 94 and Troubleshooting WiseUpdate on page 95.

If you see the Web page you entered in the Alternate Web Page field on the WiseUpdate page, then there was a problem connecting to the host through HTTP, or the necessary files were not found on the host.

Options for Running WiseUpdate ClientWiseScript Package Editor only

Options on the WiseUpdate page determine how WiseUpdate Client (WiseUpdt.exe) is run on the destination computer.

Run Silently From a Shortcut on the Destination Computer

On the WiseUpdate page, mark the Add client to Startup group check box and enter a value in the Check Interval (days) field.

The installation adds a shortcut for WiseUpdate Client to the Startup group of the Windows Start menu on the destination computer.

When the destination computer is started or the end user logs on to Windows, WiseUpdate Client silently checks the time elapsed since it last ran. If the number of days elapsed is greater than the check interval value, WiseUpdate Client prompts the end user to check for updates.

Run From Your Application

On the WiseUpdate page, clear the Add client to Startup group check box. Entering a value in the Check Interval (days) field is optional.

Code your application to open the file WiseUpdt.exe from the application directory, in either of the following ways:

WiseScript Package Editor Reference 93

Page 94: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using WiseUpdate

Run WiseUpdate Client when the application is run.

To use the check interval value from the WiseUpdate page, run WiseUpdate Client with the /c command-line option. Then WiseUpdate Client silently checks the time elapsed since it last ran. If the number of days elapsed is greater than the check interval value, WiseUpdate Client prompts the end user to check for updates.

Add a menu command in your application to run WiseUpdate Client.

WiseUpdate TipsWiseScript Package Editor only

Can WiseUpdate be used with WebDeploy?

Yes. Make sure that update installations you release are formatted as upgrades (use the Upgrades page). You cannot use WebDeploy to run patch files (.MSP).

WebDeploy embeds connection information into the .EXE of the .MSI/.EXE pair, so that the .EXE can run the .MSI from a location on the Web. WiseUpdate provides for regular checking for updates initiated by the application on the destination computer. If you plan to put all compiled files in the same location on the Web, then specify the same directory on both the WebDeploy and WiseUpdate pages.

Because the .EXE of an .MSI/.EXE pair might contain optional runtimes (examples: Windows Installer or .NET runtimes), WiseUpdate always tries to open the .EXE, not the .MSI. Follow these guidelines:

The .EXE of the .MSI/.EXE pair must be located somewhere on the Web and must be accessible to WiseUpdate users. It cannot be distributed through email or other mechanisms.

On the WiseUpdate page, the connection information you enter must point to the location of the WiseUpdate update file on the Web server.

See WebDeploy on page 83.

Can WiseUpdate be used with SmartPatch?

Because WiseUpdate is meant to work for updates, you can easily use SmartPatch to create the updated version that end users download using WiseUpdate. That way end users only have to download the smaller patch file instead of the entire installer.

See SmartPatch on page 75.

Does WiseUpdate work if the Web location of the WiseUpdate update file changes?

No. Once you start using WiseUpdate, all subsequent versions of the WiseUpdate update file must be located in the same directory as the original. This is because the WiseUpdate Client that’s already on end user’s computers only knows to view the Web location you set when you originally configured it. Therefore, when you configure the WiseUpdate page for subsequent versions of the same application, make sure that the Host fields and the Update Filename field are the same as in the original version of the installation.

WiseScript Package Editor Reference 94

Page 95: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using WiseUpdate

Why are there two different fields that accept the product version?

During the WiseUpdate process, you encounter two different fields that require a product version. How are these fields related?

The Version field on the Product Details page sets the version for the application, and is used by Windows Installer to determine whether updates and patches are valid upgrades for the installed version.

The Product Version field on the WiseUpdate page sets the version in the registry of the destination computer, which WiseUpdate Client checks against the update file on the FTP server. It also sets the version that is stored in the WiseUpdate update file.

Typically, both fields should have the same version number, but you can change the versions to force upgrades.

Troubleshooting WiseUpdateWiseScript Package Editor only

If you encounter problems with WiseUpdate during testing or after deploying your application, check the following suggestions.

Use an FTP client to observe what files are the on the Web server and where they are located. Open the WiseUpdate update file that is located on the Web server and see if the referenced paths are valid.

WiseUpdate Client uses HTTP to connect to the Web server specified on the WiseUpdate page. You typically use the FTP protocol to upload the installation .EXE, an optional Readme file, and a WiseUpdate update file. Both operations access the same location on the same server. Therefore, both protocols must have access to the directory, and the host must be able to process both HTTP and FTP requests. Also, the Host Directory, the Host Username, and the Host Password might be different for using the FTP protocol than for using the HTTP protocol. This is because the Web server and the FTP server might have different alias and user information, but point to the same directory.

Updates for Windows Installer installations must be in the form of an upgrade or patch. If the end user has version 1.0.0 of your application installed, and you make some changes to it and upload it with a new version number, the WiseUpdate upgrade will fail unless you configured the updated package as an upgrade (using the Upgrades page) or a patch (using Patch Creation).

If end users cannot view the Readme file in WiseUpdate Client, make sure the Readme file does not have embedded graphics, which are not supported.

If the Associated Application Not Found dialog box appears when the WiseUpdate client is started, then you might not have entered a title in the Installation Title field on the Product Details page. Be sure to enter a installation title name when using WiseUpdate.

WiseScript Package Editor Reference 95

Page 96: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Chapter 6Using Script Editor

This chapter includes the following topics:

About Script Editor on page 96

The Script Editor Window on page 97

Types of Scripts on page 99

Adding an Action to a Script on page 101

Editing Scripts on page 101

About User-Defined Actions on page 103

Using the Debug Commands on page 108

Basic Scripting Concepts on page 111

About Script EditorNoteThis documentation covers both WiseScript Package Editor and WiseScript Editor. WiseScript Editor contains the same scripting interface as WiseScript Package Editor, but it does not contain the Installation Expert interface or other installation development tools. Therefore, some of the information in this document does not apply to WiseScript Editor.

All WiseScript products contain the Script Editor scripting environment. The Script Editor scripting environment consolidates numerous lines of code into predefined script actions. You don’t need to memorize commands because Script Editor supports a point-and-click method of scripting. The script you create is displayed in clear, English-like statements. You compile the script, along with files and other resources, into an .EXE. When the .EXE is run, the script runs, executing the actions that are specified in the script.

In WiseScript Package Editor, every installation is driven by a script that specifies how to display dialog boxes, edit the .INI files, add registry entries, and so on. The script provides another way of looking at the installation you create in Installation Expert. Script Editor lets you add advanced functionality to your installation and troubleshoot your script with the built-in debugger.

(WiseScript Package Editor only) If you create a new installation by selecting Empty Project on the New Installation File dialog box, Script Editor is populated with a default script in which the basic elements of an installation are already configured. If you create a new installation by selecting Blank Script on the New Installation File dialog box, Script Editor is empty. If you start from a blank script and then try to switch to Installation Expert, you see a warning that the script must be converted.

See Switching Between Installation Expert and Script Editor on page 15.

(WiseScript Package Editor only) Some lines in the script correspond to options on pages in Installation Expert because those options generate script lines. (Example: On the

WiseScript Package Editor Reference 96

Page 97: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

Product Details page, you enter InstallationName in the Installation Title field. The following line is generated in the script: Set Variable APPTITLE to InstallationName.)

The Script Editor WindowThe Script Editor window contains all the tools necessary to develop and edit WiseScripts. To access Script Editor, click Script Editor at the lower left of the main window.

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 box (the Initializing Wise Installation wizard dialog box), 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.

See Customizing the List of Actions on page 99.

Event and Language drop-down lists

Tabs for the main script and each include script or VBScript

Script list

Title

Actions list

Compile, Test, and RunView Navigation

WiseScript Package Editor Reference 97

Page 98: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

Language

From this drop-down list, you select a language for the WiseScript. This drop-down list includes all the languages that are supported in the installation. You specify the supported languages on the Languages page.

See Languages on page 60.

When you add a script line or custom dialog box 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 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 line you just added with a French translation of the message.)

Actions

The actions are arranged in groups under title bars. If you click the All Items title bar, it displays all the actions you can add to your script. The SVS Items group displays SVS specific actions, the Favorites group displays some of the most commonly used actions, while the Custom group is by default empty. You can also create your own action groups.

See Customizing the List of Actions on page 99.

Script List

This list contains the script that is executed when an end user runs the .EXE.

For information on working with scripts, see Adding an Action to a Script on page 101 and Editing Scripts on page 101.

Script lines are color-coded based on the type of the script line. The 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

In WiseScript Package Editor, you can change the color code in Preferences.

See Setting Preferences on page 23.

Script Tabs

A tab for the current installation script appears at the bottom of the installation script area. When you add an Include Script or VB Script action to the current installation script, a tab for that script appears next to the tab for the current installation script.

To show tabs for Wise include scripts, mark the Show Tabs for Wise Include Scripts check box in Preferences.

Script Line Numbering

To show or hide script line numbers, select View menu > Line Numbers.

WiseScript Package Editor Reference 98

Page 99: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

Connection lines connect the beginning and end of an If block or a loop. To show or hide connection lines, select View menu > Connection Lines.

Customizing the List of ActionsScript Editor contains four default action groups: All Items, SVS Items, Favorites, and Custom. You can add up to 10 additional groups and add any actions that appear in the All Items group to any other group. The All Items group contains all actions, and you cannot remove this group or any of its actions. You can remove any of the other groups and edit the actions that appear in the groups.

To add an action group

1. Right-click anywhere in the Actions list and select Add Group.

The Group Name dialog box appears.

2. Enter the name of the new group and click OK.

The Select Items for Group dialog box appears.

3. Select the actions to include in the group and click OK.

The new action group appears with the actions you selected.

To edit an action group

1. Click the title bar of the action group.

You cannot edit or remove the All Items group.

2. Right-click below the action group title bar and select Add/Remove Items.

The Select Items for Group dialog box appears.

3. Add, delete, or move group items and click OK.

You can customize the Actions list further by creating user-defined actions.

See About User-Defined Actions on page 103.

Types of ScriptsIn Script Editor, you can edit the following scripts:

Event Scripts

Event scripts handle events. (Example: The end user cancels the installation.) 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, 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.

WiseScript Package Editor Reference 99

Page 100: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

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 box here.

See Creating a User-Defined Action on page 104.

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 added to an installation with an Include Script action.

See Include Script on page 174.

Scripts can be included either in the main installation script or in other include scripts. At run time, include scripts are run when the Include Script action that references them is encountered. For each Include Script action in a script, a new tab appears at the bottom of the Installation Script pane.

In WiseScript Package Editor, mark the Show Tabs for Wise Include Scripts check box in Preferences to show tabs for Wise include scripts.

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.

(WiseScript Package Editor only) By default, all scripts based on the Empty Project template on the New Installation File dialog box contain two include scripts: rollback.wse and uninstal.wse. 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 back up 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.

VBScripts

VBScripts are added to an installation with an Execute VBScript action.

See Execute VBScript on page 159.

VBScripts can be included either in the main installation script or in include scripts. At run time, VBScripts are run when the Execute VBScript action that references them is encountered. For each Execute VBScript action in a WiseScript, a new tab appears at the bottom of the Installation Script pane. When you click this tab, a VBScript window appears.

See Editing a VBScript on page 160.

By adding VBScripts, you can greatly expand the functionality of WiseScripts because you can use all the scripting capabilities of VBScript (example: arrays and subfunctions). Adding VBScripts can also save you time because you can use scripts that others have created.

WiseScript Package Editor Reference 100

Page 101: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

Adding an Action to a Scriptin Script Editor, do any of the following:

From the Actions list in the left pane, drag an action onto a line in the Installation Script list in the right pane. The new action appears above the line that is highlighted when you drop the action.

Click in the script and double-click the action in the Actions list to place the new action above the line you clicked.

Click in the script 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. When the action you want is the current item in the list, press Enter.

Note(WiseScript Package Editor only) To insert lines below the line you selected, mark the Append New Items option in Preferences.

See Setting Preferences on page 23.

When you add an action, a dialog box appears that lets you set the parameters for the action unless it does not require parameters. When you add a Custom Dialog or Custom Billboard action, the appropriate editing environment opens.

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

Use the same methods to add an action to a VBScript.

See VBScript Actions on page 162.

Editing ScriptsTo edit a WiseScript in Script Editor, use the commands on the Edit menu, the commands on 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.

To edit an include script, select it by clicking its tab. Changes that you make to an include script are saved when you save the project.

To edit a VBScript, see Editing a VBScript on page 160.

Editing Script Action Parameters

Double-click the action in the script. For most script actions, a dialog box appears so you can configure its parameters. When you double-click a Custom Billboard or Custom Dialog action, the appropriate editing environment opens.

Copying and Pasting Script Lines

1. Select one or more script lines.

2. Select Edit menu > Cut or Copy.

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

WiseScript Package Editor Reference 101

Page 102: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

You cannot open multiple scripts in the same instance of WiseScript Package Editor unless it is an include script or VBScript. However, you can open multiple instances of WiseScript Package Editor, and open different scripts in each.

See Customizing the List of Actions on page 99.

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.

Duplicating or Moving Script Lines

1. Select one or more script lines.

2. Select Edit menu > Duplicate, or Edit menu > Move Up or Move Down.

Commenting 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 one or more lines.

2. Select Edit menu > Comment.

The commented out lines appear in green and begin with “/*”. To reactivate commented out lines, select the lines and select Edit menu > Comment.

Saving a Script to a Text File

This text file is for viewing and printing only. You cannot make changes in the text file and import it back into Script Editor.

1. Select File menu > Save Script Text to File.

2. Specify the location and name of the file.

Finding and Replacing Text in a Script

Not available in VBScripts.

1. In Script Editor, do one of the following:

To find text, press Ctrl+F to find text.

To find and replace text, press Ctrl+H.

2. Enter the text to find.

This function searches the visible text in the script lines as well as the parameters that are associated with the script lines.

3. (Replace function only) Enter the replacement text.

You can replace a command’s parameters and editable text, but not the command itself.

4. To search for the text across all WiseScripts, mark Search Across Include Scripts.

For information on include scripts, see Customizing the List of Actions on page 99.

5. Click Find Next, Replace, or Replace All.

WiseScript Package Editor Reference 102

Page 103: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

Checking for Duplicate Files in Include Scripts

WiseScript Package Editor only

In Script Editor, you can check WiseScripts 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.

If duplicate files are found, the Save As dialog box appears.

2. If the Save As dialog box appears, specify a name and location for the 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.

See also:

Include Script on page 174The Script Editor Window on page 97About Script Editor on page 96

About User-Defined ActionsYou can streamline your development process by creating your own script actions for tasks that you perform frequently.

Example: You have written a section of script that opens a Web page on your company’s Web site. Some of the script lines search the registry to determine the default browser on the destination computer, and other lines open the browser to the specified URL. To avoid having to copy and paste this section of script into new WiseScripts that you create, you can make it a user-defined action that will be available in all new WiseScripts that you develop.

User-defined actions appear in the Actions list in Script Editor along with the predefined script actions.

You create a user-defined action by creating a separate WiseScript and saving it in the Actions subdirectory of this product’s installation directory, or in the shared directory that is specified in Preferences.

See Creating a User-Defined Action on page 104.

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

Action Name

The file name of the script.

WiseScript Package Editor Reference 103

Page 104: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

Dialog Box

Include a dialog box only if your action has parameters that you must change each time you use the action. This dialog box appears when your action is double-clicked. Example: For an action that opens a URL in the in the destination computer’s browser, you might include a dialog box 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 in the destination computer’s browser, the script lines determine the default browser and opens 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 define the format.

See also:

Creating a User-Defined Action: Tutorial on page 105Adding an Action to a Script on page 101

Creating a User-Defined ActionThis procedure describes 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 parts of the user-defined action.

For an example of how to complete these details, see Creating a User-Defined Action: Tutorial on page 105.

To create a user-defined action

1. Select File menu > New.

2. (WiseScript Package Editor only) Select Blank Script and click OK.

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

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

a. From the Event drop-down list in Script Editor, select Exit.

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

See About the Custom Dialog Editor on page 202.

NoteTo add a drop-down list on your custom dialog box 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.

4. From Event, select Mainline.

The main script reappears.

WiseScript Package Editor Reference 104

Page 105: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

5. Add script lines that perform the function 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 an advanced function.

6. In Title, enter a combination of text and variables to define the format of the script line.

Example: Your user-defined action displays an HTML file on the Web. In your action, a dialog box 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 box appears and you enter www.sample.com/support.htm for the URL. The script line for your user-defined action appears in the format you specified, except that it shows the variable’s value instead of the variable name. It displays: Display HTML File www.sample.com/support.htm.

7. Save the script file in the Actions subdirectory of this product’s installation directory, or in the shared directory that is specified in Preferences.

Your new action does not appear in the appears in the Actions list in Script Editor until you close and re-open WiseScript Package Editor.

8. Test the new user-defined action:

a. Close WiseScript Package Editor.

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

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

d. 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 box in which you can specify how many milliseconds to pause the installation.

To create a new blank script for the action

1. Select File menu > New.

The New Installation File dialog box appears.

2. Select Blank Script and click OK.

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

3. Select File menu > Save.

The Save As dialog box appears.

4. Save the script file in the Actions subdirectory of this product’s installation directory, or in the shared directory that is specified in Preferences. Name the file Wait.

Your new action appears in the Actions list in Script Editor after you close and re-open WiseScript Package Editor.

WiseScript Package Editor Reference 105

Page 106: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

To create a dialog box 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 box 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 box appears.

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

The Custom Dialog Editor opens.

4. Click on the toolbar.

The Text Control Settings dialog box appears.

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

6. Click on the toolbar.

The Edit Text Control Settings dialog box appears.

7. Enter the following on the dialog box and click OK.

In Default, enter %WAIT_TIME%.

In Variable, enter WAIT_TIME.

8. Click on the toolbar.

The Push Button Control Settings dialog box appears.

9. Enter the following on the dialog box and click OK.

In Label, enter OK

Mark the Return to Previous Dialog action.

Mark Default Button.

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

The Push Button Control Settings dialog box appears.

11. Enter the following on the dialog box and click OK.

In Label, enter Cancel.

Mark the Abort Installation action.

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

WiseScript Package Editor Reference 106

Page 107: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

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

To create a script for the action

For the Wait action, you write a very simple script. The script calls kernel32.dll, a Windows system .DLL that contains a function that stops execution of the current application for the specified number of milliseconds. To learn more about calling Windows system .DLLs, see the Microsoft Developer Network (msdn.microsoft.com).

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

The script should be blank.

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

The Call DLL Function dialog box appears.

3. Complete the dialog box:

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

5. Click OK on the Call DLL Function dialog box.

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

This determines how the script line looks in the script.

7. Save the script.

It should already be named Wait.wse and should be in the Actions subdirectory of this product’s installation directory, or in the shared directory that is specified in Preferences.

To test the action

1. Close WiseScript Package Editor.

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

An empty project contains a default script in Script Editor.

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

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

The dialog box 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:

WiseScript Package Editor Reference 107

Page 108: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

Wait 9000 Milliseconds

9000 milliseconds equals nine seconds.

6. Save the script.

7. Click Test to test your script.

After the blue screen appears, there should be a nine-second delay before the Welcome dialog box 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 view 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.

See also:

About User-Defined Actions on page 103

Using the Debug CommandsWiseScript Package Editor only

You can test a script by using the Test or Run buttons on the navigation bar, or by using the more flexible capabilities of the Script Editor debug commands. The Debug menu in Script Editor has a set of debug commands that let you step through your script to make sure it functions properly or run to a breakpoint to view the script and the values of variables.

When you use Debug menu in the VBScript window, it tests only the VBScript, not the entire script.

See Debugging a VBScript on page 161.

You can also use Display Message and Compiler Variable actions to generate a debug version when you compile.

See Building a Debug Version on page 109.

To use the debug commands

1. Select Debug menu and select a command.

GoBegin debugging. It runs the installation .EXE and a yellow arrow appears next to your first line of script. Also use it to proceed to the next breakpoint.

Set BreakpointSet a breakpoint at the selected action. A breakpoint is a place in the script that temporarily halts execution. A red dot marks each breakpoint.

Single StepStep through the script and execute only the script action with the arrow next to it.

Stop DebuggingExit the installation and resume normal Script Editor operation.

WiseScript Package Editor Reference 108

Page 109: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

2. Edit the script errors as they occur rather than waiting for the installation to finish. Do this by double-clicking the script action or by using any of the other methods for changing a script that are available in Script Editor.

See About Script Editor on page 96.

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

Building a Debug Version

WiseScript Package Editor only

You can use a compiler variable to build two 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 installation .EXE at compile time. Each time you compile the installation, you are asked whether to create a debug version. If you choose not to create a debug version, the script actions you place inside the Compiler Variable If block are not included in the installation .EXE

To build a debug version of an installation

1. Select Installation Expert > Compiler Variables page.

2. Click Add.

The Compiler Variable Settings dialog box appears.

3. Complete the dialog box:

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

Debug group.

WiseScript Package Editor Reference 109

Page 110: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

Variable NameEnter _DEBUG_

Default ValueEnter NO

DescriptionEnter “Compile debug version of this installation?”

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.

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

6. Select Script 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 If

In If Variable, enter _DEBUG_.

Select Equals from the drop-down list.

In The Value, enter YES.

Display Message

In Message Title, enter Main Directory.

In Message Text enter The Main Directory is %MAINDIR%.

Compiler Variable End

The following lines should appear 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 message asks if you want to compile debug version.

8. Mark YES and click Next.

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

See also:

WiseScript Package Editor Reference 110

Page 111: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

Using the Debug Commands on page 108

Basic Scripting ConceptsIf you do not have a basic understanding of scripting concepts, you should become familiar with them before trying to write a WiseScript.

See:

About Script Editor on page 96Conditions and Loops on page 111Variables and Expressions on page 112Compiler Variables and Run-time Variables on page 113Anatomy of an Installation Script on page 114About Components on page 115

Conditions 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 called conditions and loops.

Conditions 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 the version of Windows they’re running.

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 two 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 conditions and loops is marked using the End action. Script Editor indents everything inside a condition or loop so you can see which actions are affected.

Else and ElseIf Actions

Conditions can use the Else and ElseIf actions, which mark the beginning of actions to be executed when the condition described by the If action (or other condition statement) is not true. The Else action is used 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 condition or loop can contain another condition or loop. This is called nesting. You define a nested condition or loop by adding a second If or While action (or other start-of-condition or start-of-loop marker) before the End action of the first condition 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

WiseScript Package Editor Reference 111

Page 112: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

action that does not already have an End action. You can nest conditions and loops to many levels, but in most circumstances it won’t be necessary to nest more than three or four levels deep. The indentation, which increases for each nested structure, helps you interpret deep nestings.

Connection Lines

Connection lines connect the beginning and end of conditions or loops. To add connection lines, select View menu > Connections Lines.

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 sources. You can define up to 986 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.

(WiseScript Package Editor only) Some variables are defined by Installation Expert. Example: The WIN variable contains the path to the Windows system directory.

Variable Naming Conventions

Must begin with a letter.

Must be 28 characters or less.

Cannot begin with an underscore character; only compiler variables can start with an underscore character.

Cannot contain % characters, except when using substitution as described below.

Variables and Substitution

By using variables, the installation .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 % character 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 % character in the 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 % characters. (Example: When you use an If, ElseIf, While, Set

WiseScript Package Editor Reference 112

Page 113: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

Variable, or a Wizard Loop action to evaluate an expression, do not surround the variables you reference in the expression with %.)

Do surround compiler variables with % characters no matter where you enter them.

Some 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 253.

To read about sample scripts that use expressions, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory and find scripts that manipulate strings and perform calculations.

Compiler Variables and Run-time Variables

When They Are Set

WiseScript uses two kinds of variables: compiler and run-time. When you start 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. Script 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 installation .EXE.

Run-time variables are set by selections the end user makes on the installation’s dialog boxes, by characteristics of their computer, or by the contents of files on their hard disk (example: a settings file, an .INI file, or the registry).

The difference between compiler variables and run-time 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 run time.

In Conditions and Expressions

You can use both types of variables in variable substitution. However, they have distinctly different behaviors when used in conditions 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 condition based on run-time variables, all the script actions required by the condition are included in the installation .EXE. WiseScript Package Editor doesn’t know which part of the condition will be executed until the installation .EXE is run because it depends on variables whose values are not known until run time. The values of compiler variables, on the other hand, are known when the installation .EXE is built. Therefore, WiseScript Package Editor does not include the script actions inside a compiler variable condition when building the installation .EXE.

Naming Compiler Variables

By convention, the names of compiler variables begin and end with an underscore. WiseScript does not enforce this convention, but it might help you keep track of which variables are known at compile time and which are known only at run time.

WiseScript Package Editor Reference 113

Page 114: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

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 installation .EXE if the condition is false.

See Compiler Variables on page 44.

Example: You can create a script that compiles an installation .EXE for either a 16-bit or 32-bit version of your application based on the value of a compiler variable and includes 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 installation .EXE, making it smaller than a universal installation for both 16-bit 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 run-time variable values and other useful information at various points in the installation. By enclosing your debugging actions in compiler variable conditions, you can easily remove them when the installation has been debugged by changing the value of a compiler variable. The debugging actions are not compiled into the final build.

See Building a Debug Version on page 109.

When to Use

Variable substitution can use either type of variable.

When a script action places a value into a variable, use a run-time variable. Compiler variables can’t be changed by scripts, but only by the person who builds the installation .EXE.

In most other instances, the type of variable to use is implicit (example: the Compiler If script action requires a compiler variable) or is noted explicitly.

Anatomy of an Installation ScriptAn installation script has four basic sections. Whether you are modifying the default script that is generated by Installation Expert or writing your own script, 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 are displayed to the end user (ReadMe.txt, License.txt, etc.) are installed. A search can also be performed for a previous version of an application to use its location as the default installation directory.

User Input

This section contains a series of dialog boxes that ask the end user what optional components to install, what directory to install the files in, and so on. This section generally uses a Wizard Loop action. It displays any ReadMe or License files that are installed in the Initialization section.

File Copy

This is the longest section of the installation script. Files are copied from the installation .EXE to the destination computer.

WiseScript Package Editor Reference 114

Page 115: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Using Script Editor

System Configuration

After files are installed, the destination computer’s configuration files (.INI files, registry, Start menu, etc.) are updated so that the new application works correctly. The end user might then be prompted to restart their computer.

About Components

WiseScript Package Editor only

When an end user selects to install one or more optional components, a letter corresponding to each component is placed in a variable named 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 dialog boxes that are created by Installation Expert place the correct values in the COMPONENTS variable. You also can use the Select Components script action or a custom dialog box to accomplish the same result.

In the installation script, use condition statements of the form “If COMPONENTS contains ‘A’” to determine which files are installed when each component is selected. Script Editor scans the script, looking for these conditions to determine how much disk space is required by each optional component. You must use the variable COMPONENTS and the proper condition format for this feature to work.

The sample script Subcomp.wse is an example of a components-based installation script. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

See also:

Basic Scripting Concepts on page 111

WiseScript Package Editor Reference 115

Page 116: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Chapter 7WiseScript Actions

This chapter includes the following topics:

About WiseScript Actions on page 119

About SVS Script Actions on page 119

Activate SVS Layer on page 121

Add Directory to PATH on page 121

Add File to SVS Layer on page 121

Add Text to INSTALL.LOG on page 122

Add to AUTOEXEC.BAT on page 123

Add to CONFIG.SYS on page 124

Add to SYSTEM.INI on page 125

Browse for Directory on page 126

Call DLL Function on page 126

Capture Application to SVS Layer on page 131

Change SVS Layer GUID on page 132

Check Configuration on page 132

Check Disk Space on page 133

Check HTTP Connection on page 135

Check If File/Dir Exists on page 136

Check In-use File on page 137

Check Service on page 137

Compiler Variable Actions on page 138

Config ODBC Data Source on page 139

Copy Local File(s) on page 139

Create Directory on page 142

Create Directory in SVS Layer on page 142

Create Service on page 143

Create Shortcut on page 144

Create Shortcut in SVS Layer on page 145

Create SVS Layer on page 146

Create Virtual Directory on page 147

Custom Billboard on page 147

WiseScript Package Editor Reference 116

Page 117: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Custom Dialog on page 147

Deactivate SVS Layer on page 147

Delete File from SVS Layer on page 148

Delete File(s) on page 148

Delete SVS Layer on page 149

Display Billboard on page 149

Display Message on page 151

Display Progress Message on page 151

Display Text File on page 152

Edit INI File on page 152

Edit Registry on page 153

Edit Registry for SVS Layer on page 156

Else Statement on page 157

ElseIf Statement on page 157

End Statement on page 158

Evaluate Windows Installer Condition on page 158

Execute Program on page 158

Execute VBScript on page 159

Exit Installation on page 164

Export SVS Layer on page 164

Find File in Path on page 165

Find First SVS Layer on page 166

Find Next SVS Layer on page 166

Find SVS Layer GUID on page 166

Get Environment Variable on page 167

Get Name/Serial Number on page 167

Get Registry Key Value on page 168

Get SVS Layer Info on page 168

Get System Information on page 169

Get Temporary Filename on page 171

Get Windows Installer Property on page 172

Halt Compilation on page 172

If Statement on page 172

Import SVS Layer on page 173

Include Script on page 174

Initialize SVS on page 174

WiseScript Package Editor Reference 117

Page 118: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Insert Line Into Text File on page 175

Install File(s) on page 176

Install SVS Package on page 178

Install Windows Mobile Application on page 181

Install WiseUpdate Client on page 179

Modify Component Size on page 182

Open/Close Install.log on page 182

Parse String on page 183

Pause on page 184

Play Multimedia File on page 184

Post to HTTP Server on page 185

Prompt for Filename on page 185

Prompt for Text on page 186

Radio Button Dialog on page 187

Read INI Value on page 187

Read/Update Text File on page 188

Read/Write Binary File on page 189

Reboot System on page 189

Register Font on page 190

Remark on page 190

Remove SVS Exclude Entry on page 190

Rename File or Directory in SVS Layer on page 191

Rename File/Directory on page 191

Rename SVS Layer on page 192

Search for File on page 193

Self-Register OCXs/DLLs on page 193

Set Activate SVS Layer on Startup on page 194

Set Control Attributes on page 194

Set Control Text on page 195

Set Current Control on page 195

Set File Attributes on page 196

Set Files/Buffers on page 196

Set SVS Exclude Entry on page 197

Set Variable on page 197

Set Web Permissions on page 198

Set Windows Installer Property on page 199

WiseScript Package Editor Reference 118

Page 119: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Start/Stop Service on page 199

While Statement on page 200

Win32 System Directory on page 201

Wizard Loop on page 201

About WiseScript ActionsThe WiseScript™ scripting language 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.

All possible WiseScript actions are available in all WiseScript-based editors. This lets you open any WiseScript in any WiseScript-based editor without errors. However, a WiseScript will run only in an environment that supports all the actions in the script. Example: The “Get Windows Installer Property” action will not work in a script that runs outside a Windows Installer installation.

See also:

About Script Editor on page 96About SVS Script Actions on page 119

Note

This documentation covers both WiseScript Package Editor and WiseScript Editor. WiseScript Editor contains the same scripting interface as WiseScript Package Editor, but it does not contain the Installation Expert interface or other installation development tools. Therefore, some of the information in this document does not apply to WiseScript Editor.

About SVS Script ActionsScript Editor has a set of script actions that you can use to manage, edit, find, and create virtual software layers. Each of these script actions has SVS (Software Virtualization Solution) in its name. For your convenience, these script actions are grouped by default under the SVS Items title bar.For information about SVS, see http://juice.altiris.com/svs.

NoteIf you create or edit a Virtual Software Package (VSP) in Virtual Package Editor, you would normally not use the SVS script actions when you add WiseScripts on the Events page. Instead, you would use the non-SVS script actions because you are working directly in a layer or in a package that becomes a layer.

Script Actions for Managing a Layer

Use these script actions to change the state of layers, gather information about layers, create archive files from layers, and install and remove layers.

Activate SVS Layer

Deactivate SVS Layer

WiseScript Package Editor Reference 119

Page 120: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Delete SVS Layer

Export SVS Layer

Get SVS Layer Info

Import SVS Layer

Install SVS Package

Set Activate SVS Layer on Start

Script Actions for Editing a Layer

Use these script actions to edit the files, registry keys, directories, name, or GUID of a layer. These script actions make changes to the read-only sublayer so they are not lost when the layer is reset. The exception is the Delete File from SVS Layer action that makes changes to the writeable sublayer.

The Remove SVS Exclude Entry and Set SVS Exclude Entry actions set or remove an exclude entry for a single layer or for all layers on a computer.

Add File to SVS Layer

Capture Application to SVS Layer

Change SVS Layer GUID

Create Directory in SVS Layer

Create Shortcut in SVS Layer

Delete File from SVS Layer

Edit Registry in SVS Layer

Remove SVS Exclude Entry

Rename File or Directory in SVS Layer

Rename SVS Layer

Set SVS Exclude Entry

Script Actions for Finding a Layer

Use these script actions to find a layer’s GUID. You then store the value of the GUID in a variable and use this variable in the SVS script actions that manage or update a layer. Use the find first and find next actions to iterate through all the layers on a computer.

Find First SVS Layer

Find Next SVS Layer

Find SVS Layer GUID

Script Action for Creating a Layer

Use the Create SVS Layer script action to create an empty layer. You can then use the Capture Application to SVS script action to add an application to the layer, or use other SVS script actions to add directories, files, registry keys, and shortcuts to the layer.

WiseScript Package Editor Reference 120

Page 121: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Script Action for Initializing SVS

The Initialize SVS script action initializes the SVS Driver (Altiris Software Virtualization Agent) so that you can communicate with it. It is part of all of the SVS specific actions. If you create a user-defined, SVS-specific action, begin the action with this action.

Also see the article Using WiseScripts to Manage and Update Virtual Software Packages in the Altiris Knowledgebase (article 27373).

Activate SVS LayerThis SVS script action activates a virtual software layer.

To complete the dialog box

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

See also:

About SVS Script Actions on page 119

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 restarts at the end of installation so that the new PATH takes effect.

To complete the dialog box

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 File to SVS LayerThis SVS script action adds a file to a virtual software layer. This can be an existing layer or a layer that the WiseScript creates. The file is added to the read-only sublayer.

NoteUse this action on a deactivated SVS layer only.

WiseScript Package Editor Reference 121

Page 122: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

Source pathSpecify the complete path and file name of the source file to add. You can use WiseScript variables.

Layer pathEnter the complete path in the layer to which the file will be added. The path must include the file name. When you add the file, you can change its name. You can use SVS variables or WiseScript variables that resolve to a valid SVS path. Example: [PROGRAMFILES]\Application\Readme.txt.

See SVS Variables on page 250.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

See also:

About SVS Script Actions on page 119

Add Text to INSTALL.LOGThis action adds commands to the installation log (Install.log).

(WiseScript Package Editor only) Use the Installation Log page to control the creation and location of the installation log. By default, it is created in the application directory (MAINDIR). See Installation Log on page 59.

(WiseScript Editor) Use the Open/Close Install.log action to create the installation log.

See Open/Close Install.log on page 182.

As the installation runs on the destination computer, each action it performs is logged in the installation 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.

Because the log is written continuously during installation, the location of the text in the log depends on where in the script you place the Add Text to Install.log script line.

NoteWhen a WiseScript is called by a Windows Installer installation, the Windows Installer installation does not recognize changes that the WiseScript makes to the destination computer and will not uninstall them. Therefore, you must provide a way to uninstall or repair such changes. See Uninstalling Changes Made by a WiseScript in the Windows Installer Editor Help.

WiseScript Package Editor Reference 122

Page 123: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

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:

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 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\WiseRegDB Root: 2

where RegDB Root is one of the following:

0 - HKEY_CLASSES_ROOT1 - HKEY_CURRENT_USER2 - HKEY_LOCAL_MACHINE3 - HKEY_USERS

NoteIn WiseScript Package Editor, you also can specify uninstall actions on the Uninstall page.

Add to AUTOEXEC.BATThis action edits Autoexec.bat, which is executed during startup, 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.

WiseScript Package Editor Reference 123

Page 124: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

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

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

Case SensitiveMark this to match case.

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

See also:

Autoexec.bat on page 38

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.

To complete the dialog box

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

WiseScript Package Editor Reference 124

Page 125: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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

See also:

Config.sys on page 46

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

To complete the dialog box

Device NameEnter the full command line for the device (example: device=vshare.386). The referenced files need a path 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 path, the old entry is commented out and the new entry is added.

WiseScript Package Editor Reference 125

Page 126: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Browse for DirectoryThis action displays a dialog box asking the end user to select a directory. It is included to provide backward compatibility for older WiseScripts. In new scripts, use custom dialog boxes instead.

To complete the dialog box

Window NameEnter the title for the dialog box.

DescriptionEnter text to explain the dialog box 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 have 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.

When a WiseScript is called by a Windows Installer installation, you can also call a .DLL by using one of the Call Custom DLL or Call DLL actions in MSI Script in Windows Installer Editor.

To complete the dialog box

DLL PathnameSpecify the path 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%.

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.

WiseScript Package Editor Reference 126

Page 127: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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.

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 check box 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.

Returned VariableSelect or enter a variable to store the returned value.

WiseScript Package Editor Reference 127

Page 128: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Get Last Error VariableWhen you call a Windows API function that uses the GetLastError() function to report errors, select a variable to hold the return value of that function. Doing so ensures that GetLastError() is called immediately following your function to prevent problems that can occur when you debug the WiseScript.

Keep DLL loaded in memory after returning from functionBy default, the Call DLL Function action loads a .DLL, calls a function in that .DLL, and then unloads the .DLL. If you call many functions from a certain .DLL, then the unload is unnecessary and can cause problems with certain .DLLs. To leave this .DLL loaded, check this check box.

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.

For help with .DLL development, review sample source code, such as GETCPU32.C, in the DLL subdirectory of this product’s installation directory. Also included is sample source code for C and Delphi .DLLs written for WiseScript.

Calling Visual Basic ActiveX controls is not supported.

The sample scripts Application kill.wse, CheckDiskSpace.wse, Color.wse, and Prompt.wse use this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

DLL Parameter SettingsThe DLL Parameter Settings dialog box 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.

To complete the dialog box

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

WiseScript Package Editor Reference 128

Page 129: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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 on page 130

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%).

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)

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

WiseScript Package Editor Reference 129

Page 130: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

NoteWiseScript Package 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 Package Editor. Because future versions of WiseScript Package Editor might not support this API, it is 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 5 KB of stack space for 16-bit .DLL functions you call, and 100 KB 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 ExampleYou can use a Call DLL Function to call a .DLL. In 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). For each parameter, you select a passing type. For non-structure parameters, select Normal from Passing Type in the DLL Parameter Settings dialog box. 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 three parameters: a structure that contains three elements, an integer, and another structure that contains two 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;

}

WiseScript Package Editor Reference 130

Page 131: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To call the function NewEmployee from an installation script, you add six parameters in the Call DLL Function dialog box: the three elements of the first structure, the integer, and the two elements of the second structure.

To add parameters, see DLL Parameter Settings on page 128.

Capture Application to SVS LayerThis SVS script action captures an application to a virtual software layer. You can use this script action to update a layer by adding the files that are installed by an .EXE. (Example: If you have a layer for Microsoft Word, you could create a WiseScript that installs Word templates. You could use the Capture Application to SVS Layer script action to capture the templates installed by the WiseScript .EXE and to add these templates to the Word layer.)

You can add an application to an existing layer or to a layer that the WiseScript creates.

See Create SVS Layer on page 146.

When a WiseScript that contains this script action runs, it runs the .EXE you specify and captures its installation. You can use this script action to capture an .MSI by running msiexec.exe.

To complete the dialog box

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

Program pathSpecify the path and file name of the .EXE. When the WiseScript runs, it executes the .EXE and captures whatever it installs. To capture an .MSI, enter the path to msiexec.exe. You can use WiseScript variables.

Parameter in the C function Parameter type in WiseScript

Passing Type in WiseScript

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

WiseScript Package Editor Reference 131

Page 132: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Parameters(Optional) Enter parameters for running the .EXE. If you specified .msiexec.exe in Program path, use Windows Installer command-line options. You can use these command-line options to create a WiseScript that captures an application by performing a silent installation of an .MSI. Example: /package “C:\Application.msi” /qn.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

See also:

About SVS Script Actions on page 119

Change SVS Layer GUIDThis SVS script action changes a layer’s GUID.

Example: You can use this action to create a copy of a layer that is seen by SVS as a different layer. This is similar to changing the ProductCode and PackageCode of an .MSI file. To create a copy of a layer, create a script that imports an archive file, changes the layer’s GUID, and then exports a copy of the original archive file.

To complete the dialog box

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

New Layer GUIDEnter a new GUID for the layer or a variable that represents the new GUID. If you enter a new GUID, do not include the { } brackets.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

See also:

About SVS Script Actions on page 119

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.

When a WiseScript is called by a Windows Installer installation, you can also check graphics by using the System Requirements page in Windows Installer Editor.

WiseScript Package Editor Reference 132

Page 133: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

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 XP, this action returns TRUE if Windows XP or later 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 box.

Message TextAppears in the body of the message dialog box. Leave this blank to prevent a message from appearing.

NoteChecking for “Share Loaded” opens a temporary file and tries to lock a section of it. It detects all versions of DOS SHARE, Windows VSHARE, Windows NT/2000/XP/2003/Vista, and Windows 95/98. Checking for “VGA or better” graphics ensures that display resolution is at least 640x480. Checking for free memory tests the amount of memory (including virtual memory) available at installation time.

The sample script CheckVGA.wse uses this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Check Disk SpaceThis action determines if enough disk space is available for the installation, based on files that are always installed. In WiseScript Package Editor, this can also include optional components the end user selects to install. You would use this action only if the WiseScript contains Install File(s) actions that install files permanently on the destination computer. If you add components on the Components page, the Files page shows an Always Installed folder and other component folders.

NoteWhen a WiseScript is used in a Windows Installer installation, an alternative to using the Check Disk Space action is to determine how much disk space the WiseScript .EXE requires, and putting that figure in the ReserveCost table in the Windows Installer database. This works best when all files are always installed. See ReserveCost Table in the Windows Installer SDK Help.

WiseScript Package Editor Reference 133

Page 134: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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.

To complete the dialog box

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

If a WiseScript installs files based on whether a component in the .MSI is set to be installed, specify the name of the variable that contains the list of components that are set to be installed.

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 three 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 182.

Do not cancel during silent installationMark this to continue installing if the disk space check fails during a silent installation. If you script includes an installation log, a message is written to Install.log. Otherwise, if the disk space check fails, the installation is halted with no message to the end user.

For information on how to create an installation log, see Open/Close Install.log on page 182.

Using Check Disk Space Within a Windows Installer Installation

When a WiseScript is called by a Windows Installer installation, the Check Disk Space action only checks disk space for files installed by this WiseScript. In other words, the WiseScript .EXE and the Windows Installer installation are unaware of each other’s disk space requirements. To avoid erroneous disk space estimates by either the WiseScript .EXE or the Windows Installer installation, place the Run WiseScript custom action before CostInitialize or after InstallFinalize in the Windows Installer installation. That way it does not interfere with Windows Installer disk space requirements. Place it in the User Interface sequence, the Execute Immediate sequence, or both.

If the installation of files by the WiseScript does not depend on which .MSI components are installed, you can insert the Check Disk Space action and leave the fields in the Check Disk Space Settings dialog box blank. However, if the WiseScript installs files based on whether a component in the .MSI is set to be installed, you must set a component variable and specify it in the Check Disk Space Settings dialog box.

WiseScript Package Editor Reference 134

Page 135: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Example:

Your .MSI installation contains two features: Standard and Plus. If the end user chooses to install Plus, which installs the component Plus.txt, you want the WiseScript to install the license file PlusLicense.exe.

Here’s how you create this portion of the WiseScript:

Add an Evaluate Windows Installer Condition action that determines whether the Plus feature is to be installed ($Plus.exe = 3) and places the result into the variable CHECK.

Add an If Statement action that determines if the variable CHECK equals 1, that is, if it is to be installed, and add a Set Variable action that then sets the variable COMPONENTS to the value Plus.exe.

Insert a Check Disk Space action and, in the Check Disk Space Settings dialog box, enter COMPONENTS in the Component Variable field.

Add an If Statement action that determines if the variable COMPONENTS equals Plus.exe, and then use an Install File(s) action to install the license file.

The script would look like this:

Evaluate Windows Installer Condition "$Plus.exe=3" into CHECK

If CHECK equals "1" then

Set Variable COMPONENTS to Plus.exe (Append)

End

Check free disk space

If COMPONENTS Contains "Plus.exe" then

Install File C:\Installation Files\PlusLicense.exe to %MAINDIR%\PlusLicense.exe

End

Check HTTP ConnectionThis action determines whether a given URL is valid by using WinSock.dll to try to download the HTML page.

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 try the download. A sample of the return string is:

ProxyServer=ProxyIgnore=ProxyPort=80ProxyType=CERNWinInetText=WinInetError=0

WiseScript Package Editor Reference 135

Page 136: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

WinSockError=11001

This indicates that no proxy server was used and that WinSock returned the error code 11001.

NoteIf the Web server redirects URLs that are not valid to another internal Web page, no error is detected by this action.

To complete the dialog box

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.

To complete the dialog box

IfSelect the condition to check. To check if a .DLL is loaded, select Module loaded in memory.

Pathname

To check a file or directory, enter its path. 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 path. To check if a .DLL is loaded in a specific directory, include the full path.

Example: To determine if any User32.dll is loaded, just specify user32.dll. To determine if c:\Windows\System32\User32.dll is loaded specify the full path.

TitleEnter the title for the dialog box.

Message TextAppears in the body of the message dialog box. 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.

WiseScript Package Editor Reference 136

Page 137: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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 check box is cleared, the loop is executed if the condition is true, but is not executed if the condition is false.

The sample script Newdisk.wse uses this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

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.

To complete the dialog box

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 path of the file to check. You can use variables to build the path.

Check ServiceThis action checks if a particular service is running.

To complete the dialog box

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.

WiseScript Package Editor Reference 137

Page 138: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Compiler Variable ActionsCompiler Variable If, Else, and End actions are used in an If block to let you compile different versions of an installation. You set the value of a compiler variable at compile time, and the actions inside a compiler variable If block are added to the script according to the value of the compiler variable

You create compiler variables on the Compiler Variables page. When you create a compiler variable, you specify its default value. You also specify when you should be prompted for a compiler variable value.

See Compiler Variables on page 44.

Example:

On the Compiler Variable page, create a compiler variable named _DEBUG_ with a default value of “N”.

Mark the Compiling From Within Wise option.

In the installation script, add a Compiler Variable If action that checks if _DEBUG_ equals “Y”.

Below the Compiler Variable If action, add an Add Text to INSTALL.LOG action that contains useful debug information.

End the If block with a Compiler Variable End action.

When you compile, you are prompted for the value of this compiler variable. Change it to “Y”.

The Add Text to INSTALL.LOG action within the Compiler Variable If block is added to the final script. The debug information you requested then appears in the installation log.

To create a compiler variable If block

1. Add a Compiler Variable If action and complete the dialog box:

If VariableBuild an If statement by selecting a compiler variable and a comparison. The first list shows compiler variables on the Compiler Variables page. The second list shows available comparisons.

The ValueEnter the value to be used in the comparison. This is case-sensitive. Do not enter variables in this field, because it checks your computer in real time, not run time.

If you selected File Exists above, the If statement checks to see if the file that you enter in The Value exists. If you selected File Version Equal or Greater, enter the file in The Value.

2. Below the Compiler Variable If action, add one or more actions to perform if the compiler variable has the specified value.

3. (Optional) Add a Compiler Variable Else action, followed by one or more actions to perform if the compiler variable does not have the specified value.

4. Add a Compiler Variable End action.

The sample script Compvar.wse uses this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

WiseScript Package Editor Reference 138

Page 139: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

See also:

Building a Debug Version on page 109Compiler Variables and Run-time Variables on page 113

Config ODBC Data SourceThis action configures an ODBC data source for use with an existing ODBC (Open Database Connectivity) driver.

To complete the dialog box

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.

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 dialog boxes to the end user. Otherwise, the data source is configured with default settings.

System DSNMark this check box to make the data source available to all user accounts on the destination computer.

See also:

ODBC on page 62

Copy Local File(s)This action copies uncompressed files from a floppy disk, CD, the destination computer, or a network drive. In WiseScript Package Editor, it also can copy files from an FTP or HTTP server.

NoteWhen a WiseScript is called by a Windows Installer installation, the Windows Installer installation does not recognize changes that the WiseScript makes to the destination computer and will not uninstall them. Therefore, you must provide a way to uninstall or repair such changes. See Uninstalling Changes Made by a WiseScript in the Windows Installer Editor Help.

WiseScript Package Editor Reference 139

Page 140: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

SourceSpecify the path 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:\My Pictures\*.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.

Note(WiseScript Package Editor only) If you are copying from an FTP or HTTP server, you cannot use wildcards.

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 Password(WiseScript Package Editor only)

If you entered a password on the 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, 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.

WiseScript Package Editor Reference 140

Page 141: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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

Don’t Convert to Floppy(WiseScript Package Editor only)

If you marked Convert CD-ROM to Floppy on the 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.

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 check box.

The sample script FTPCopy.wse uses this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

WiseScript Package Editor Reference 141

Page 142: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Create DirectoryDirectories are created when files are installed to them. Use this action only to create an empty directory on the destination computer.

When a WiseScript is called by a Windows Installer installation, you also can create a directory on the Features or Components tabs of Setup Editor in Windows Installer Editor.

NoteWhen a WiseScript is called by a Windows Installer installation, the Windows Installer installation does not recognize changes that the WiseScript makes to the destination computer and will not uninstall them. Therefore, you must provide a way to uninstall or repair such changes. See Uninstalling Changes Made by a WiseScript in the Windows Installer Editor Help.

To complete the dialog box

PathnameEnter the directory path to create. Start the path with a variable (example: %MAINDIR%).

Create Directory in SVS LayerThis SVS script action creates a directory in a virtual software layer. You can create a directory in an existing layer or in the layer that the WiseScript creates. The directory is added to the read-only sublayer.

NoteUse this action on a deactivated SVS layer only.

To complete the dialog box

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

Path to createEnter the full path of the directory to create. You can use SVS variables or WiseScript variables that resolve to a valid SVS path.

See SVS Variables on page 250.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

See also:

About SVS Script Actions on page 119

WiseScript Package Editor Reference 142

Page 143: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Create ServiceThis action installs a Windows service on operating systems where they are supported.

When a WiseScript is called by a Windows Installer installation, you also can create a service on the Features or Components tabs of Setup Editor in Windows Installer Editor.

NoteWhen a WiseScript is called by a Windows Installer installation, the Windows Installer installation does not recognize changes that the WiseScript makes to the destination computer and will not uninstall them. Therefore, you must provide a way to uninstall or repair such changes. See Uninstalling Changes Made by a WiseScript in the Windows Installer Editor Help.

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 starting the last known good configuration, startup continues. Otherwise, it restarts with the last known good configuration.

Critical ErrorLogs the error if possible. If the computer is starting the last known good configuration, startup fails. Otherwise, it restarts with 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.

WiseScript Package Editor Reference 143

Page 144: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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.

See also:

Services on page 72

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%).

When a WiseScript is called by a Windows Installer installation, you also can create a shortcut on the Features or Components tabs of Setup Editor in Windows Installer Editor.

NoteWhen a WiseScript is called by a Windows Installer installation, the Windows Installer installation does not recognize changes that the WiseScript makes to the destination computer and will not uninstall them. Therefore, you must provide a way to uninstall or repair such changes. See Uninstalling Changes Made by a WiseScript in the Windows Installer Editor Help.

To complete the dialog box

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 running 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 box.

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

WiseScript Package Editor Reference 144

Page 145: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Window SizeSelect an option to determine the appearance of the .EXE file’s window.

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 box in Windows Explorer. 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 opened(WiseScript Package Editor only) If you configured the installation for self-repair., mark this to turn on self-repair functionality for this shortcut. Typically, use this for a shortcut that starts the application.

See Using Self-Repair on page 28.

See also:

Shortcuts on page 74

Create Shortcut in SVS LayerThis SVS script action creates a shortcut in the virtual software layer. The shortcut can reference a program outside the layer. Common locations for shortcuts include the Start menu, the Startup directory, the installation directory, and the desktop.

NoteUse this action on a deactivated SVS layer only.

To complete the dialog box

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

Shortcut NameEnter the name to appear on the shortcut.

Source PathSpecify the path of a file that will be installed on the destination computer. You can only use an SVS variable to reference a program inside the layer. If you use a variable, start the path with a variable (example: [PROGRAMFILES]\Application.EXE) and do not enclose it in quotation marks.

SVS Destination PathEnter the path to the shortcut to be created (example: [DESKTOP]\). For the current user’s desktop, Start menu, or Startup directory, use [DESKTOP], [STARTMENU], or [STARTUP]. For the All Users equivalents, use [COMMONDESKTOP], [COMMONSTARTMENU], or [COMMONSTARTUP].

WiseScript Package Editor Reference 145

Page 146: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Arguments(Optional) If the shortcut is for an .EXE, enter command-line options.

Default DirectorySpecify the default directory that should be set when running the target file, if different from the target file’s location. In Windows Explorer, this field is referred to as the Start in directory. You an SVS path unless the shortcut references a program outside the layer.

DescriptionEnter text to appear in the Comment field of the shortcut’s properties dialog box.

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

Icon Number Enter the number of the icon to use from the file specified in Icon Pathname above. You an SVS path unless the shortcut references a program outside the layer.

Window StyleSelect an option to determine the appearance of the .EXE file’s window.

Hot key shift state and Hot key letterThese fields together populate the Shortcut Key field in the shortcut’s Properties dialog box in Windows Explorer. See Windows help.

See also:

About SVS Script Actions on page 119

Create SVS LayerThis SVS script action creates an empty virtual software layer. You can then use the Capture Application to SVS script action to add an application to the layer, or use other SVS script actions to add directories, files, registry keys, and shortcuts to the layer.

The action creates a layer that requires a licensed version of the SVS Driver on the destination computer.

This script action can create a variable for the layer’s GUID. You can use this variable in most of the other SVS script actions to identify the layer in the Layer GUID field.

To complete the dialog box

Layer nameEnter the name for the layer.

GUID variable (Optional) Enter a name for a variable in which to place the layer’s GUID.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

See also:

About SVS Script Actions on page 119

WiseScript Package Editor Reference 146

Page 147: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Create Virtual DirectoryThis script action creates a new IIS Web site or virtual directory. To set permissions for this Web site, also use the Set Web Permissions script action.

See Set Web Permissions on page 198.

To complete the dialog box

Computer nameEnter the name of the computer where the virtual directory is to be created.

Web site nameEnter the name of a new or existing Web site.

Virtual directory nameEnter a name for the new virtual directory.

Virtual directory pathEnter the path for the virtual directory on the destination computer.

Custom BillboardThis action opens the Custom Billboard Editor, which lets you create scalable graphics to display to end users during installation.

See About Billboards on page 231.

Custom DialogUse this action to create your own dialog box or dialog box set. See About Dialog Boxes on page 202. To add a new dialog box within a wizard loop, see Adding a Dialog Box to the Installation on page 203.

For details on the Dialog Box Properties dialog box, see Setting Dialog Box Properties on page 205.

For details on sample scripts that use this action, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Deactivate SVS LayerThis SVS script action deactivates a virtual software layer.

To complete the dialog box

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

WiseScript Package Editor Reference 147

Page 148: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Force running processes to terminate(Optional) Mark this to force all processes that are associated with the layer to terminate when the layer is deactivated.

See also:

About SVS Script Actions on page 119

Delete File from SVS LayerThis SVS script action deletes a file from a virtual software layer. This adds the file to the delete entries list so that it doesn’t appear when the layer is activated. If you reset the layer, the file is restored because the deletion entry is in the writeable sublayer of the delete entries.

See Delete Entries Page in the Virtual Package Editor Help.

NoteUse this action on a deactivated SVS layer only.

To complete the dialog box

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

File pathEnter the path and file name of the file to delete. You can use SVS variables or WiseScript variables that resolve to a valid SVS path.

See SVS Variables on page 250.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

See also:

About SVS Script Actions on page 119

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 are deleted automatically.

To complete the dialog box

PathnameSpecify the directories or files to delete. For example, %TEMP%\Application.dll or %MAINDIR%\*.htm. You cannot perform wildcard deletions in the Windows, System, or root directories.

WiseScript Package Editor Reference 148

Page 149: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Click Browse to display and select files in the current WiseScript that are installed into the %MAINDIR%, %SYS32%, %SYS%, OR %FONTS% directories. When you select a path in the Browse for File dialog box, you must select a file.

Include Sub-DirectoriesIf you entered the path 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.

If you mark this check box and Include Sub-Directories, and you do not include a file in the path, then all other empty subdirectories are deleted also. To prevent deletion of the other subdirectories, add a trailing backslash to the path. For example,

%MAINDIR%\Help\ deletes the Help directory if it is empty.

%MAINDIR%\Help deletes the Help directory if it is empty and also deletes all other empty subdirectories of %MAINDIR%.

Delete SVS LayerThis SVS script action deletes an installed virtual software layer.

To complete the dialog box

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

See also:

About SVS Script Actions on page 119

Display BillboardWiseScript Package Editor only

This action displays a bitmap or .GRF file during installation if you have set the background to display a gradient on the Screen page. Create .GRF files (scalable bitmaps) with the Custom Billboard Editor.

See About Billboards on page 231.

You can use up to 16 Display Billboard actions in the script.

WiseScript Package Editor Reference 149

Page 150: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

PathnameSpecify the full path to the graphic 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 graphics. 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 graphic is displayed. To display one graphic at a time, set this to 1. To display all graphics simultaneously, set this to 0. The oldest graphic is removed first.

Build EffectSelect a transition effect.

TransparentMark this to have pure blue (R=0, G=0, B=255) parts of the graphic become transparent.

Center Horizontal

Place at Right

Scale to ScreenMark this for the graphic to cover the same percentage of the screen regardless of screen size.

Hide Progress BarMark this to hide the progress bar during graphic display.

Center Vertical

Place at Bottom

Tile BackgroundMark this to repeat the graphic edge-to-edge to fill the entire screen.

Erase AllMark this to remove all previous graphics from the screen before displaying the new one.

Timed DisplayMark this 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 graphic 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.

See also:

Billboards on page 39

WiseScript Package Editor Reference 150

Page 151: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Display MessageThis action displays a message dialog box and can optionally branch the script based on the end user response. Without the branching option, this dialog box has an OK button, which continues, and a Cancel button, which halts installation.

To complete the dialog box

Message TitleEnter the title for the dialog box.

Message TextThis is displayed in the dialog box. 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 box.

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.

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

The sample scripts CheckDiskSpace.wse and Search.wse use this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Display Progress MessageThis action displays a small dialog box during installation, typically to indicate the computer is still working during a long operation. The dialog box cannot be closed or cancelled. Also use this action to remove a previous progress dialog box.

To complete the dialog box

Remove previous progress message(s)Mark this to remove the previous progress dialog box from the screen. Marking this disables the rest of this dialog box. To display another progress message, add another Display Progress Message action.

Display a new progress message

Message TitleEnter the title for the dialog box.

Message TextEnter text to display in the dialog box. You can use variables in this text.

WiseScript Package Editor Reference 151

Page 152: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

X-Position, Y-PositionIn pixels, enter the location of the upper-left corner of the dialog box.

Height, WidthIn pixels, enter the dimensions of the dialog box.

Center HorizontallyMark this check box to override the X-Position field.

Center VerticallyMark this check box to override the Y-Position field.

Display Text FileThis action displays a 30 K or smaller text file in a dialog box. It is included to provide backward compatibility for older WiseScripts.

In WiseScript Package Editor, use the ReadMe dialog box on the Dialogs page to display the ReadMe file in new scripts.

To complete the dialog box

File PathnameSpecify a file on the destination computer (examples: %MAINDIR%\Readme.txt, %TEMP%\%TEMPFILENAME%).

Window TitleEnter the title for the dialog box.

DescriptionEnter text to explain the dialog box to the end user.

Edit INI FileThis action edits an .INI file on the destination computer. To edit SYSTEM.INI, use the Add to SYSTEM.INI action instead.

When a WiseScript is called by a Windows Installer installation, you also can edit an .INI file on the Features or Components tabs of Setup Editor in Windows Installer Editor.

NoteWhen a WiseScript is called by a Windows Installer installation, the Windows Installer installation does not recognize changes that the WiseScript makes to the destination computer and will not uninstall them. Therefore, you must provide a way to uninstall or repair such changes. See Uninstalling Changes Made by a WiseScript in the Windows Installer Editor Help.

To complete the dialog box

FileEnter the .INI file path, 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:

WiseScript Package Editor Reference 152

Page 153: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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

See also:

INI Files on page 57

Edit RegistryThis action adds, edits, or deletes registry keys or values. You can create registry entries manually or import a registry file (.REG).

In WiseScript Package Editor, use the Registry page to copy registry settings from your computer’s registry.

When a WiseScript is called by a Windows Installer installation, you also can edit the registry on the Features or Components tabs of Setup Editor in Windows Installer Editor.

NoteWhen a WiseScript is called by a Windows Installer installation, the Windows Installer installation does not recognize changes that the WiseScript makes to the destination computer and will not uninstall them. Therefore, you must provide a way to uninstall or repair such changes. See Uninstalling Changes Made by a WiseScript in the Windows Installer Editor Help.

To complete the dialog box

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 box appears, where you enter information about the new key.

See Registry Key Settings Dialog Box on page 154.

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.

WiseScript Package Editor Reference 153

Page 154: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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

New ValueTo add a new value, select the parent key in Registry Keys, then click the New Value button. A dialog box appears, where you enter information about the new value.

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

Data SettingsThese fields in this section of the dialog box correspond to fields you set when creating the value.

See Registry Key Settings Dialog Box on page 154.

The sample script RunOnce.wse uses this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

See also:

Registry on page 66

Registry Key Settings Dialog BoxThis dialog box appears when you double-click the Edit Registry action and create or edit a registry key on the Edit Registry Settings dialog box.

When a WiseScript is called by a Windows Installer installation, you also can create or edit registry entries by using the Registry page.

To complete the dialog box

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. This option is not available with the Edit Registry for SVS Layer script action.

WiseScript Package Editor Reference 154

Page 155: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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 paths. (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 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 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.

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 missing(WiseScript Package Editor only) Self-repair prevents an application from failing if this registry value has accidentally been deleted. Mark this check box to start self-repair if this registry value is missing when the application starts. 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 Using Self-Repair on page 28.

WiseScript Package Editor Reference 155

Page 156: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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 check box. This option is unavailable unless Multiple Strings is selected in the Data Type drop-down list.

Edit Registry for SVS LayerThis action adds, edits, or deletes registry keys or values in an SVS Layer. You can create registry entries manually or import a registry file (.REG).

NoteUse this action on a deactivated SVS layer only.

To complete the dialog box

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 box appears, where you enter information about the new key.

See Registry Key Settings Dialog Box on page 154.

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

New ValueTo add a new value, select the parent key in Registry Keys, then click the New Value button. A dialog box appears, where you enter information about the new value.

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

Data SettingsThese fields in this section of the dialog box correspond to fields you set when creating the value.

WiseScript Package Editor Reference 156

Page 157: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

See Registry Key Settings Dialog Box on page 154.

SVS Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

See also:

About SVS Script Actions on page 119

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 Actions list inserts it directly into the script with no further dialog boxes or prompts.

See also:

If Statement on page 172

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.

To complete the dialog box

If VariableSelect a variable from the first drop-down list, and a comparison method from the second drop-down list.

Expression True means the expression in the Value field below is evaluated according to the conventions for WiseScript expressions.

See Variables and Expressions on page 112.

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 that is entered on the Passwords page.

(The password comparisons are applicable in WiseScript Package Editor only.)

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.

See also:

If Statement on page 172

WiseScript Package Editor Reference 157

Page 158: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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 dialog boxes or prompts.

NoteThis is different from the End Statement action that is in MSI Script in a Windows Installer installation.

See also:

If Statement on page 172

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.

To complete the dialog box

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.

See also:

Get Windows Installer Property on page 172Set Windows Installer Property on page 199

Execute ProgramThis action runs another .EXE. The .EXE can be a file that is already installed on the destination computer, a file you installed as part of the installation, or a file you provide on a separate disk.

When a WiseScript is called by a Windows Installer installation, you can also use the Execute Program custom actions in MSI Script in Windows Installer Editor.

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 check box.

WiseScript Package Editor Reference 158

Page 159: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

.EXE PathSpecify the full path to the program to run, including the program file name. Example: %MAINDIR%\Application.exe

Command LineEnter any command-line options to apply to the .EXE when it runs, as if you were typing them in the Run dialog box.

Default DirectorySpecify the directory that should be current when the .EXE file is executed. The installation performs the equivalent of a Change Directory command (cd) before running the .EXE. Click Browse and select a directory from your installation. You can select from directories that you created using the Create Directory action.

See Create Directory on page 142.

In WiseScript Package Editor, you can select from directories that you created on the Files page.

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 ExitMark this to stop the installation while this program runs. The installation does not resume until the program exits. Be sure to mark this if the .EXE returns a value to the script. If the installation does not wait for the .EXE to exit, add the command-line option -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 starts.

The sample scripts FTPCopy.wse and Newdisk.wse use this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Execute VBScriptThis action lets you execute VBScripts from within a WiseScript. This greatly expands the functionality of WiseScripts because you can use all the scripting capabilities of VBScript (example: arrays and subfunctions). Adding VBScripts can also save you time because you can use scripts that others have created.

For each VBScript action in a script, a new tab appears at the bottom of the Installation Script pane. When you click this tab, the VBScript window appears. In this window, you can create and edit the VBScript. The window is similar to a WiseScript window, but has functionality that is appropriate only for a VBScript.

See Editing a VBScript on page 160.

WiseScript Package Editor Reference 159

Page 160: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

The WiseScript and VBScript interact so you can set a variable in either script and then use that variable in the other script. The VBScript window also has an action to facilitate the calling of COM objects.

See VBScript Actions on page 162.

WarningYou should be familiar with VBScript to use this feature.

To complete the dialog box

VB Script PathSpecify the full path to a .VBS file including the file name. To create a new .VBS file, specify its full path including the file name and click Yes when prompted to create a new file. You can use compiler variables in the path.

Command LineIf the VBscript requires a command line, enter it here. A command line is probably required if:

The VBScript required a command line when it ran stand-alone.

The WScript object with the Arguments property (WScript.Arguments) is in the VBScript.

NoteIf a VBScript has a command line, you cannot debug the script from the VBScript window.

See Debugging a VBScript on page 161.

You can use WiseScript variables in the command line. The sample script MakeWebDir.wse uses WiseScript variables in the command line to let the end user specify the name and location of a virtual directory that the script creates. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Editing a VBScriptWhen you use the Execute VBScript action in a WiseScript, a new tab appears at the bottom of the Installation Script pane. When you click this tab, the VBScript window appears. In this window, you can create and edit the VBScript. The window is similar to a WiseScript window, but has functionality that is appropriate only for a VBScript.

To edit a VBScript in Script Editor, use the following:

Actions in the Actions pane.

See VBScript Actions on page 162.

Buttons and drop-down list at the top of the Installation Script pane.

Right-click menu.

Any options on the Edit menu that are enabled.

To debug the VBScript, see Debugging a VBScript on page 161.

WiseScript Package Editor Reference 160

Page 161: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Display Options

Use the buttons and drop-down list at the top of the Installation Script pane to display different portions of the VBScript.

Right-Click Menu Options

List ObjectsDisplays a drop-down list of predefined objects and, when possible, objects that are called in the script.

For details on when called objects appear in this drop-down list, see VBScript Actions on page 162.

List Properties/MethodsDisplays, when possible, a drop-down list of the properties and methods of an object when the cursor is on that object’s property or method. This drop-down list also appears as a pop-up when you enter the object’s name followed by a period.

For details on when this list appears for an object, see VBScript Actions on page 162.

List FunctionsDisplays a list of VBScript functions. For help on VBScript functions, see the MSDN Library (msdn.microsoft.com/library/).

Quick InfoDisplays help text, when possible, for a selected item. This help text can also appear as a pop-up. Example: when you select an item in a drop-down list.

Check SyntaxChecks the script for basic syntax and displays a Syntax Error message. A syntax error message also appear as a pop-up when a syntax error is detected.

Revert to SavedReverts the current script to the last saved version, to undo any changes you made since you last saved.

Debugging a VBScriptWhen you use the Execute VBScript action in a WiseScript, a new tab appears at the bottom of the Installation Script pane. When you click this tab, the VBScript window appears.

When you work in the VBScript window, you can use the Debug menu to test just the VBScript and not the entire WiseScript.

If a VBScript has a command line, you cannot debug the script from the VBScript window. You must switch to the WiseScript window and debug the entire WiseScript. The script then runs with the command line.

Event View Click this button and select a method from the drop-down list to display one method at a time.

Full Module View Click this button to display the entire script. When you select a method from the drop-down list, the script opens to that method.

WiseScript Package Editor Reference 161

Page 162: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

For details on adding a command line, see Execute VBScript on page 159.

See also:

Using the Debug Commands on page 108

VBScript ActionsWhen you use the Execute VBScript action in a WiseScript, a new tab appears at the bottom of the Installation Script pane. When you click this tab, the VBScript window appears. The VBScript window has three actions that facilitate the creation of the VB script.

Add an action to a VBScript in the same ways that you add an action to a WiseScript.

See Adding an Action to a Script on page 101.

Call COM Object

Use this action to create a script to call a COM object in the VBScript. You can manually enter the script to call a COM object, but the Call COM Object action facilitates this process by providing information about the COM objects. If the object is registered on your computer, this action can provide the following functionality:

The object appears in the List Objects drop-down list that is accessed from the right-click menu.

The object has a List Properties/Methods drop-down that lists the exposed properties and methods of that object. Example: This drop-down list appears when you enter the object’s name followed by a period.

A help pop-up is associated with the object and its properties and methods. This pop-up displays help text for these items when they are selected in a drop-down list or when you select Quick Info from the right-click menu.

When you call an object in a VBScript, the object persists between the execution of that script and any other VBScripts that are executed by the same WiseScript. (Example: If the WiseScript executes two VBScripts and the first VBScript calls an object, you do not need to create the object in the second script to access its properties and methods.) However, if you create an object in one editor window you will not automatically see its properties and methods in a second window even though they will execute properly.

See Calling a COM Object in a VBScript on page 163

Get WiseScript Variable

Use this action to create script code that gets a WiseScript variable. You must set the variable in the WiseScript or another VBScript prior to the Execute VBScript action.

See Set Variable on page 197.

In the VBScript, you put the name of the variable in the Get Variable function that appears when you double-click this action. This action uses the VBScript GetVariable function.

The sample script SetGetVariable.wse uses the Get WiseScript Variable action in its VBScript to get a variable that is set in the WiseScript. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

WiseScript Package Editor Reference 162

Page 163: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Set WiseScript Variable

Use this action to create a script that sets a variable in the VBScript that can be used in the WiseScript. You must also set the variable in the WiseScript prior to the Execute VBScript action, but the VBScript determines the value of the variable.

See Set Variable on page 197.

To use the variable in the WiseScript, you must place the variable after the Execute VBScript action. This action uses the VBScript SetVariable function.

The sample script SetGetVariable.wse uses the Set WiseScript Variable action in its VBScript and then uses this variable in the WiseScript. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Calling a COM Object in a VBScriptWhen you use the Execute VBScript action in a WiseScript, a new tab appears at the bottom of the Installation Script pane. When you click this tab, the VBScript window appears. In the VBScript, you can call a COM object and then use the functions and properties that are exposed by this object.

To call a COM object in a VBScript

1. Use the Execute VBScript action to add a VBScript to the WiseScript.

See Execute VBScript on page 159.

2. Click the tab for the VBScript that appears at the bottom of the Installation Script pane.

The VBScript window appears.

3. Add a Call COM Object action.

The Call COM Object dialog box appears. The only required fields on this dialog box are Creatable Object ProgID and Variable name. The other fields help you identify an object’s ProgID.

NoteThe Call COM Object dialog box only facilitates calling a COM object, it does not guarantee that the information it accesses on your computer is correct.

4. To use TypeLib information to identify the object, click Select.

The Browse Typelib Information dialog box appears. It lists TypLib information for all the objects registered on your computer.

5. Do one of the following:

For an object that is registered on your computer, select the TypeLib information for the object.

For an object that is not registered on your computer, click Browse and locate the file that contains the TypeLib information. TypeLib information for an unregistered object does not help you identify the object’s ProgID, but it does display a list of objects in the Objects field for the file you selected. This information might help you identify the correct object.

The Call COM Object dialog box reappears.

WiseScript Package Editor Reference 163

Page 164: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

6. If the desired object does not appear in the Object field, select it from the drop-down list.

If a registered object has a ProgID, it will appear in Creatable Object ProgID. If an object does not have a ProgID, you can not call that object. A ProgID consists of the name of the application providing the object, followed by a period and the type or class of the object. If an object is not registered, you must enter its ProgID in Creatable Object ProgID.

7. In Variable name, enter a name for this object.

You use this name in the VBScript to access it methods and properties.

8. Click OK.

The script to call the selected object appears in the VBScript.

Exit InstallationThis action exits the installation.

In WiseScript Package Editor, it calls the Exit script. The Exit script is accessible in the Event drop-down list in Script Editor.

No message appears unless you also set the RESTART variable.

See Automatic Run-time Variables on page 246.

NoteWhen a WiseScript is called by a Windows Installer installation, this does not exit the MSI installation. It only exits the WiseScript .EXE.

To complete the dialog box

Application Exit CodeIf this script 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 Run-time Variables on page 248.

Install Status MIF(WiseScript Package Editor only) This section is available only if you have entered Status MIF information on the Microsoft SMS page.

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.

Export SVS LayerThis SVS script action exports a virtual software layer from the Altiris SVS applet as a virtual software archive (.VSA) file. The .VSA file is portable file that you can deploy to other computers. The layer must be deactivated before it can be exported.

WiseScript Package Editor Reference 164

Page 165: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

Archive pathEnter the path and file name to which the archive file is to be exported. This directory must already exist. You can use WiseScript variables.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

Overwrite archive file if it already existsMark this to overwrite the archive file if it already exists.

See also:

About the Altiris SVS Applet in the Virtual Package Editor Help About SVS Script Actions on page 119

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.

To complete the dialog box

File NameEnter just the file name, not a full path. Wildcard characters (*, ?) are not allowed.

Variable NameEnter a variable in which to store the path of the file if it is found. If the file is not found, this variable stores the Default Value specified below.

Default ValueEnter a value to 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 found, 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. If this field is blank, only directories in the PATH environment variable are searched.

Remove File NameMark this to remove the file name from the end of a returned path, leaving only the directory name. This operation is not performed on the Default Value.

WiseScript Package Editor Reference 165

Page 166: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Find First SVS LayerThis SVS script action starts a search for a virtual software layer on the destination computer. To find additional layers, use this script action with the Find Next SVS Layer script action.

See Find Next SVS Layer on page 166.

To complete the dialog box

Layer GUID VariableEnter a name for a variable in which to place the layer’s GUID.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

See also:

About SVS Script Actions on page 119

Find Next SVS LayerThis SVS script action finds the next virtual software layer on the destination computer after the Find First SVS Layer script action finds the first layer. To find additional layers, repeat this script action.

See Find First SVS Layer on page 166.

To complete the dialog box

Layer GUID VariableEnter a name for a variable in which to place the layer’s GUID.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

See also:

About SVS Script Actions on page 119

Find SVS Layer GUIDThis SVS script action finds the GUID of a virtual software layer and creates a variable for this GUID. You can use this variable in most of the other SVS script actions to identify the layer in the Layer GUID field.

To complete the dialog box

Layer nameEnter the name of the layer.

GUID variable Enter a name for a variable in which to place the layer’s GUID.

WiseScript Package Editor Reference 166

Page 167: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

See also:

About SVS Script Actions on page 119

Get Environment VariableThis action puts the value of a Windows environment variable into a WiseScript variable.

To complete the dialog box

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 path, 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.

Get Name/Serial NumberThis action displays a dialog box 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 box on the Dialogs page (WiseScript Package Editor only).

To complete the dialog box

TitleEnter the title for the dialog box.

DescriptionEnter text to explain the dialog box to the end user.

Name PromptEnter text to appear next to the Name field.

CompanyEnter text to appear next to the Company field.

WiseScript Package Editor Reference 167

Page 168: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Serial NumberEnter text to appear next to the Serial Number field.

VariableIn the three 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 box to confirm registration. If this is blank, no confirmation dialog box appears.

See also:

Dialogs on page 48

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.

To complete the dialog box

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.

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 path, 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.

The sample script URL.wse uses this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Get SVS Layer InfoThis action retrieves information about an SVS layer on the destination computer and puts that information into different variables.

To complete the dialog box

Specify the layer’s GUID and select or enter a variable name in each field whose information you want to gather. Leave the other fields empty.

WiseScript Package Editor Reference 168

Page 169: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

Active VariableIf the layer is deactivated, 1 is placed in this variable. If the layer is activated, 2 is placed in this variable.

Active On Start VariableIf the layer is deactivated when the computer starts, 1 is placed in this variable. If the layer is activated when the computer starts, 2 is placed in this variable.

Layer Name VariableThe name of the layer as it appears in the Altiris SVS applet is placed in this variable.

Layer Type VariableIf the layer is read-only, 0 is placed in the variable. If the layer is writeable (peer layer), 1 is placed in the variable. If the layer is a data layer, 2 is placed in the variable.

Peer GUID VariableThe GUID of the writeable layer that is associated with this layer is placed in this variable.

Reg Path VariableThe path to the registry key where layer attributes are stored is placed in this variable. These attributes include information such as the layer’s name and GUID.

File Redir Path VariableThe file redirect path where the layer’s files are stored is placed in this variable.

Reg Redir Path VariableThe registry redirect path where the layer’s registry keys are stored is placed in this variable.

Creation, Activate, and Reset Time VariablesThe time the layer was created, activated, or reset is placed in these variables. The time is reported as the number of seconds since midnight (00:00:00), January 1, 1970.

See also:

About SVS Script Actions on page 119

Get System InformationThis action retrieves information about the destination computer and puts it into a variable.

WiseScript Package Editor Reference 169

Page 170: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

Variable NameSpecify the variable in which to store the retrieved value.

RetrieveSelect the information to retrieve:

Current Date/TimeThe time is in 24-hour format. Example: 07/14/05 11:18:10

Windows VersionExample: 5.0.2195 (Windows 2000 Professional)

DOS VersionExample: 6.22

K Bytes Physical MemoryThe amount of physical RAM.

File Date/Time ModifiedThe time and date on which the file that is specified in Pathname was modified.

File Version NumberThe version of the file that is 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 box.

Registered Company NameThe company name entered when Windows was installed. This is used to pre-fill the Branding / Registration dialog box.

Drive Type for PathnameThe type of drive of the file or directory that is specified in Pathname: N (network), H (hard disk), C (CD-ROM), F (floppy or removable disk), R (RAM disk).

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 path of the destination computer.

Installer EXE PathnameThe path, including the file name, of the installation currently executing.

File Size (Bytes)The size of the file that is specified in Pathname.

Volume Serial NumberThe serial number of the disk drive that is specified in Pathname.

WiseScript Package Editor Reference 170

Page 171: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Volume LabelThe label of the disk drive that is 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 (four-digit year)Same as Current Date/Time above except a different format. Example: 07/14/2005 11:18:10

File Date/Time Modified (four-digit year)Same as File Date/Time Modified above except a different format. Example: 07/14/2005 11:18:10

Disk Free Space (KBytes)Free disk space of the drive that is specified in Pathname. In Pathname, enter a drive (C:\) or a path (%MAINDIR%\Readme.txt). If you enter a path, it returns the free space on the drive that the path refers to. You can enter a UNC path such as \\Server_Name\Apps\Cat.exe.

Current Date/Time (Regional settings)The date and time specified by the destination computer’s regional settings.

UTC File Date/Time ModifiedSame as File Date/Time Modified above except in Coordinated Universal Time (UTC) format. Coordinated Universal Time is an international time standard, in which all time zones are computed relative to UTC. Example: in the United States, Central Standard Time (CST) is six hours earlier than UTC time—10:00 UTC is 4:00 CST.

Is OS 64 BitThe value of the variable you specified above is set to 1 if the destination computer is running a 64-bit operating system, and 0 if not.

PathnameUse this field only for operations that retrieve information on files or directories. Specify the full path of the file or directory to retrieve information from. You can use variables (example: %MAINDIR%\Readme.txt). You also can enter a hardcoded path (example: C:\Program Files\File.exe) but it is not recommended.

The sample script Autoplay.wse uses this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

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 that you create using this file name are deleted when the installation finishes. Example: Use this to install a .DLL that is called during installation, and is then no longer needed.

WiseScript Package Editor Reference 171

Page 172: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

VariableSpecify a variable in which 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.

To complete the dialog box

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.

See also:

Set Windows Installer Property on page 199Evaluate Windows Installer Condition on page 158

Halt CompilationThis action immediately stops 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 ensure that conditions are met before compiling.

To complete the dialog box

Message TextEnter a message to display to the user if the compile is stopped.

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.

WiseScript Package Editor Reference 172

Page 173: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

NoteThis is different from the If Statement action that is in MSI Script in a Windows Installer installation.

To create an If block

1. Add an If Statement and complete the dialog box:

If VariableSelect a variable from the first drop-down list, and a comparison method from the second drop-down list.

Expression True means the expression in the Value field below is evaluated according to the rules outlined in Variables and Expressions on page 112. The variable is ignored and can be left blank. The result is considered true if it evaluates to a non-zero result.

(The password comparisons are applicable in WiseScript Package Editor only.)

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, do not surround them with percent signs (%). If you enter compiler variables, then you must surround them with percent signs.

2. Below the If Statement, add one or more actions to perform if the variable has the specified value.

3. (Optional) Add an Else or several ElseIf actions. Follow the Else action with one or more actions to perform if the compiler variable does not have the specified value.

4. Add an End Statement.

Sample scripts that use this action are Search.wse, WiseUp.wse, and scripts that manipulate strings and perform calculations. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

See also:

Else Statement on page 157ElseIf Statement on page 157End Statement on page 158

Import SVS LayerThis SVS script action imports a virtual software archive file (.VSA) into an SVS layer. To activate the layer after importing it, use the Activate SVS Layer script action.

To complete the dialog box

Archive pathSpecify the path and file name for the archive file. You can use WiseScript variables.

GUID variable(Optional) Enter a name for a variable in which to place the layer’s GUID.

WiseScript Package Editor Reference 173

Page 174: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

Overwrite layer if it already existsMark this option to overwrite the layer if it already exists.

See also:

Activate SVS Layer on page 121About the Altiris SVS Applet in the Virtual Package Editor Help About SVS Script Actions on page 119

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 box. 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 the script window.

In WiseScript Package Editor, select Edit menu > Duplicate Files Report to determine if files are duplicated in an installation because of an include script.

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 two wizard loops, two of every dialog box, and so on. Only the script is inserted into the calling script.

Any configuration in Installation Expert is ignored, including compiler variables that are defined on the Compiler Variables page.

To complete the dialog box

PathnameSpecify the path 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 run time, do not use a run-time 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

Initialize SVSThis action initializes the SVS Driver (Altiris Software Virtualization Agent) so that you can communicate with it. It takes no parameters, and selecting it from the Action list

WiseScript Package Editor Reference 174

Page 175: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

inserts it directly into the script with no further dialog boxes or prompts. It is included in all of the SVS-specific actions. If you create a user-defined SVS-specific action, begin the action with this action.

See also:

About SVS Script Actions on page 119

Insert Line Into Text FileThis action edits a text file on the destination computer. 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.

To complete the dialog box

File to EditSpecify the path of the text file to edit (example: %SYS32%\File.txt).

Text to InsertEnter the text 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 text. Enter 0 to append to the end of the file. Information in the Search for Existing Text area overrides any line number that is 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 comment to insert at the beginning of the found line. When replacing an existing line, use this to leave the existing line in place but inactive. Set Insert Action to insert before the existing line so that 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 the 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 text file before editing it. A number is appended to the end of the file name for the backup copies (example: text.001, text.002, and so on).

WiseScript Package Editor Reference 175

Page 176: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

The sample scripts Add Tnsnames entry.wse and TextFile.wse use this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

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.

In WiseScript Package Editor, it is easiest to use Installation Expert to add most files, and to use Script Editor to add or edit a few Install File(s) lines.

NoteWhen a WiseScript is called by a Windows Installer installation, the Windows Installer installation does not recognize changes that the WiseScript makes to the destination computer and will not uninstall them. Therefore, you must provide a way to uninstall or repair such changes. See Uninstalling Changes Made by a WiseScript in the Windows Installer Editor Help.

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

The results from an Install File(s) action are put into a variable, INSTALL_RESULT.

See its description in Automatic Run-time Variables on page 246.

To complete the dialog box

Source PathnameSpecify the path 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 run-time variables, because this field is used at compile time.

Destination PathnameSpecify the path the file will have on the destination computer. Use variables to start the path (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 Password(WiseScript Package Editor only)

If you entered a password on the 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.

WiseScript Package Editor Reference 176

Page 177: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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

Do Not Download With WebDeploy(WiseScript Package Editor only) This check box is available if you marked 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 check box to put the file in the installation .EXE rather than storing it as a separate file.

Repair application if this file is missing(WiseScript Package Editor only) Mark this to start self-repair if this file is missing when the application starts. This prevents your application from failing if this file is accidently deleted.

For information on setting up self-repair, see Using Self-Repair on page 28.

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

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.

WiseScript Package Editor Reference 177

Page 178: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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 check box.

Existing File Pathname(WiseScript Package Editor only) You can use SmartPatch to create a patch file that contains only the differences between the older installation and the new installation.

If you are using Smartpatch, specify the path 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.

See also:

Files on page 51

Install SVS PackageWiseScript Package Editor only

This action installs a Virtual Software Package (VSP) on a destination computer. You can use this action to create a WiseScript that installs any number of VSPs.

The computer on which this action runs must have a licensed version of the SVS Driver (Altiris Software Virtualization Agent).

This action references a VSP that is in the virtual software project file (.WVP) format. You create .WVP files in Virtual Package Editor. When this action runs on a destination computer, it imports a .VSA file into an SVS layer.

See About Virtual Software Package Formats in the Virtual Package Editor help.

After you add an Install SVS Package action to a script, you can open its .WVP file in Virtual Package Editor directly from the WiseScript. To open the .WVP file, select its Install SVS Package action and select Open Package from its right-click menu. If you edit and recompile the .WVP in Virtual Package Editor, those changes are incorporated into the WiseScript the next time it is compiled.

To complete the dialog box

Source PathnameSpecify the .WVP file.

WiseScript Package Editor Reference 178

Page 179: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Activate LayerCheck this to activate the layer after it is imported on the end user’s computer. We recommend that you check this unless you have a specific reason to not activate the layer when it is imported on the end user’s computer.

See also:

About SVS Script Actions on page 119

Install WiseUpdate ClientWiseUpdate updates an application on destination computers over the Internet. The Install WiseUpdate Client action reflects the settings on the WiseUpdate page and vice versa. You can either complete the WiseUpdate page, or add the Install WiseUpdate Client action.

See About WiseUpdate on page 87.

To complete the dialog box

Host AddressEnter the Web server address or IP address where the WiseUpdate Client looks for updated software (example: www.company.com or 1.1.1.1). The WiseUpdate Client on the destination computer uses this information when it checks for updates.

NoteThe host must be accessible through both FTP and HTTP. You use an FTP client to transfer files to it, and WiseUpdate Client (on the destination computers) uses HTTP to read and download files.

Sever Username, Server PasswordIf necessary, enter the user name and password that are required to connect to the server. Typically, Web servers don’t require user names and passwords. This is used for basic HTTP authentication.

Host DirectoryEnter the directory name on the host that stores the WiseUpdate configuration file. Your installation and its ReadMe are also stored in this directory. Leave this field blank to put the files on the top level of the host.

Update FilenameEnter a name for the WiseUpdate update file. This file, which resides in the host directory, is a text file in .INI format that the WiseUpdate client reads to determine if a new version exists, and if so, where the new version and its ReadMe can be found. You must use the same file name when you use WiseUpdate in the future (example: WiseUpdate.INI).

See About the WiseUpdate Update File on page 91.

Product VersionEnter the version of the current installation. This version will be stored in the configuration file specified in Update Filename.

Check Interval (days)This works in conjunction with the Add client to Startup Group check box (see below). Enter the number of days between update reminders for the end user.

WiseScript Package Editor Reference 179

Page 180: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Alternate Web PageEnter the location of a Web page to display if the WiseUpdate client cannot check for updates or download the installation. Examples: A page with technical support, upgrade information, or troubleshooting.

Start Menu IconEnter a name for a shortcut to the WiseUpdate Client, which appears in the Windows Start menu, giving end users the ability to check for updates. To communicate the shortcut’s purpose, give it a descriptive name, such as “Update Productname.” If this is left blank, mark Add client to Startup Group so that the WiseUpdate Client runs automatically.

Add client to Startup GroupMark this to add a shortcut for the WiseUpdate Client to the Windows Startup group. The WiseUpdate Client runs silently every time the destination computer is restarted or the end user logs into Windows. If the Check Interval time has not been reached, is simply runs silently, checks the time interval, and quits. However, after the number of days in Check Interval elapse, instead of running silently and quitting, it runs with its normal interface and prompts the end user to check for updates.

About Windows Mobile InstallationsThe Microsoft® Windows Mobile™ platform supports Pocket PC and Smartphone devices. A Windows Mobile device installation consists of a single, self-extracting .CAB file and an optional Setup.dll file. The .CAB file contains all the resources (files, registry keys, and shortcuts) that comprise the application. The Setup.dll file provides functions for performing certain operations during the installation and removal of your application.

Mobile device .CAB files are generated by the CabWiz program from an information file (.INF). The .INF is a text file that specifies directories, files, settings, and configurations that are used to install a mobile device application.

(Pocket PC applications only.) A single .INF file can contain information to produce multiple .CAB files. Example: An application supports the Windows Mobile and Pocket PC 2002 platforms, but several of the application files are platform-dependent. When you create the installation, you assign the files to the device that supports that platform. When you compile, the Windows Mobile-specific files are placed in the Windows Mobile .CAB file, and the Pocket PC 2002-specific files are placed in the Pocket PC 2002 .CAB file.

A mobile device application can be installed in the following ways:

The .CAB file and an .INI file that describes the .CAB are included in an installation that runs on the desktop computer. The desktop computer contains Application Manager (CeAppMgr.exe), which is installed with ActiveSync. Application Manager installs the mobile device application on the device.

The end user copies the .CAB file to the mobile device and opens it. The .CAB file extracts its contents to the directories that were specified in the .INF file.

Uninstall of the mobile device application is controlled by the mobile device and ActiveSync. Uninstalling the mobile device installation from the desktop computer does not affect the application that is installed on the mobile device.

To add mobile device .CAB files to a WiseScript, use the Install Windows Mobile Application script action.

WiseScript Package Editor Reference 180

Page 181: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

See:

Process for Adding Mobile Device Support to a WiseScriptInstall Windows Mobile Application on page 181

Process for Adding Mobile Device Support to a WiseScriptYou can configure a WiseScript to install files that support a Windows Mobile device application.

1. Obtain the mobile device installation file or files. Windows Mobile installations consists of one or more .CAB files.

Obtain the .CAB files from a vendor or other source, or use the Mobile Device Package Editor to create them.

2. In WiseScript Package Editor, add the Install Windows Mobile Application script action and specify the .CAB files to add.

3. Finish assembling the WiseScript. Any resources that you add to the WiseScript, other than those in any Install Windows Mobile Application script actions, are installed on the desktop computer, not the mobile device.

4. Compile the WiseScript. The .CAB files are included in the compiled .EXE. Also, an .INI file that describes the .CABs is created and included in the compiled .EXE.

See:

About Mobile Device Package Editor in the Mobile Device Package Editor Help About Windows Mobile Installations on page 180Install Windows Mobile Application on page 181

Install Windows Mobile ApplicationThis action adds mobile device support for the Microsoft® Windows Mobile™ platform for Pocket PC and Smartphone devices. Use it to configure a WiseScript to install files that support a Windows Mobile device application.

See About Windows Mobile Installations on page 180.

Each action line represents one mobile device application; each .CAB file represents a different device that is supported by the application.

To complete the dialog box

Application NameEnter the name of the application you are installing. It also appears in the desktop computer’s mobile device software (the Add/Remove Programs dialog box, which is accessible from the Microsoft ActiveSync window).

DescriptionThis appears on the Add/Remove Programs dialog box on the desktop computer.

Installation Files sectionSpecify up to three .CAB files to install.

Desktop Shortcut sectionIf installation onto the mobile device will not take place immediately following the desktop installation, then use the following fields to create a shortcut on the desktop

WiseScript Package Editor Reference 181

Page 182: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

computer. This shortcut starts the installation onto the mobile device by calling the Application Manager.

NameEnter the name for the shortcut on the mobile device.

Icon FileTo use a custom icon, enter the path to the .ICO, .EXE, or .DLL file that contains the icon.

Install on the mobile device following the desktop installationIf you mark this and the mobile device is connected during the desktop installation, then the end user is prompted to perform the mobile device installation immediately following the desktop installation.

See also:

Process for Adding Mobile Device Support to a WiseScript on page 181

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” then

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

To complete the dialog box

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.logUse this action to create an installation log.

Normally, every file that is installed is recorded in the install.log. The uninstall works by reading Install.log from bottom to top and reversing each recorded action.

The Open/Close Install.log action lets you customize the uninstall, by turning logging off and on at key points to prevent some actions from being recorded in the log. If you use this action to stop logging, you must also use it to resume logging or no log file is created.

WiseScript Package Editor Reference 182

Page 183: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

NoteWhen a WiseScript is called by a Windows Installer installation, the Windows Installer installation does not recognize changes that the WiseScript makes to the destination computer and will not uninstall them. Therefore, you must provide a way to uninstall or repair such changes. See Uninstalling Changes Made by a WiseScript in the Windows Installer Editor Help.

To complete the dialog box

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

In WiseScript Package Editor, the log’s default location and name are set on the Installation Log page.

See Installation Log on page 59.

See also:

Add Text to INSTALL.LOG on page 122

Parse StringThis action splits a text string and places the results in two 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 four from left, then “ONE,” is put into the destination variable 1 and “TWO” is put into the destination variable 2.

To complete the dialog box

Source ValueEnter the text to be parsed. You enter text and variables (examples: %MAINDIR% or %MAINDIR%\%PICTDIR%). To include a literal percent (%) symbol, use %%.

WiseScript Package Editor Reference 183

Page 184: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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

The sample scripts TextFile.wse and URL.wse use this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

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.

To complete the dialog box

Milliseconds to pauseEnter the number of milliseconds to pause the script. A millisecond is 1/1000 of a second. To pause for one 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 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.

To complete the dialog box

File TypeSelect either .WAV or .AVI.

PathnameSpecify the path 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 file name, then install the file to %TEMP%\%TEMPFILENAME%.

WiseScript Package Editor Reference 184

Page 185: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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 box asking the end user if they have Internet connectivity. Then use the results from the prompt to run this action or not.

To complete the dialog box

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 =, it is assumed to be a continuation of the previous line, and the data on the two lines is concatenated and sent with a single field identifier.

The field names might be the same as 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 HandlingSpecify 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.

Prompt for FilenameThis action prompts the end user to select a file using a standard Open or Save dialog box. The complete path 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

WiseScript Package Editor Reference 185

Page 186: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

compatibility for older WiseScripts. In new scripts, use custom dialog boxes or dialog box controls to perform the same function. This action requires an End Statement, because it begins a block of statements, similar to an If Statement.

To complete the dialog box

Dialog TypeSelect Open File or Save As.

Dialog TitleEnter the title for the dialog box.

Dest. VariableSelect or enter a variable to store the path 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 box. 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 display a confirmation dialog box 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 path has been specified.

Skip write permissions testIf you selected Save As for Dialog Type, and you clear this check box, the installation tries to create the file that the end user specified in the Save As dialog box to verify write permissions. If you mark this check box, the installation does not try to create the file.

Do not validate the pathnameMark this to accept any path 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 box that lets an end user enter a line of text. Optionally, you can treat the entered text as a path and do verification on it. It is included to provide backward compatibility for older WiseScripts. In new scripts, use custom dialog boxes or dialog box controls to perform the same function.

WiseScript Package Editor Reference 186

Page 187: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

Window NameEnter the title for the dialog box.

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

Confirm If ExistsIf this check box is marked, and the end user enters the path of an existing file or directory, a dialog box asks whether to overwrite.

The sample scripts Adding.wse, Comcat$.wse, Division.wse, Instr.wse, Lcase$.wse, Left$.wse, and Len.wse use this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Radio Button DialogThis action displays a dialog box with up to 10 radio buttons. It provides backward compatibility with older WiseScripts. In new scripts, use custom dialog boxes and dialog box controls to perform the same function.

To complete the dialog box

TitleEnter the title for the dialog box.

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: Obtain a path to a file.

WiseScript Package Editor Reference 187

Page 188: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

INI PathnameSpecify a complete path to the .INI file (example: %WIN%\Sample.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.

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 path, 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.

NoteWhen a WiseScript is called by a Windows Installer installation, the Windows Installer installation does not recognize changes that the WiseScript makes to the destination computer and will not uninstall them. Therefore, you must provide a way to uninstall or repair such changes. See Uninstalling Changes Made by a WiseScript in the Windows Installer Editor Help.

To complete the dialog box

PathnameSpecify the full path to the text file to be edited on the destination computer (example: %WIN%\Sample.txt).

VariableSpecify the variable in which 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.

WiseScript Package Editor Reference 188

Page 189: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Make Backup FileMark this to make a copy of the text file before editing it. A number is appended to the end of the file name for the backup copies (example: text.001, text.002, and so on).

The sample script TextFile.wse uses this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

See also:

End Statement on page 158

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.

This action does not support reading or writing non-ASCII characters (characters with codes above 127).

NoteWhen a WiseScript is called by a Windows Installer installation, the Windows Installer installation does not recognize changes that the WiseScript makes to the destination computer and will not uninstall them. Therefore, you must provide a way to uninstall or repair such changes. See Uninstalling Changes Made by a WiseScript in the Windows Installer Editor Help.

To complete the dialog box

File PathnameSpecify the path 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.

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 check box is marked, a zero byte is written to the binary file after the string.

Reboot SystemThis action restarts the destination computer.

WiseScript Package Editor Reference 189

Page 190: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

Reboot Operating SystemThis option logs the end user out of Windows.

Reboot Computer SystemIf the end user has administrator privileges, this option performs a full system restart on the destination computer at the end of installation. 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.

To complete the dialog box

Font File NameSpecify the file name of the .TTF font file (not the path) 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 and to the registry.

RemarkThis action adds comments or blank lines to the script. Remarks are green by default.

In WiseScript Package Editor, you can change the color preferences.

See Setting Preferences on page 23.

NoteThis is different from the Remark action that is in MSI Script in a Windows Installer installation.

CommentEnter the comment. To add a blank line, leave this field blank.

Remove SVS Exclude EntryThis SVS script action removes an SVS exclude entry on the destination computer. You can remove a layer exclude entry or a global exclude entry. A layer exclude entry applies to a specific layer on a computer, while a global exclude entry applies to every layer on a computer.

You set an exclude entry to exclude files from a specific layer or any layer on a computer. By default, when an application layer generates files, those files are redirected to the application’s writeable sublayer. If the layer is reset, the files in the writeable sublayer are lost. With an exclude entry, the files are saved in the base file system and are not lost.

WiseScript Package Editor Reference 190

Page 191: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To set an exclude entry, use the Set SVS Exclude Entry action.

See Set SVS Exclude Entry on page 197.

To complete the dialog box

Layer GUIDFor a global exclude, leave this blank. For a layer exclude, enter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

Exclude entry textEnter the text used to set the exclude. If the exclude entry type is an extension, enter the file extension. If the exclude entry type is a directory or a directory with its subdirectories, enter the directory. For a directory, you can use a WiseScript variable that resolves to a valid path. For example, %PROGRAM_FILES%.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

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.

NoteWhen a WiseScript is called by a Windows Installer installation, the Windows Installer installation does not recognize changes that the WiseScript makes to the destination computer and will not uninstall them. Therefore, you must provide a way to uninstall or repair such changes. See Uninstalling Changes Made by a WiseScript in the Windows Installer Editor Help.

To complete the dialog box

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.

New File NameEnter the new file name or directory name (examples: picture2.jpg or Photos).

Rename File or Directory in SVS LayerThis SVS script action renames a file or directory a virtual software layer. This can be an existing file or directory, or a file or directory that the WiseScript installs. The file must not be busy.

NoteUse this action on a deactivated SVS layer only.

WiseScript Package Editor Reference 191

Page 192: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To complete the dialog box

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

Source pathEnter the full path to the existing directory and file in the virtual software layer. You can use SVS variables or WiseScript variables that resolve to a valid SVS path.

See SVS Variables on page 250.

Destination pathEnter the new path, or file name, or both. Any new path you enter must exist in the layer. You can use SVS variables or WiseScript variables that resolve to a valid SVS path.

See SVS Variables on page 250.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

See also:

About SVS Script Actions on page 119

Rename SVS LayerThis SVS script action renames a virtual software layer that is installed. The layer must be deactivated before it can be renamed.

To complete the dialog box

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

New nameEnter the new name for the virtual software layer.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

See also:

About SVS Script Actions on page 119

WiseScript Package Editor Reference 192

Page 193: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Search for FileThis action searches for a file on local drives, network drives, or all drives, and returns the full path to the file.

To complete the dialog box

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 path rather than just a file name.

Variable NameEnter a variable to store the file path.

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

Remove File NameMark this to remove a file name from the end of a returned path, leaving only the directory name. This does not apply to the Default Value field.

The sample script Search.wse uses this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

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.

WiseScript Package Editor Reference 193

Page 194: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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 unavailable if you mark this option.

If you mark Queue existing file for self-registration below, specify a full path 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 176 and Copy Local File(s) on page 139.

Queue existing file for self-registrationMark this to queue the file listed in Pathname for later self-registration.

Set Activate SVS Layer on StartupThis SVS script action activates a virtual software layer when the computer restarts.

To complete the dialog box

Layer GUIDEnter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

Activate SVS layer on system startup.Mark this option to set the layer to activate when the computer starts. Clear this option to set the layer to not activate when the computer starts.

See also:

About SVS Script Actions on page 119

Set Control AttributesThis action appears only when you are in a dialog box script.

This action shows, hides, enables, or disables a control in a dialog box. Controls without names cannot be manipulated with this action.

To access this action

1. Double-click a Custom Dialog script line.

The dialog box appears in the Custom Dialog Editor.

2. Select View > Dialog Script Editor.

A smaller list of actions appears in the Actions list, including this action.

WiseScript Package Editor Reference 194

Page 195: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

3. Double-click Set Control Attributes.

Control NameThis contains all controls in the current dialog box. Select a control.

Use the Dialog Editor view (which shows the dialog box) to see or change the name of controls. To name a control, right-click the control, select Control Properties, and, in the dialog box that appears, enter a name in the Control Name field.

OperationSelect how to manipulate the control.

The sample scripts Event Handler.wse and License Agreement.wse use this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Set Control TextThis action appears only when you are in a dialog box script.

This action changes the text associated with a control in a dialog box. Controls without names cannot be manipulated with this action.

To access this action

1. Double-click a Custom Dialog script line.

The dialog box appears in the Custom Dialog Editor.

2. Select View > Dialog Script 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 box. Select a control.

Use the Dialog Editor view (which shows the dialog box) to see or change the name of controls. To name a control, right-click the control, select Control Properties, and, in the dialog box that appears, enter a name in the Control Name field.

Control TextEnter new text to associate with the control.

The sample script Event Handler.wse uses this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Set Current ControlThis action appears only when you are in a dialog box script.

This action sets a control to be the current control in a dialog box. The current control is the one to which keyboard operations apply. (Example: If the OK button is the current control, and you press Enter, the OK button is activated.) Controls without names cannot be manipulated with this action.

WiseScript Package Editor Reference 195

Page 196: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

To access this action

1. Double-click a “Custom Dialog” line in the script.

The dialog box appears in the Custom Dialog Editor.

2. Select View > Dialog Script 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 box. Select a control to set as current.

Use the Dialog Editor view (which shows the dialog box) to see or change the name of controls. To name a control, right-click the control, select Control Properties, and, in the dialog box that appears, enter a name in the Control Name field.

Set File AttributesThis action sets the attributes of one file or a group of files.

To complete the dialog box

File PathnameSpecify a file to change (example: %MAINDIR%\Acrobat.pdf). You can use wildcards to specify multiple files (example: %MAINDIR%\*.pdf).

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.

To complete the dialog box

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.

WiseScript Package Editor Reference 196

Page 197: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Set SVS Exclude EntryThis SVS script action sets an SVS exclude entry on the destination computer. You can set a layer exclude entry or a global exclude entry. A layer exclude entry applies to a specific layer on a computer, while a global exclude entry applies to every layer on a computer. This action appends its exclude entry to any existing exclude entries.

You set an exclude entry to exclude files from a specific layer or any layer on a computer. By default, when an application layer generates files, those files are redirected to the application’s writeable sublayer. If the layer is reset, the files in the writeable sublayer are lost. With an exclude entry, the files are saved in the base file system and are not lost.

To remove an SVS exclude entry, use the Remove SVS Exclude Entry action.

See Remove SVS Exclude Entry on page 190.

To complete the dialog box

Layer GUIDFor a global exclude, leave this blank. For a layer exclude, enter the layer’s GUID (globally unique identifier) or a variable that represents the layer’s GUID. If you enter the layer’s GUID, do not include the { } brackets.

For information on creating a variable for a layer’s GUID, see Create SVS Layer on page 146 and Find SVS Layer GUID on page 166.

Exclude TypeSelect the type of exclude entry.

Exclude entry textIf you select Extension in the Exclude Type section, type the extension. You can specify only one extension per action. If you select one of the directory options in the Exclude Type section, type the directory. For a directory, you can use a WiseScript variable that resolves to a valid path. For example, %PROGRAM_FILES%.

Return variable(Optional.) Enter a name for the return variable. When this script action runs successfully, either 0 or 1 is placed in this variable.

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.

To complete the dialog box

VariableSpecify a variable. A variable name 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 32 K in size.

The new value is also affected by the option set in Operation.

WiseScript Package Editor Reference 197

Page 198: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

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 path to its equivalent long or short path 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.

Evaluate ExpressionThe expression in New Value is evaluated according to the rules outlined in Variables and Expressions on page 112.

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 path, leaving only the directory name.

Read Variable From Values FileMark this to read the variable from the values file that is 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 32 K in size.

The sample scripts Adding.wse and Division.wse use this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Set Web PermissionsThis script action sets permissions for an existing virtual directory of a Web site or a virtual directory that you create with the Create Virtual Directory script action.

See Create Virtual Directory on page 147.

To complete the dialog box

ComputerEnter the name of the computer where the Web site resides.

WiseScript Package Editor Reference 198

Page 199: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

WebsiteEnter the name of the Web site.

Virtual DirectoryEnter the name of the virtual directory.

PermissionsMark the permission options to set for this virtual directory. These permissions determine what actions are allowed on the Web server for a virtual directory when an anonymous user connects to the Web site. The Script and Execute permissions let users run scripts or executables. (Example: If you turn Execute permissions off, anyone who accesses your Web site will not be able to run any of your Web site’s executable files.) If scripts or executables are not needed for your Web site to operate, we recommend that you turn these permissions off to limit the possibility of malicious code destroying your Web server.

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.

To complete the dialog box

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.

See also:

Get Windows Installer Property on page 172Evaluate Windows Installer Condition on page 158

Start/Stop ServiceThis action lets you start or stop a service on the destination computer. It only applies to operating systems that support services.

When a WiseScript is called by a Windows Installer installation, you can also start and stop services by using the Services page in Windows Installer Editor.

After you try 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.

To complete the dialog box

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

WiseScript Package Editor Reference 199

Page 200: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Service action to create the service, this is the same name you entered in the Create Service Settings dialog box.

OperationSelect to start or stop the service.

Example: Suppose a service must be stopped before it can be updated. Use this action to first stop the service, then update its files.

See also:

Create Service on page 143

While StatementThis action begins a While loop. An End Statement must end the loop. As long as the condition specified in the While Statement Settings dialog box is true, the script lines inside the loop execute repeatedly. If the condition is not true, then the While loop is exited, and the next script line is executed.

To create a While loop

1. Add a While Statement and complete the dialog box:

While VariableSelect a variable from the first drop-down list, and a comparison method from the second drop-down list.

Expression True means the expression in the Value field below is evaluated according to the rules outlined in Variables and Expressions on page 112. The variable is ignored and can be left blank. The result is considered true if it evaluates to a non-zero result.

(The password comparisons are applicable in WiseScript Package Editor only.)

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 check box is cleared, the loop is executed if the condition is true, but is not executed if the condition is false.

2. Below the While Statement, add one or more actions to perform if the variable has the specified value.

3. Add an End Statement.

The sample scripts Division.wse and Application kill.wse use this action. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

See also:

End Statement on page 158

WiseScript Package Editor Reference 200

Page 201: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

WiseScript Actions

Win32 System DirectoryThis action puts the path to the operating system directory (%WIN%\System32) into a variable. Alternatively, use the predefined variables %SYS% or %SYS32% to access the system directory. This action is included to provide backward compatibility for older WiseScripts.

To complete the dialog box

Variable NameEnter a variable to store the result.

Wizard LoopThis action precedes dialog boxes that make up the majority of the installation’s end user interface. End users can move forward and backward through these dialog boxes. The script continues executing inside the wizard loop until the last dialog box has been completed and accepted.

(WiseScript Package Editor only) Installation Expert creates default Wizard Loop and Custom Dialog actions for you. Use this script action to customize the existing structure.

(WiseScript Editor) Use this script action to create the wizard loop.

To complete the dialog box

Dialog BoxesDisplays a list of the Custom Dialog actions inside the wizard loop structure. Select a dialog box to edit its setting in the bottom part of the Wizard Loop Settings dialog box.

Skip DialogThis lets you set a condition under which a dialog box is skipped. You can set different Skip settings for each dialog box.

Example: If one dialog box 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 box to skip it if the DOBACKUP variable, which is set by the first dialog box, 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 112. The variable is ignored and can be left blank. The result is considered true if it evaluates to a non-zero result.

(The password comparisons are applicable in WiseScript Package Editor only.)

WiseScript Package Editor Reference 201

Page 202: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Chapter 8Creating Custom Dialog Boxes

This chapter includes the following topics:

About Dialog Boxes on page 202

About the Custom Dialog Editor on page 202

About Dialog Box Controls on page 206

Solutions for Dialog Box Problems on page 225

About Custom Dialog Box Sets on page 227

Creating a Custom Dialog Box Script on page 228

About Dialog BoxesUse the Custom Dialog Editor to change the appearance of installation dialog boxes and to create new dialog boxes. You can edit and create default dialog box templates, add interactivity to dialog boxes, and work with dialog box sets, and translate dialog box text to other languages.

When you add multiple-language support to an installation, you can provide translations for dialog boxes in the installation. (See Adding Language Support for a New Language on page 30.)

Typically, dialog boxes are not used in WiseScripts that run silently, or in WiseScripts that you use as custom actions in a Windows Installer installation.

Note

This documentation covers both WiseScript Package Editor and WiseScript Editor. WiseScript Editor contains the same scripting interface as WiseScript Package Editor, but it does not contain the Installation Expert interface or other installation development tools. Therefore, some of the information in this document does not apply to WiseScript Editor.

About the Custom Dialog EditorThe Custom Dialog Editor is a built-in utility.

Use it to do the following:

Create new dialog boxes See Adding a Dialog Box to the Installation on page 203.

Edit dialog boxes See Editing Dialog Boxes on page 204.

Create and edit default dialog box templates

See Editing Dialog Box Templates on page 204.

WiseScript Package Editor Reference 202

Page 203: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

Access the Custom Dialog Editor from:

Adding a Dialog Box to the Installation

Options for adding dialog boxes

(WiseScript Package Editor only)

If you add a dialog box from the Dialogs page, the dialog box is created with the same size and shape as the other wizard dialog boxes, it is added to the wizard loop, and it has correctly configured Next, Back, and Cancel buttons.

If you add a dialog box from Script Editor, the dialog box is empty, and nothing is pre-configured. You must design and configure it yourself.

Therefore, to add a dialog box to the installation wizard, add the dialog box from the Dialogs page. To add a dialog box that’s not part of the installation wizard (and therefore doesn’t need Next and Back buttons), add it from Script Editor.

(WiseScript Editor) When you add a dialog box, the dialog box is empty, and nothing is preconfigured. You must design and configure it yourself.

To create a new dialog box

1. Do one of the following:

(WiseScript Package Editor only) Select Installation Expert > Dialogs page, select a dialog box name, and click Add. The new dialog box is placed before the dialog box that you selected.

In Script Editor, double-click the Custom Dialog script action in the Actions list.

The Dialog Box Properties dialog box appears.

2. Enter a title for the dialog box in Dialog Title and click OK. Do not enter the same title as an existing dialog box.

See Setting Dialog Box Properties on page 205.

The new dialog box opens in the Custom Dialog Editor.

3. Add and configure controls on the new dialog box.

Set dialog box properties See Setting Dialog Box Properties on page 205.

Create a dialog box set See About Custom Dialog Box Sets on page 227.

Add interactivity to dialog boxes See Creating a Custom Dialog Box Script on page 228

Installation Expert Click the Edit or Add button on the Dialogs page. (WiseScript Package Editor only)

Script Editor Double-click the Custom Dialog script action or a Custom Dialog script line.

The Edit Menu Select Dialog Templates and then select a dialog box name and click OK. (WiseScript Package Editor only)

WiseScript Package Editor Reference 203

Page 204: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

See About Dialog Box Controls on page 206

See Adding and Editing Dialog Box Controls on page 207

4. Select File menu > Save Changes and exit.

NoteTo use this dialog box in other installation scripts, select File menu > Save As and save the dialog box as a .DLG file in the \Dialogs\Template subdirectory of this product’s installation directory. This does not affect the current installation. You can add a saved dialog box to another installation by selecting File menu > Open in the Custom Dialog Editor.

Editing Dialog BoxesWhen you edit a dialog box, the changes affect the current installation only. However, if you save the dialog box and overwrite the .DLG template file, then the dialog box is changed for all future installations.

1. To open the dialog box, do one of the following:

(WiseScript Package Editor only) Select Installation Expert > Dialogs page, mark the check box of the dialog box, and click Edit.

In Script Editor, locate and double-click the Custom Dialog script line that calls the dialog box.

The dialog box opens in the Custom Dialog Editor.

2. Make changes to the dialog box by adding, editing, or removing controls.

See Adding and Editing Dialog Box Controls on page 207

See Aligning and Spacing Dialog Box Controls on page 223

3. Select File menu > Save Changes and exit.

See also:

Editing Dialog Box Templates on page 204Adding a Dialog Box to the Installation on page 203

Editing Dialog Box Templates

WiseScript Package Editor only

To edit dialog boxes so that all future installations contain the changes, edit the dialog box templates. There are additional dialog box templates besides those shown on the Dialogs page (example: the Insert New Disk dialog box). Dialog box templates are in the \Dialogs\Template subdirectory of this product’s installation directory.

Before you edit dialog box templates, make a backup of the \Dialogs\Template directory. When you edit a dialog box template and save the changes, the dialog box is permanently changed.

1. Select Edit menu > Dialog Templates.

The Select Dialog to Edit dialog box appears.

2. Select a dialog box and click OK.

WiseScript Package Editor Reference 204

Page 205: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

The dialog box opens in the Custom Dialog Editor.

3. Make changes to the dialog box by adding, editing, or removing controls.

See Adding and Editing Dialog Box Controls on page 207

See Aligning and Spacing Dialog Box Controls on page 223

4. Select File menu > Save Changes and exit.

See also:

Editing Dialog Boxes on page 204

Setting Dialog Box PropertiesYou can create or change the properties of a dialog box including its title, default font, dimensions, and positions.

1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Edit menu > Dialog Box Properties.

The Dialog Box Properties dialog appears. (This dialog box also appears when you click Add on the Dialogs page.)

3. Complete the dialog box:

Dialog TitleEnter the title for the dialog box.

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 dialog box size in points. All dialog boxes in a wizard loop must have the same size as the first dialog box or screen refresh problems occur.

NoteYou can also resize the dialog box by clicking its edges and dragging. Use the Width and Height fields for more precise sizing.

Horiz. Position / Vert. PositionSelect where on the screen to display the dialog box. If you select Default, the dialog box is centered on the screen.

Do not display wizard graphic on this dialogNormally, the wizard graphic is set in the Wizard Loop script action, and applies to all dialog boxes in the wizard loop. Mark this check box to turn off the wizard graphic on this dialog box.

4. Click OK.

WiseScript Package Editor Reference 205

Page 206: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

About Dialog Box ControlsInstallation dialog boxes contain standard controls, which you can add and edit. Most controls are configured by completing their Settings dialog box.

See Adding and Editing Dialog Box Controls on page 207.

You can add the following types of controls to dialog boxes:

Check box A single check box for on/off, true/false settings.

See Adding Check Box Controls on page 207.

Combo Box A combination edit field and drop-down list control that lets the end user select a predefined value or enter a value.

See Adding Combo Box Controls on page 208.

Edit Text An editable text field that accepts single or multiple lines. You can also use this type of control to display a text file.

See Adding Edit Text Controls on page 210.

Graphic A non-editable bitmap graphic.

See Adding Graphic Controls on page 212.

Group Box A boundary box drawn around related controls.

See Adding Group Box Controls on page 213.

Hot Text Text that you can link to actions or a Web page.

See Adding Hot Text Controls on page 213.

List Box A single column of values. The end user can select one or more values from the list.

See Adding List Box Controls on page 215.

Play AVI An animation. This does not include controls to play, stop, rewind, or fast forward the movie.

See Adding Play AVI Controls on page 217.

Push Button A clickable button. Generally you must configure buttons to perform an action, such as displaying another dialog box. Buttons can also close a dialog box, set script variables, and take other actions. Every dialog box must contain at least one button.

See Adding Push Button Controls on page 217.

Radio Button A group of mutually exclusive options with a separate radio button for each option.

See Adding Radio Button Controls on page 219.

Rectangle A box.

See Adding Rectangle Controls on page 220.

WiseScript Package Editor Reference 206

Page 207: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

The sample scripts that use custom dialog boxes all use dialog box controls. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Adding and Editing Dialog Box Controls1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select the control by doing one of the following:

Click the control in the Control Palette.

Right-click, select Add, and select a command.

Use the Add menu on the main menu bar.

The settings dialog box for the control appears.

3. Complete the dialog box.

For information about the settings dialog box for each control, see About Dialog Box Controls on page 206.

4. Click OK to add the new control to the dialog box.

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 open its settings dialog box.

Adding Check Box ControlsLike radio buttons, a group of check boxes is considered a single control. However, unlike radio buttons, the end user can select multiple check boxes. Alignment and spacing between the individual check boxes is maintained by the Custom Dialog Editor. Check boxes are often used to control the installation of components or sub-components.

1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Add menu > Checkbox.

The Checkbox Control Settings dialog box appears.

3. Complete the dialog box:

Checkbox TextEnter the text options for the check boxes, one on each line. If the end user selects the first check box, the letter A is appended to the variable that stores the return value. If the end user selects the second check box, the letter B is appended, and so on. The variable stores letters of all check boxes that are selected. Example: If the end user marks the first, third, and fourth check boxes, the variable is “ABD.”

Text Control Static text field for displaying messages. The end user cannot change text in this type of field.

See Adding Text Controls on page 221.

WiseScript Package Editor Reference 207

Page 208: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

VariableSpecify the name of the script variable that stores the return value of this dialog box control.

NoteIf you set the variable to a string containing one or more lowercase letters, the corresponding options are unavailable in the radio button control when it appears on the dialog box. Example: For a radio button with four options and a variable of “ABcd,” last two options unavailable.

Sub-ComponentsIf the check 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.

Control NameEnter the name by which you will refer to this control in the dialog box script. Leave this blank if you will not manipulate this control with a script.

X-Position / Y-PositionSpecify the exact location of the control on the dialog box. You can also use the alignment commands to precisely arrange controls on the dialog box.

See Aligning and Spacing Dialog Box Controls on page 223.

NoteA dialog unit is based on the size of the dialog font, usually 8-point MS Sans Serif. A horizontal dialog unit is 1/4 the average width of the font and a vertical dialog unit is 1/8 the average height of the font.

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 check boxes. Normally, you mark this check box only if you are selecting components and you have specified the COMPONENTS variable.

Retain DisabledIf you set the check box variable so that some of its options are disabled, those options become enabled if the end user proceeds to the next dialog box and uses the Back button. Mark this check box to cause any lowercase letters in the variable to stay in the variable, which makes disabled options retain their disabled state even when the end user navigates between dialog boxes. If this check box is cleared, the variable takes the value of the option that was selected, and the lowercase information is lost.

4. Click OK.

Adding Combo Box ControlsA combo box can take three forms: a list box, a drop-down list, and a drop-down list that can accept text entry. In the text entry drop-down list, end users can enter text or select a value from the list. The size of a combo box determines where the drop-down list drops.

WiseScript Package Editor Reference 208

Page 209: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

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

1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Add menu > Combo Box.

The Combo Box Control Settings dialog box appears.

3. Complete the dialog box:

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.

ProgMan GroupsMark this to have the items in the Programs group of the Windows Start menu 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 (example: 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 path that the end user enters already exists on the destination computer. Clear this check box to prevent the “This directory already exists” message from appearing.

VariableSpecify the name of the script variable that stores the return value of this dialog box 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 select 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.

WiseScript Package Editor Reference 209

Page 210: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

Drop List. Drop-down list that only allows selection from the list.

Control NameEnter the name by which you will refer to this control in the dialog box script. Leave this blank if you will not manipulate this control with a script.

X-Position / Y-PositionSpecify the exact location of the control on the dialog box. You can also use the alignment commands to precisely arrange controls on the dialog box.

See Aligning and Spacing Dialog Box Controls on page 223.

NoteA dialog unit is based on the size of the dialog font, usually 8-point MS Sans Serif. A horizontal dialog unit is 1/4 the average width of the font and a vertical dialog unit is 1/8 the average height of the font.

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.

NoteA combo box field should be at least as wide as the longest option in the list.

Adding Edit Text ControlsAn 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 box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Add menu > Edit Text.

The Edit Text Control Settings dialog box appears.

3. Complete the dialog box:

DefaultEnter text to appear in the Edit Text control by default. To start a new line, press Ctrl+Enter and then mark the Multi-line check box below.

VariableSpecify the name of the script variable that stores the return value of this dialog box control.

AlignmentSelect how to align the text in the edit field. This is enabled only when the Multi-line check box is marked.

Control NameEnter the name by which you will refer to this control in the dialog box script. Leave this blank if you will not manipulate this control with a script.

Horiz. ScrollMark this to add a horizontal scroll bar.

Vert. ScrollMark this to add a vertical scroll bar.

WiseScript Package Editor Reference 210

Page 211: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

Auto HScrollMark this to scroll the text if it extends past the right edge of the edit field.

Auto VScrollMark this to scroll the text if it extends past the bottom of the edit field.

Multi-lineMark this to allow multiple lines of text to be entered into the edit field.

PasswordMark this if entered text should display as asterisks (*), providing password security.

No Hide SelNormally, text highlighting is hidden when the dialog box loses focus. Mark this check box 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 one of these check boxes 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 this 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 path of a text file. This path should be relative. Use variable substitution (example: %MAINDIR% to refer to the destination directory) to begin the path. The file contents are displayed in this field.

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 path that the end user enters already exists on the destination computer. Clear this check box to prevent the “This directory already exists” message from appearing.

X-Position / Y-PositionSpecify the exact location of the control on the dialog box. You can also use the alignment commands to precisely arrange controls on the dialog box.

See Aligning and Spacing Dialog Box Controls on page 223.

WiseScript Package Editor Reference 211

Page 212: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

NoteA dialog unit is based on the size of the dialog font, usually 8-point MS Sans Serif. A horizontal dialog unit is 1/4 the average width of the font and a vertical dialog unit is 1/8 the average height of the font.

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 box. Graphic controls are static controls, which means that the end user cannot make changes to them.

1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Add menu > Graphic in the Custom Dialog Editor.

The Graphic Control Settings dialog box appears.

3. Complete the dialog box:

Graphic PathnameSpecify the path for the bitmap graphic to add to the dialog box.

Control NameEnter the name by which you will refer to this control in the dialog box script. Leave this blank if you will not manipulate this control with a script.

Do not resize bitmap graphicNormally, graphics are resized if the dialog box needs to be made larger (example: if the destination computer uses a larger font size). Mark this check box 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 box, test the installation thoroughly.

X-Position / Y-PositionSpecify the exact location of the control on the dialog box. You can also use the alignment commands to precisely arrange controls on the dialog box.

See Aligning and Spacing Dialog Box Controls on page 223.

NoteA dialog unit is based on the size of the dialog font, usually 8-point MS Sans Serif. A horizontal dialog unit is 1/4 the average width of the font and a vertical dialog unit is 1/8 the average height of the font.

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.

WiseScript Package Editor Reference 212

Page 213: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

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 box is a group box.

1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Add menu > Group Box.

The Group Box Control Settings dialog box appears.

3. Complete the dialog box:

Group Box TextEnter a name to appear at the top of the group box. Example: On the Group Box Control Settings dialog box, “Placement” is the group box text.

Control NameEnter the name by which you will refer to this control in the dialog box script. Leave this blank if you will not manipulate this control with a script.

Transparent BackgroundMark this to make the background for this control transparent.

X-Position / Y-PositionSpecify the exact location of the control on the dialog box. You can also use the alignment commands to precisely arrange controls on the dialog box.

See Aligning and Spacing Dialog Box Controls on page 223.

NoteA dialog unit is based on the size of the dialog font, usually 8-point MS Sans Serif. A horizontal dialog unit is 1/4 the average width of the font and a vertical dialog unit is 1/8 the average height of the font.

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 box.) Hot text changes color and might also become underlined as the mouse pointer passes over it.

1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Add menu > Hot Text.

The Hot Text Control Settings dialog box appears.

3. Complete the dialog box:

LabelEnter the text to use as hot text.

WiseScript Package Editor Reference 213

Page 214: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

VariableSpecify the name of the script variable that stores the return value of this dialog box control.

ValueEnter the value that gets assigned to the variable if this button is clicked. 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 will refer to this control in the dialog box script. Leave this blank if you will not manipulate this control with a script.

ActionSelect an action for the control:

Return to Previous DialogDisplays the previously-displayed dialog box in the dialog box set. (Exception: The Back buttons on wizard dialog boxes do not use this option. They are controlled by the Wizard Loop script action.) If this is the first dialog box in the set, it returns to the installation script.

Return to ScriptReturns to the installation script, even if this dialog box was called from another dialog box in the dialog box set.

Display DialogDisplays the selected dialog box from the current set.

Abort InstallationThe end user is asked to confirm that the installation should be aborted.

Display Help ContextIf the HELPFILE variable points to a valid copy of a Windows help file, the specified numeric help context is displayed.

Execute ProgramStarts another application or links to a Web page. Click Edit to specify and configure the application to be started.

See Specifying Execute Program Settings on page 222.

Execute Named EventPasses a named event to the dialog box script. The DLG_EVENT_TYPE variable is set to the entered text.

See Creating a Custom Dialog Box Script on page 228.

Set FontNormally, all controls use the default font, which you set on the Dialog Box Properties dialog box. 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 box.

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.

WiseScript Package Editor Reference 214

Page 215: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

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 box. You can also use the alignment commands to precisely arrange controls on the dialog box.

See Aligning and Spacing Dialog Box Controls on page 223.

NoteA dialog unit is based on the size of the dialog font, usually 8-point MS Sans Serif. A horizontal dialog unit is 1/4 the average width of the font and a vertical dialog unit is 1/8 the average height of the font.

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 List Box ControlsA list box is 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.

1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Add menu > List Box.

The List Box Control Settings dialog box appears.

3. Complete the dialog box:

List Box TextEach line of this text is displayed as a separate item in the list box. Press Enter between selections so there is only one item per line.

VariableSpecify the name of the script variable that stores the return value of this dialog box control.

Control NameEnter the name by which you will refer to this control in the dialog box script. Leave this blank if you will not 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.

WiseScript Package Editor Reference 215

Page 216: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

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 check box 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. ScrollMark this to add a vertical scroll bar.

Horiz. ScrollMark this to add a horizontal scroll bar.

Disable No ScrollMark this to display a vertical scrollbar even if one is not needed.

Multi-SelectMark this to let the end user 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 to the Destination Directory selected by the end user.

Confirm If ExistsMark this to prompt for confirmation if the path that the end user enters already exists on the destination computer. Clear this check box to prevent the “This directory already exists” message from appearing.

ComponentsTo create named components, populate the Components field above and mark this check box.

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 box. You can also use the alignment commands to precisely arrange controls on the dialog box.

See Aligning and Spacing Dialog Box Controls on page 223.

NoteA dialog unit is based on the size of the dialog font, usually 8-point MS Sans Serif. A horizontal dialog unit is 1/4 the average width of the font and a vertical dialog unit is 1/8 the average height of the font.

WiseScript Package Editor Reference 216

Page 217: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

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 ControlsYou can play an animation on any of the installation dialog boxes by adding a Play AVI dialog box 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 box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204

2. Select Add menu > Play AVI.

The Play AVI Control Settings dialog box appears.

3. Complete the dialog box:

.AVI PathnameSpecify the path for the animation file (.AVI) to play on the dialog box.

Control NameEnter the name by which you will refer to this control in the dialog box script. Leave this blank if you will not manipulate this control with a script.

X-Position / Y-PositionSpecify the exact location of the control on the dialog box. You can also use the alignment commands to precisely arrange controls on the dialog box.

See Aligning and Spacing Dialog Box Controls on page 223.

NoteA dialog unit is based on the size of the dialog font, usually 8-point MS Sans Serif. A horizontal dialog unit is 1/4 the average width of the font and a vertical dialog unit is 1/8 the average height of the font.

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 animation from the beginning.

4. Click OK.

Adding Push Button ControlsPush buttons are simply buttons (example: OK or Cancel). When clicked, they perform an action, such as saving the dialog box data, closing the dialog box, or advancing to the next dialog box. Each dialog box must have at least one button that allows the end user to exit the dialog box.

1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Add menu > Push Button.

WiseScript Package Editor Reference 217

Page 218: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

The Push Button Control Settings dialog box appears.

3. Complete the dialog box:

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.

VariableSpecify the name of the script variable that stores the return value of this dialog box control.

ValueEnter the value that gets assigned to the variable if this button is clicked. This can be useful in a script when more than one button can dismiss a dialog box and you need to know which one the end user clicked.

Control NameEnter the name by which you will refer to this control in the dialog box script. Leave this blank if you will not manipulate this control with a script.

ActionSelect an action for the control:

Return to Previous DialogDisplays the previously-displayed dialog box in the dialog box set. (Exception: The Back buttons on wizard dialog boxes do not use this option. They are controlled by the Wizard Loop script action.) If this is the first dialog box in the set, it returns to the installation script.

Return to ScriptReturns to the installation script, even if this dialog box was called from another dialog box in the dialog box set.

Display DialogDisplays the selected dialog box from the current set.

Abort InstallationThe end user is asked to confirm that the installation should be aborted.

Display Help ContextIf the HELPFILE variable points to a valid copy of a Windows help file, the specified numeric help context is displayed.

Execute ProgramStarts another application or links to a Web page. Click Edit to specify and configure the application to be started.

See Specifying Execute Program Settings on page 222.

Execute Named EventPasses a named event to the dialog box script. The DLG_EVENT_TYPE variable is set to the entered text.

See Creating a Custom Dialog Box Script on page 228.

X-Position / Y-PositionSpecify the exact location of the control on the dialog box. You can also use the alignment commands to precisely arrange controls on the dialog box.

See Aligning and Spacing Dialog Box Controls on page 223.

WiseScript Package Editor Reference 218

Page 219: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

NoteA dialog unit is based on the size of the dialog font, usually 8-point MS Sans Serif. A horizontal dialog unit is 1/4 the average width of the font and a vertical dialog unit is 1/8 the average height of the font.

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. Specify only one default button per dialog box.

Do Not Check FieldsMark this to suppress directory confirmation and field validity checking (useful for Browse buttons).

4. Click OK.

The sample script Event Handler.wse uses scripting to handle push button controls. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

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 box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Add menu > Radio Button.

The Radio Button Control Settings dialog box appears.

3. Complete the dialog box:

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 box and uses the Back button. Mark this check box to cause any lowercase letters in the variable to stay in the variable, which makes disabled options retain their disabled state even when the end user navigates between dialog boxes. If this check box is cleared, the variable takes the value of the option that was selected, and the lowercase information is lost.

VariableSpecify the name of the script variable that stores the return value of this dialog box control.

WiseScript Package Editor Reference 219

Page 220: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

NoteIf you set the variable to a string containing one or more lowercase letters, the corresponding options are disabled in the radio button control when it appears on the dialog box. Example: A radio button with four options and a variable of “ABcd” would have the last two options disabled.

Control NameEnter the name by which you will refer to this control in the dialog box script. Leave this blank if you will not manipulate this control with a script.

X-Position / Y-PositionSpecify the exact location of the control on the dialog box. You can also use the alignment commands to precisely arrange controls on the dialog box.

See Aligning and Spacing Dialog Box Controls on page 223.

NoteA dialog unit is based on the size of the dialog font, usually 8-point MS Sans Serif. A horizontal dialog unit is 1/4 the average width of the font and a vertical dialog unit is 1/8 the average height of the font.

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.

The sample script License Agreement.wse uses scripting to handle radio button controls. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Adding Rectangle ControlsUse the Rectangle dialog box control to draw a box on the dialog box. Rectangle controls are static controls, which means that the end user cannot make changes to them.

1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Add menu > Rectangle.

The Frame/Rectangle Control Settings dialog box appears.

3. Complete the dialog box:

TypeSelect Frame or Rectangle. Operating systems used to treat rectangles and frames differently, but now there is no longer any difference.

BevelSpecify the 3D appearance of the frames or rectangles:

Inset. Frame/rectangle appears to sink into the dialog box.

Flush. Frame/rectangle appears at the same level with the dialog box.

Outset. Frame/rectangle appears to pop out of the dialog box.

WiseScript Package Editor Reference 220

Page 221: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

Control NameEnter the name by which you will refer to this control in the dialog box script. Leave this blank if you will not manipulate this control with a script.

X-Position / Y-PositionSpecify the exact location of the control on the dialog box. You can also use the alignment commands to precisely arrange controls on the dialog box.

See Aligning and Spacing Dialog Box Controls on page 223.

NoteA dialog unit is based on the size of the dialog font, usually 8-point MS Sans Serif. A horizontal dialog unit is 1/4 the average width of the font and a vertical dialog unit is 1/8 the average height of the font.

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 Text ControlsUse text controls to display information on a dialog box. Text controls are static controls, which means that the end user cannot change them.

1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Add menu > Text Control.

The Text Control Settings dialog box appears.

3. Complete the dialog box:

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

Control NameEnter the name by which you will refer to this control in the dialog box script. Leave this blank if you will not manipulate this control with a script.

Text AlignmentSelect how to align the text in the field.

Fit pathname to field widthIf the control displays a path, mark this to cause the path to be shortened, if necessary, to allow it to fit in the allotted space. Omitted directories are indicated in the path by “\…\”.

No WrapMark this to prevent text wrapping if the text is too long to display on a single line.

WiseScript Package Editor Reference 221

Page 222: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

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 check box, 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 box. Click this to override the default font for this control. If the font you select 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 box.

Transparent backgroundMark this to make the background for this control transparent.

Calculated ValueThis section is used primarily in component installations to display the space requirements for the selected components. Example: When a component installation is run, the Select Component Dialog displays the disk space required and the disk space remaining. 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 box. You can also use the alignment commands to precisely arrange controls on the dialog box.

See Aligning and Spacing Dialog Box Controls on page 223.

NoteA dialog unit is based on the size of the dialog font, usually 8-point MS Sans Serif. A horizontal dialog unit is 1/4 the average width of the font and a vertical dialog unit is 1/8 the average height of the font.

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.

Specifying Execute Program SettingsYou can execute a program or link to a Web page when the end user clicks a hot text or button control on a dialog box.

1. Open the Hot Text or Push Button Control Settings dialog box.

See Adding Hot Text Controls on page 213 or Adding Push Button Controls on page 217.

WiseScript Package Editor Reference 222

Page 223: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

2. Mark the Execute Program option and click Edit.

The Execute Program Settings dialog box appears.

3. Complete the dialog box:

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 file name 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, enter the URL for the Web page (example: http://www.sample.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 are displayed.

NoteThis field is 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 ExitMark this to pause the installation until the executed installation has exited.

4. Click OK.

Aligning and Spacing Dialog Box ControlsThe alignment and spacing commands help you align and space controls in relation to one another.

1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select multiple controls.

3. From the Layout menu, select one of the following commands:

Align Controls LeftAligns the left edge of the selected controls with the left edge of the leftmost control.

Align Controls RightAligns the right edge of the selected controls with the right edge of the rightmost control.

WiseScript Package Editor Reference 223

Page 224: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

Align Controls TopAligns the top edge of the selected controls with the top edge of the topmost control.

Align Controls BottomAligns 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 Box 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 box controls were created.

1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Layout menu > Set Tab Order.

A blue number appears next to each dialog box control, showing the current tab sequence. The first control in the tab order has the focus when a dialog box 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.

WiseScript Package Editor Reference 224

Page 225: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

When you click the last control, the numbers disappear and the new tab order is applied.

To exit the tab order view, press Esc.

NoteAlthough static controls (example: 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. Therefore, their actual tab order is irrelevant.

Solutions for Dialog Box ProblemsTypically, dialog boxes are not used in WiseScripts that run silently, or in WiseScripts that you use as custom actions in a Windows Installer installation.

For solutions to some of the most common dialog box editing problems, see:

Changing the Default Graphic on Wizard Dialog Boxes on page 225Disabling the Appending of the Program Files Directory on page 226Disabling the Directory Already Exists Message on page 226Keeping Disabled Controls From Reactivating on page 227About Custom Dialog Box Sets on page 227About Dialog Boxes on page 202

Dialog boxes can exhibit different behaviors based on end user input. See ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Changing the Default Graphic on Wizard Dialog BoxesBy default, wizard dialog boxes contain a graphic that is not part of the individual dialog boxes. It is specified on the Wizard Loop Settings dialog box, where you configure the Wizard Loop script action. You can change this graphic and turn it off for selected dialog boxes.

To change the bitmap that applies to all wizard dialog boxes

1. In Script 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 box. Change both of these to display the same graphic on all dialog boxes.

The Wizard Loop Settings dialog box appears.

See Wizard Loop on page 201.

2. In the Wizard Bitmap section, in Pathname, specify a path for a new graphic.

This changes the graphic for all dialog boxes in the loop sequence.

3. Click OK.

To turn off the wizard bitmap on selected wizard dialog boxes

1. In Script Editor, double-click the Custom Dialog script line for the dialog box.

The Custom Dialog Editor opens.

2. Select Edit menu > Dialog Box Properties.

The Dialog Box Properties dialog box appears.

See Setting Dialog Box Properties on page 205.

WiseScript Package Editor Reference 225

Page 226: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

3. Towards the bottom of the dialog box, 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 box, 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. In Script Editor, double-click the following line in the script:

Custom Dialog “Select Destination Directory”

The dialog box opens in the Custom Dialog Editor.

2. Select Window menu > Select Destination Directory.

The Select Destination Directory dialog box appears.

3. Double-click the list box control.

The List Box Control Settings dialog box appears.

4. Mark Don’t Append and click OK.

5. Select File menu > Save Changes and exit.

See also:

Solutions for Dialog Box Problems on page 225

Disabling the Directory Already Exists MessageWhen an end user runs the installation and selects an existing directory as the destination directory, a message warns that the directory already exists. This helps prevent the end user from installing to the wrong directory. However, you might want to disable the message.

1. In Script Editor, double-click the following line in the script:

Custom Dialog “Select Destination Directory”

The dialog box opens in the Custom Dialog Editor.

2. Select Window menu > Select Destination Directory.

The Select Destination Directory dialog box opens.

3. Double-click the list box control.

The List Box Control Settings dialog box appears.

4. Clear Confirm if Exists and click OK.

5. Select File menu > Save Changes and exit.

See also:

Solutions for Dialog Box Problems on page 225

WiseScript Package Editor Reference 226

Page 227: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

Keeping Disabled Controls From ReactivatingThis problem affects radio buttons and check boxes.

Example:

A dialog box in a wizard loop 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. If the end user selects an option and continues through the wizard dialog boxes, the dialog box works as designed. However, if the end user clicks the Back button to return to the dialog box that contains the radio button, then all four of the button’s options are enabled.

To correct this problem, mark the Retain Disabled check box on the settings dialog box for radio buttons and check boxes. This causes any lowercase letters in the variable to stay in the variable, even when the end user navigates between dialog boxes.

In the example above, if Retain Disabled is marked and an end user selects the first radio button option, 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 to “A.” That is why all four radio buttons are enabled when the end user backs up, because the variable does not contain “a,” “b,” “c,” or “d.”

About Custom Dialog Box SetsA single Custom Dialog script action can display a set of related dialog boxes. You do this by using a button on one dialog box as a gateway to another dialog box. This secondary dialog box can link to another dialog box, link back to the master dialog box, or return to the installation script. A single dialog box set can contain up to 256 separate dialog boxes. In WiseScript Package Editor, the Select Destination Directory and Backup Replaced Files dialog boxes on the Dialogs page are a dialog box set.

Generally, dialog box sets consist of one dialog box and the other dialog boxes that it calls. (Example: A dialog box might have an Options and Browse buttons, each of which opens a dialog box. The three dialog boxes together comprise a dialog box set.) The main dialog boxes that appear during installation are not a dialog box set, but are controlled by a Wizard Loop action in the script.

Creating a Dialog Box Set1. Create the master dialog box.

See Adding a Dialog Box to the Installation on page 203.

The master dialog box is the first dialog box that is displayed when the associated Custom Dialog script action is executed.

2. In the Custom Dialog Editor, select File menu > New Dialog.

The Dialog Box Properties dialog box appears.

3. Complete the dialog box and click OK.

See Setting Dialog Box Properties on page 205.

4. Configure the new dialog box.

See Adding and Editing Dialog Box Controls on page 207.

5. Link the set of dialog boxes together using push button controls. For information on the various actions you can assign to a button, see Adding Push Button Controls on

WiseScript Package Editor Reference 227

Page 228: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

page 217. You can link to another dialog box, link back to the master dialog box, or return to the installation script.

To switch between dialog boxes in the set, select the dialog boxes from the Window menu. (You can also delete the current dialog box using the Delete Dialog command on this menu.)

6. When you finish creating the dialog box set, select File menu > Save Changes and exit.

All the dialog boxes in the set are saved simultaneously.

Configuring Dialog Box Set PropertiesOn the Dialog Set Properties dialog box, you name the dialog box set and specify the variable on which to base the display of this set.

1. Open a dialog box from the set in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select Edit menu > Dialog Set Properties.

The Dialog Set Properties dialog box appears.

3. Complete the dialog box:

Dialog Set NameEnter the name of this dialog box set. If this dialog box set is comprised of only one dialog box, then this is usually the same name as the dialog box. The name must be unique within a wizard loop. This value is displayed in the installation script.

Display VariableThe display variable determines which dialog box in the wizard loop to present to the end user the next time the wizard loop is executed. When this dialog box is presented to the end user, the display variable is set to this dialog box set name. If this field is not blank, the dialog box is only displayed if the variable holds the same value as the Dialog Set Name field.

Called Dialogs FloatIf you are displaying a dialog box outside a wizard loop, mark this check box to have called dialog boxes appear in front of the calling dialog box. (Example: Suppose you display a Select Destination Directory dialog box that contains a Browse button. If this check box is marked, and the end user clicks Browse, the Browse dialog box appears in front of the Select Destination Directory dialog box instead of replacing it.) This behavior is built into the wizard loop dialog boxes by default.

4. Click OK.

Creating a Custom Dialog Box ScriptEach dialog box can include an attached WiseScript that lets you perform script actions in response to events inside a dialog box. You create this WiseScript in the Dialog Script Editor, which is a scaled-down version of Script Editor. It contains only those script actions that can be used in dialog box scripts. It lets you script dialog boxes to handle mouse movements, gather user input, and branch according to end user choices.

WiseScript Package Editor Reference 228

Page 229: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

Events are generated as the end user works with the dialog box on the destination computer. Built-in dialog box events include first-time display of the dialog box (INIT), updating of information displayed on the dialog box (UPDATE), and verification of the validity of the contents of the dialog box (VERIFY). Additional events, whose names you define, can be generated by marking the Execute Named Event option on the settings dialog box of push button or hot text controls.

To handle the generated events, you create a conditional structure in the dialog box 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.

To create a custom dialog box script

NoteBefore you write a custom dialog box script, review the introductory material in About Script Editor on page 96. Also see Conditions and Loops on page 111 and Variables and Expressions on page 112.

1. Open the dialog box in the Custom Dialog Editor.

See Editing Dialog Boxes on page 204.

2. Select View menu > Dialog Script Editor.

The Dialog Script Editor opens.

3. Create the script as you would in Script Editor.

The sample scripts Event Handler.wse and License Agreement.wse use scripting to handle mouse events. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Dialog Box Script ActionsThe script actions available in the Dialog Script Editor are a subset of the actions in Script Editor, with the addition of these script actions that manipulate controls on the dialog box programmatically: Set Control Attributes, Set Control Text, and Set Current Control.

Call DLL Function on page 126Check Configuration on page 132Check If File/Dir Exists on page 136Display Message on page 151Edit INI File on page 152Edit Registry on page 153Else Statement on page 157ElseIf Statement on page 157End Statement on page 158Get Registry Key Value on page 168Get System Information on page 169If Statement on page 172Parse String on page 183Prompt for Filename on page 185Read INI Value on page 187Remark on page 190

WiseScript Package Editor Reference 229

Page 230: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Dialog Boxes

Set Control Attributes on page 194Set Control Text on page 195Set Current Control on page 195Set Variable on page 197While Statement on page 200

Dialog Box Script Examples

To see an example of a dialog box script

1. Open the sample script Event Handler.wse in the Samples subdirectory of this product’s installation directory.

2. In Script Editor, double-click the Custom Dialog “Event Handler” script line.

The dialog box opens in the Custom Dialog Editor.

3. Select View menu > Dialog Script Editor.

The script for the dialog box appears in the Dialog Script Editor.

How you might use a dialog box script:

Have the INIT event enable buttons on the current dialog box if the end user answers a previous dialog box in a certain way. Check the variable containing the value returned from the previous dialog box, 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 previously chosen options.

Have the INIT event store the current amount of free memory in a static text control, then set the dialog box 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 box 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 box and reject the end user’s entry if it is not valid. VERIFY is called when the end user tries to exit the dialog box. Set the DLG_EVENT_TYPE variable to an empty string within the handler to prevent the dialog box from closing. If all fields are correct, do not change DLG_EVENT_TYPE.

Create a button on the dialog box that generates a custom event. Example: Create an event called DISKSPACE, and set its handler to show the amount of free disk space using a Display Message event.

WiseScript Package Editor Reference 230

Page 231: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Chapter 9Creating Custom Billboards

This chapter includes the following topics:

About Billboards on page 231

Accessing the Custom Billboard Editor on page 231

About the Custom Billboard Editor on page 232

Opening and Saving Custom Billboards on page 233

Adding Objects to a Billboard on page 233

About BillboardsBillboards 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.

NoteThis documentation covers both WiseScript Package Editor and WiseScript Editor. WiseScript Editor contains the same scripting interface as WiseScript Package Editor, but it does not contain the Installation Expert interface or other installation development tools. Therefore, some of the information in this document does not apply to WiseScript Editor.

Accessing the Custom Billboard Editor1. Select Script Editor.

2. In the Actions List, double-click the Custom Billboard action.

The Custom Billboard Editor window opens.

WiseScript Package Editor Reference 231

Page 232: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Billboards

The tools you need to work in the Custom Billboard Editor are accessible from its menu

bar or the icons on the toolbar.

Note(WiseScript Package Editor only) Although the Custom Billboard Editor is only accessible through the Script Editor, you can add the graphics that you create with the editor on the Billboards page.

About the Custom Billboard EditorThe 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 of the destination computer.

In the Custom Billboard Editor, 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 installation.

WiseScript Package Editor Reference 232

Page 233: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Billboards

(WiseScript Package Editor only) You can use the Screen page to specify the background that displays during the installation.

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. When you save a billboard as a separate file, it is assigned the extension .GRF.

(WiseScript Package Editor only) After you create the billboards for your installation, you can select the ones to display and arrange their order on the Billboards page.

Opening and Saving Custom BillboardsYou 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 appears when you open the Custom Billboard Editor.

The commands on the File menu are:

OpenOpens a billboard from a .GRF file, importing it to the current installation.

Save AsSaves a billboard to a .GRF file so you can share the file with others, or re-use it on future projects.

Exit Without SavingReturns to Script Editor without saving the changes made to the billboard.

Save Changes and ExitSaves the changes made to the billboard and returns to Script Editor saving the graphic as part of the installation. It is only saved as a separate file if you use Save As.

Adding Objects to a BillboardThe 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 231.

2. From the Add menu, select an 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.)

A settings dialog box appears.

4. Complete the dialog box:

For text objects, see Editing Billboard Text Objects.

For line objects, see Editing Billboard Line Objects on page 234.

For rectangles, rounded rectangles, and ellipses, see Editing Billboard Rectangles and Ellipses on page 235.

For polygons, see Editing Billboard Polygon Objects on page 235.

For bitmaps, see Editing Billboard Bitmap Objects on page 236.

WiseScript Package Editor Reference 233

Page 234: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Billboards

5. Click OK.

6. Position the object on the billboard.

See Resizing, Moving, and Aligning Billboard Objects on page 237.

Editing Billboard Text ObjectsText you place on a billboard using the Text tool is editable. 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 231.

2. Select Add menu > Text and drag the dimensions of the object in the billboard editor.

The Text Settings dialog box opens.

3. Complete the dialog box:

TextEnter the text to display. No variables can be referenced here, except compiler variables.

Extra Bold

Shadow

AlignmentSpecify the alignment of the text within its bounding rectangle.

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 selected a TrueType font.

Font StyleClick Set Font to choose the font, size, and style for this object.

Text ColorClick Pick to choose a color for the text.

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

2. Select Add menu > Line and drag the dimensions of the object in the billboard editor.

The Line Settings dialog box opens.

3. Complete the dialog box:

WiseScript Package Editor Reference 234

Page 235: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Billboards

Line StyleChoose the texture for the line.

Line ArrowsDetermines which ends of the line will have arrowheads.

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.

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

2. Select Add menu > Rectangle or Rounded Rectangle or Ellipse and drag the dimensions of the object in the billboard editor.

The Object Settings dialog box opens.

3. Complete the dialog box:

Line StyleChoose the texture for the line that outlines the shape.

Fill StyleSelect a pattern to fill the object.

3D(Rectangle only) Select a 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.

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.

WiseScript Package Editor Reference 235

Page 236: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Billboards

1. Access the Custom Billboard Editor.

See Accessing the Custom Billboard Editor on page 231.

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 box opens.

3. Complete the dialog box:

Line StyleChoose the texture for the line that outlines the polygon.

Fill StyleSelect a pattern to fill the object.

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.

4. Click OK.

Editing Billboard Bitmap ObjectsUse the Bitmap object to import bitmaps into a custom billboard. Use the text tool in the Custom Billboard Editor to add captions and content to the bitmap, rather than making the text part of the bitmap, so that you can edit the text later.

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 box. 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 231.

2. Select Add menu > Bitmap and drag the dimensions of the bitmap frame in the billboard editor.

Closing the polygon.

WiseScript Package Editor Reference 236

Page 237: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Billboards

The Bitmap Settings dialog box opens.

3. Complete the dialog box:

PathnameSpecify the path to a bitmap.

TransparentMark this to make the color in Transparent Color transparent.

Transparent ColorClick Pick to choose which color in the bitmap will be transparent. Every pixel in the image with this color becomes transparent.

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.

4. Click OK.

Resizing, Moving, and Aligning Billboard ObjectsResize an object in the Custom Billboard Editor by clicking it and dragging one of the eight handles that appear around the object.

Move objects in the Custom Billboard Editor by clicking and dragging them. For fine placement of objects, use the arrow keys on the keyboard to nudge an object one pixel at a time.

When two or more objects overlap, you can choose which one appears in front 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 Script Editor.

2. Use Shift+click to select multiple objects.

3. Select one of the following commands from the Layout menu:

Align Left

Align Right

Align Top

Align Bottom

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.

WiseScript Package Editor Reference 237

Page 238: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Creating Custom Billboards

Setting Billboard PropertiesWhen you are done creating a billboard, use the Billboard Settings dialog box 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 Script Editor.

2. Select Edit menu > Graphic Properties.

The Billboard Settings dialog box appears. The options on this dialog box are a subset of the settings for the Display Billboard script action.

3. Complete the dialog box:

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.

Center Vertical

Place at Bottom

Tile BackgroundMark this check box to repeat the graphic edge-to-edge to fill the entire screen.

Erase AllMark this check box to remove all previous graphics from the screen before displaying the new one.

Timed DisplayMark this check box 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 use Timed Display.

(WiseScript Package Editor only) To slow the installation speed so that each billboard displays long enough to be read, select Installation Expert > Build Settings page and mark Slow Installation Speed.

4. Click OK.

WiseScript Package Editor Reference 238

Page 239: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Chapter 10Tools

This chapter includes the following topics:

About WiseScript Package Editor Tools on page 239

ApplicationWatch on page 239

About WiseScript Package Editor ToolsWiseScript Package Editor only

The WiseScript Package Editor contains powerful tools that perform specialized functions.

You can start a tool by selecting its name from the Tools menu. Some tools are also available on the Tools toolbar. To display the Tools toolbar, select View menu > Toolbars > Tools.

WiseScript Package Editor Tools

ApplicationWatch, which monitors your computer as you execute an application or run an installation and determines which .DLL, .OCX, and .EXE files were accessed. It then adds these files to a new installation.

See ApplicationWatch in the Wise Package Studio Help.

Import Visual Basic Project

See Import Visual Basic Project on page 240.

NoteThis documentation covers both WiseScript Package Editor and WiseScript Editor. WiseScript Editor contains the same scripting interface as WiseScript Package Editor, but it does not contain the Installation Expert interface or other installation development tools. Therefore, some of the information in this document does not apply to WiseScript Editor.

ApplicationWatchWiseScript Package Editor only

ApplicationWatch™ monitors your computer as you execute an application or run an installation and determines which .DLL, .OCX, and .EXE files were accessed. It then adds these files to a new installation. You can use this tool for informational purposes or to facilitate the creation of a new installation.

See Creating a Package with ApplicationWatch in the Wise Package Studio Help.

1. Complete the Run Application page:

WiseScript Package Editor Reference 239

Page 240: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Tools

Application PathSpecify the full path of the application executable to run.

Command OptionsEnter any command-line options to apply to the executable. Refer to the source application’s documentation for applicable command-line options.

2. Click Execute, which starts the source application.

3. In the source application, use all possible features except printing. If you are watching an installation, run the installation through to completion.

Use as many of the application’s features as possible to ensure that files used by rarely-used features are recorded. Do not use the application to print, because printing accesses Windows operating system and printer-specific files.

Import Visual Basic ProjectWiseScript Package Editor only

The Import Visual Basic Project tool lets you import a Visual Basic 5 or 6 project file into an installation file. You specify information about the project, and the tool extracts information, such as source file paths, and integrates it into a new or existing installation.

This tool only supports projects of file type .VBP. Only ActiveX EXE, Standard EXE, and ActiveX DLL project types are supported.

Verify that the necessary files and dependency files required by the VB application are available.

Verify that the files that require self-registration are marked to self-register. To check this, view the properties of the file, and if the version section contains Ole Self Register, then the file must be self-registered. A file might fail self-registration because it doesn’t need to be registered, because it’s missing a dependent file, because it might require regsvr.exe to be run manually, or because it is corrupt.

There is no link between a VB 5 or 6 project or solution and the installation you create for the project or solution. If your solution or project is updated with new files, you must make those changes in the installation manually.

This tool is not designed to set up a remote automation or a DCOM™ server automatically.

NoteFiles that you specify in System .DLLs to Exclude in Preferences are ignored.

See Setting Preferences on page 23.

To create an installation based on a Visual Basic project

1. Select Tools menu > Import Visual Basic Project. This adds the imported installation’s information to the current installation file. This is the same as selecting File menu > Import > Visual Basic Project.

The Project File page appears.

2. In VB Project File, specify the path to the project file and click Next.

The Select Visual Basic Directory page appears.

WiseScript Package Editor Reference 240

Page 241: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Tools

Specify the directory on your computer where Visual Basic 5 or 6 is installed. This directory contains the support files that must be included in the installation because they are needed by the Visual Basic program.

3. Click Next.

The Scanning Project Files page appears. During or after the scan, additional prompts and pages might appear:

If the project is out of date or missing, a prompt appears. You can try to rebuild the project from this tool, or open the development environment and rebuild the project from there.

If the project has a reference to another project, an error message appears and the import ends. Restart the import and select the solution file (.SLN) that contains both projects.

If dependency files (.DEP) for Win32 target files are missing, the Dependency Files Not Found page appears. Dependency files list referenced files. This page usually does not apply to .NET projects, which use assembly manifests instead of dependency files, unless the .NET project depends on a COM .DLL that has a dependency. If the dependency files cannot be read, then the files they refer to cannot be added to the installation you are creating.

If any files on the Dependency Files Not Found page are crucial to this installation:

a. Cancel the import.

b. Locate the files and move them to the System or System32 directory.

c. Restart the import.

4. Click Next.

If target files were not found during the scan, the Files Not Found page appears. Files might be missing if the configuration of the solution that you selected has not been built. Missing files will cause compile errors in the installation that results from this import process.

Otherwise, the Installation Files page appears.

5. If the Files Not Found page appears:

a. Select a file and click Browse to locate missing files.

b. Click Next.

The Installation Files page appears.

6. The Installation Files page lists the files that were detected during the scan and will be added to the installation.

7. To add or remove files in the installation, click Add or Delete and then click Next.

The Application Installation Information page appears.

8. Complete the page:

Install TitleEnter a name for the installation. This overwrites the Installation Title field on the Product Details page. If you don’t want to overwrite the current installation title, leave this blank.

WiseScript Package Editor Reference 241

Page 242: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Tools

Install DirectoryEnter the default installation directory where files from this import should be placed. This determines the folder on the Files page in which all added files are placed.

Icon NameEnter the name you want to assign to the .EXE file’s icon in the program folder.

Start Menu NameEnter a name for the folder that will appear in the Programs folder in the Windows Start menu. If you leave this blank, the folder is placed in the top level of the Start menu.

Help File Icon NameEnter a name for the icon assigned to your program’s .HLP file. This field is unavailable if the Visual Basic project does not contain a help file.

9. Click Finish to complete the import.

The project is integrated into an installation file, which contains all the information it needs to install the project. Options are pre-filled on the Files and Product Details pages. As with any installation, you should compile and test the installation thoroughly to ensure it operates correctly.

WiseScript Package Editor Reference 242

Page 243: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Chapter 11Troubleshooting WiseScripts

This chapter includes the following topics:

About Troubleshooting a WiseScript on page 243

Using the Installation Log on page 243

File Replacement Problems in System32 on page 244

About Troubleshooting a WiseScriptUse the following features to troubleshoot a WiseScript:

NoteThis documentation covers both WiseScript Package Editor and WiseScript Editor. WiseScript Editor contains the same scripting interface as WiseScript Package Editor, but it does not contain the Installation Expert interface or other installation development tools. Therefore, some of the information in this document does not apply to WiseScript Editor.

Using the Installation LogThe installation log is a text file that helps you debug your script. The log is the most complete record of what the installation did. 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.

Installation log Lets you determine what happens during the installation, including what fails.

See Using the Installation Log on page 243.

Built-in debugger Lets you step through your script to make sure it functions properly or run to a breakpoint to view the script and the values of variables.

See Using the Debug Commands on page 108.

Compiler variables Let you build a debug version of your installation .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 installation .EXE.

See Compiler Variables on page 44.

WiseScript Package Editor Reference 243

Page 244: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Troubleshooting WiseScripts

Use the installation log to determine where problems occur and why. Quality assurance can use it to check the accuracy of the installation. It also helps technical support because end users who have problems installing can email 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 122.

(WiseScript Package Editor only) You can enable or disable the installation log and choose its location on the Installation Log page.

See Installation Log on page 59.

File Replacement Problems in System32Following are file replacement problems you might encounter:

Files that 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 its Install File(s) script line. (In WiseScript Package Editor, double-click the file on the Files page.) In the Install File Settings dialog box 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 the WiseScript Package Editor version checking method instead of Microsoft’s. To change the version checking method to the WiseScript Package 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

WiseScript Package Editor Reference 244

Page 245: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Chapter 12Quick Reference

This chapter includes the following topics:

Automatic Compiler Variables on page 245

Automatic Run-time Variables on page 246

Run-time Variables on page 248

SVS Variables on page 250

Expression Operators on page 253

Windows Language Codes on page 254

Command-Line Options on page 255

Automatic Compiler VariablesNoteThis documentation covers both WiseScript Package Editor and WiseScript Editor. WiseScript Editor contains the same scripting interface as WiseScript Package Editor, but it does not contain the Installation Expert interface or other installation development tools. Therefore, some of the information in this document does not apply to WiseScript Editor.

Compiler variables are set before the installation is built and cannot be changed by an installation script. Paths are relative to the build computer, not the destination computer. You can create and initialize compiler variables by adding an entry to the Compiler Variables page.

See Compiler Variables on page 44.

Variable Description

_ALIASNAME_ BDE Alias name

_ALIASPATH_ BDE Alias path

_ALIASTYPE_ BDE Alias type

_BDEWIN16DIR_ BDE directory for 16-bit systems

_BDEWIN32DIR_ BDE directory for 32-bit systems

_BDEWIN32INST_ BDE custom directory for use on systems that previously did not have BDE installed

_BDEWIN32LANG_ BDE language code

_BDEWIN32OPT_ BDE options

_LOGFILE_PATH_ Path to the Install.log file

_ODB16_ ODBC directory for 16-bit systems

WiseScript Package Editor Reference 245

Page 246: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Quick Reference

See also:

Automatic Run-time Variables on page 246Run-time Variables on page 248

Automatic Run-time VariablesThese variables are set on the destination computer just before the script executes.

_ODBC32_ ODBC directory for 32-bit systems

_SYS_ The Windows system directory on the build computer

_VAR_LIST_ Contains all the variables defined in this installation file, but not compiler variables

_VB4WIN16DIR_ Visual Basic directory for 16-bit systems

_VB4WIN16OPT_ Visual Basic options for 16-bit systems

_VB4WIN32DAO_ Visual Basic DAO directory

_VB4WIN32DIR_ Visual Basic directory for 32-bit systems

_VB4WIN32OPT_ Visual Basic options for 32-bit systems

_VFOXPRODIR_ Visual FoxPro directory

_VFPOPTIONS_ Visual FoxPro options

_WIN_ Windows directory on the build computer

_WISE_ The directory containing WiseScript Package Editor

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

BDE_CONFIGDIR Directory where the BDE configuration file is stored on the destination computer. This is the directory where idapi32.dll is installed and registered. It is used by the BDE runtime script for installing new aliases and for ensuring that updates to the BDE get installed into the correct directory. We recommend that you do not change this variable.

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.

Variable Description

WiseScript Package Editor Reference 246

Page 247: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Quick Reference

DLG_EVENT_TYPE Used for custom dialog box scripts. Built-in dialog box events are INIT, UPDATE, VERIFY.

See Creating a Custom Dialog Box Script on page 228.

FONTS Path to the directory where fonts should be installed.

HELPFILE Used by custom dialog boxes to display a help context. Set this to the full path of the help file. We recommend that you do not change this variable.

INST Path to the directory containing the installation .EXE. We recommend that you do not change this variable.

INST_LOG_PATH Full path in which 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 restart. The file was in use and will be installed on restart. (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 this 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

WiseScript Package Editor Reference 247

Page 248: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Quick Reference

See also:

Automatic Compiler Variables on page 245Run-time Variables on page 248

Run-time VariablesYou can use the following run-time variables in your script.

(WiseScript Package Editor only) These variables might be set or used by script actions that are generated by Installation Expert. Depending on settings you chose in Installation Expert, these variables might not have assigned values.

RESTART At the end of the script, set this variable to:

S -

If the current end user does not have administrator privileges, logs the user off.

If the current end user has administrator privileges, performs a full system restart at completion of the script.

W -

Logs the user off.

When left blank, it turns off the RESTART function.

SYS Windows System directory path. We recommend that you do not change this variable.

SYS32 Path to the system directory for Win32 files. We recommend that you do not change this variable.

TEMP Windows temporary directory path. We recommend that you do not change this variable.

UNINSTALL_LANG Language information to make the UNWISE.EXE language match the installation language.

UNINSTALL_PATH Location to place UNWISE.EXE.

WIN Path to the Windows directory. We recommend that you do not change this variable.

Variable Description

APPTITLE The title of the installation. In WiseScript Package Editor, this variable takes the value of the Installation Title on the Product Details page.

BACKUP Path to the end user’s selected backup directory on the destination computer.

BRANDING If this is set to 1, user information is written to CUSTDATA.INI in the directory containing the installation .EXE.

Variable Description

WiseScript Package Editor Reference 248

Page 249: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Quick Reference

CDESKTOPDIR Common desktop directory for adding shortcuts to desktop.

CGROUPDIR Path to the directory where shortcuts for all end users are stored on Windows operating systems.

COMMON Common files directory.

COMPONENTS A list of the components the end user selects for installation on the destination computer (A for the first component, B for the second, etc.).

CSTARTMENUDIR Common Start menu directory for adding shortcuts to the Start menu.

CSTARTUPDIR Common StartUp directory for adding shortcuts to the StartUp group.

DESKTOPDIR Desktop directory for adding shortcuts to the desktop.

DIRECTION Used by the Wizard Loop action to control direction of motion through dialog boxes.

DISPLAY Holds the name of the current wizard dialog box (read-only).

DOBACKUP Holds the end user’s choice as to whether to back up replaced files.

DOBRAND If this is set to 1, this is the first time the installation has been branded and user information is written to CUSTDATA.INI.

EXPLORER If this is 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 the directory where application shortcuts should be created (corresponds to GROUP variable).

MAINDIR Directory for application files.

NAME Used for branding and registration.

Variable Description

WiseScript Package Editor Reference 249

Page 250: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Quick Reference

See also:

Automatic Compiler Variables on page 245Automatic Run-time Variables on page 246

SVS VariablesYou can use the following SVS variables in some of the SVS script actions.

See About SVS Script Actions on page 119.

System Variables

System variables are static properties of a layer.

PROCEXITCODE Lets you add 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. At the end of the installation, if 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 check box on the Execute Program Settings dialog box for the Execute Program action.

(WiseScript Package Editor only) Also, 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.

STARTUPDIR Directory of the StartUp group for adding shortcuts.

VER_CHECK_TYPE Set this to 1 to cause the installation to use the WiseScript 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 this variable before the Install File(s) script line that exhibits the problem.

See File Replacement Problems in System32 on page 244.

WISE_ERROR_RTN Lets you write errors to the installation log. Check for an error condition and, if the error condition is true, put your own error text into WISE_ERROR_RTN. At the end of the installation, if WISE_ERROR_RTN is not blank, the contents of WISE_ERROR_RTN are written to the installation log.

Variable Description

WiseScript Package Editor Reference 250

Page 251: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Quick Reference

Per User Variables

Per user variables are static properties of a layer.

Variable Description Example Value

SYSTEMDRIVE The drive letter that contains the Windows directory that the system started.

C:

WINDIR The Windows directory that was started.

C:\Windows

PROFILESDIRECTORY The directory that contains local user profile information.

C:\Documents and Settings

ALLUSERSPROFILE The directory that contains the All Users profile.

C:\Documents and Settings\All Users

DEFAULTUSERPROFILE The directory that contains the Default User profile.

C:\Documents and Settings\Default User

COMMONADMINTOOLS C:\Documents and Settings\All Users\Start Menu\Programs\Administrative Tools

COMMONAPPDATA C:\Documents and Settings\All Users\Application Data

COMMONDESKTOP C:\Documents and Settings\All Users\Desktop

COMMONDOCUMENTS C:\Documents and Settings\All Users\Documents

COMMONFAVORITES C:\Documents and Settings\All Users\Favorites

COMMONPROGRAMS Folder that contains common items that appear under Start Menu / All Programs.

C:\Documents and Settings\All Users\Start Menu\Programs

COMMONSTARTMENU C:\Documents and Settings\All Users\Start Menu

COMMONSTARTUP C:\Documents and Settings\All Users\Start Menu\Programs\Startup

COMMONTEMPLATES C:\Documents and Settings\All Users\Templates

COMMONMUSIC C:\Documents and Settings\All Users\Documents\My Music

COMMONPICTURES C:\Documents and Settings\All Users\Documents\My Pictures

COMMONVIDEO C:\Documents and Settings\All Users\Documents\My Videos

PROGRAMFILES C:\Program Files

MEDIAPATH C:\Windows\Media

COMMONFILES C:\Program Files\Common Files

MSSHAREDTOOLS C:\Program Files\Common Files\Microsoft Shared

WiseScript Package Editor Reference 251

Page 252: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Quick Reference

Variable Description Example Value

ADMINTOOLS C:\Documents and Settings\User\Start Menu\Programs\Administrative Tools

APPDATA C:\Documents and Settings\User\Application Data

CACHE C:\Documents and Settings\User\Local Settings\Temporary Internet Files

CDBURNING C:\Documents and Settings\User\Local Settings\Application Data\Microsoft\CD Burning

COOKIES C:\Documents and Settings\User\Cookies

DESKTOP C:\Documents and Settings\User\Desktop

FAVORITES C:\Documents and Settings\User\Favorites

FONTS C:\WINDOWS\Fonts

HISTORY C:\Documents and Settings\User\Local Settings\History

LOCALAPPDATA C:\Documents and Settings\User\Local Settings\Application Data

LOCALSETTINGS C:\Documents and Settings\User\Local Settings

MYMUSIC C:\Documents and Settings\User\My Documents\My Music

MYPICTURES C:\Documents and Settings\User\My Documents\My Pictures

MYVIDEO C:\Documents and Settings\User\My Documents\My Videos

NETHOOD C:\Documents and Settings\User\NetHood

PERSONAL C:\Documents and Settings\User\My Documents

PRINTHOOD C:\Documents and Settings\User\PrintHood

PROGRAMS Folder that contains user specific items that appear under Start Menu / All Programs.

C:\Documents and Settings\User\Start Menu\Programs

RECENT C:\Documents and Settings\User\Recent

SENDTO C:\Documents and Settings\User\SendTo

STARTMENU C:\Documents and Settings\User\Start Menu

STARTUP Folder that contains user specific items to be run on startup on the destination computer.

C:\Documents and Settings\User\Start Menu\Programs\Startup

TEMPLATES C:\Documents and Settings\user\Templates.

TEMP Folder where temporary files can be created.

C:\DOCUME~1\User\LOCALS~1\Temp

WiseScript Package Editor Reference 252

Page 253: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Quick Reference

Expression OperatorsIn conditionals, loops, and Set Variable commands, you can use the following operators: symbols, functions, or logical operators.

Operators can operate on a variable or a constant. There are two 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 the % characters around the variable name. Variables must follow standard naming conventions.

See Variables and Expressions on page 112.

For details on scripts that demonstrate using expression operators, see the sample scripts that manipulate strings and perform calculations. For details on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.

Symbols

Functions

USERPROFILE Location of the current user’s profile.

C:\Documents and Settings\User

+ Addition

– Subtraction

* Multiplication

/ Division

Left$(str, position) Returns the left portion of a string, where str is the string, and position is the number of characters from the left to return. Example: Left$(“windows”,3) returns “win.”

Right$(str,position) Returns the right portion of a 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 the middle portion of a 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) Joins two strings.

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.

Variable Description Example Value

WiseScript Package Editor Reference 253

Page 254: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Quick Reference

Logical Operators

Windows Language CodesWiseScript Package Editor only

For additional language codes, search for “Language Code and Scripts” in the MSDN Library (msdn.microsoft.com/library).

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.

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

Language Code Script

Belgian (Flemish) NLB Latin 1

Czech CSY Latin 2

Danish DAN Latin 1

Dutch (Standard) NLD Latin 1

WiseScript Package Editor Reference 254

Page 255: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Quick Reference

Command-Line OptionsYou can set command-line options when you run WiseScript Package Editor, the installation executable, and the uninstaller executable. These are especially useful for running an installation as part of a batch file or other automated installation system.

English (American) ENU Latin 1

English (Australian) ENA Latin 1

English (British) ENG Latin 1

English (Canadian) ENC Latin 1

English (Ireland) ENI Latin 1

English (New Zealand) ENZ Latin 1

Finnish FIN Latin 1

French (Belgian) FRB Latin 1

French (Canadian) FRC Latin 1

French (Standard) FRA Latin 1

French (Swiss) FRS Latin 1

German (Austrian) DEA Latin 1

German (Standard) DEU Latin 1

German (Swiss) DES Latin 1

Greek ELL Other

Hungarian HUN Latin 2

Icelandic ISL Latin 1

Italian (Standard) ITA Latin 1

Italian (Swiss) ITS Latin 1

Japanese JPN Hira;Kana;Hani

Norwegian (Bokmal) NOR Latin 1

Norwegian (Nynorsk) NON Latin 1

Polish PLK Latin 2

Portuguese (Brazilian) PTB Latin 1

Portuguese (Standard) PTG Latin 1

Russian RUS Cyrillic

Slovak SKY Latin 2

Spanish (Mexican) ESM Latin 1

Spanish (Modern) ESN Latin 1

Spanish (Standard/Traditional) ESP Latin 1

Swedish SVE Latin 1

Turkish TRK Latin 2

Language Code Script

WiseScript Package Editor Reference 255

Page 256: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Quick Reference

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 Package Editor. When compile errors occur, a dialog box appears during compile with a specific error message.

WiseScript Command-Line OptionsYou can apply the following command-line options to the WiseScript Package Editor executable file, Wise32.exe. Command-line options let you compile as well as set properties.

Examples:

Compiling a .WSE file while defining a compiler variable named _PATH_:

"product_installation_directory\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:

“product_installation_directory\Wise32.exe” /c /d=C:\Development\Compile.txt “C:\Development\Application.wse”

Automated build process

You can use command-line options in conjunction with other processes to create an automated build process.

1. Enter the following command-line statement into a batch file or program that has the ability to run command-line statements:

“product_installation_directory\Wise32.exe” /c /s “C:\Development\Application.wse”

2. Use Scheduled Tasks in Control Panel to schedule the running of the batch file.

NoteTo test the options without the scheduling program, select Windows Start menu > Run, type cmd, click OK, and type a command-line statement in the command-line window.

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

/r Opens the application in SetupCapture mode.

/u Checks for updates on the Wise Web site.

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

WiseScript Package Editor Reference 256

Page 257: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Quick Reference

WiseScript Installations Command-Line OptionsYou can apply the following command-line options to .EXE files that you compile from WiseScript Package Editor projects.

Uninstall Command-Line OptionsYou can apply the following command-line options to the WiseScript Package Editor uninstall executable file, 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.

/T Installs in Test mode.

/X path Extracts files to the specified path.

/Z path Extracts files to the specified path, then restarts.

/M Runs the installation in manual mode, prompting for system directories (examples: Windows, System).

/M=file name Specifies a values file for installation.

For information on reading variables, see Set Variable on page 197.

/M1 Displays the name of each self-registering .OCX or .DLL as it is registered.

/M2 Reserved for internal use by WiseScript Package 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.

/Z Removes empty directories, including the one containing Unwise.

/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 dialog boxes, and no end user choices.

/R Rollback mode.

WiseScript Package Editor Reference 257

Page 258: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Quick Reference

Example:

"C:\Program Files\Application\Unwise.exe" /A "C:\Program Files\Application\Install.log" Application Uninstall

You can specify the title of the Uninstall dialog box 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.”

/U Removes the Select Uninstall Method dialog box, which means the end user does not see options for a custom, automatic, or repair uninstall.

WiseScript Package Editor Reference 258

Page 259: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software

Index

Symbols% sign with compiler variable 113_ALIASNAME_ 245_ALIASPATH_ 245_ALIASTYPE_ 245_BDEWIN16DIR_ 245_BDEWIN32DIR_ 245_BDEWIN32INST_ 245_BDEWIN32LANG_ 245_BDEWIN32OPT_ 245_LOGFILE_PATH_ 59, 245_ODB16_ 245_ODBC32_ 246_SYS_ 246

_VAR_LIST_ 246_VB4WIN16DIR_ 246_VB4WIN16OPT_ 246_VB4WIN32DAO_ 246_VB4WIN32DIR_ 246_VB4WIN32OPT_ 246_VFOXPRODIR_ 246_VFPOPTIONS_ 246_WIN_ 246_WISE_ 246

Numerics386 47386Enh 47, 1253D-style dialog boxes 41

Aabout 51action

about 119adding to script 101Also see actions by namecopying 101custom list 99dialog box 229pasting 101repeating 111

action group 99Actions list 98Activate SVS Layer 121Active Directory page 36Add Directory to Path 121Add File to SVS Layer 121Add Text to Install.log 122

Add to Autoexec.bat 123Add to Config.sys 124Add to System.ini 125Add/Remove Programs page 37administrator rights, checking 133After$ 254Altiris Support Helpdesk 10animation on dialog box 217Apollo 70append data to registry key 69, 156application

executing 158exit code 164name 64Program Files directory 226repairing 28watching 239

Application Manager 180ApplicationWatch 239APPTITLE 248ASP 185audio support 78Authenticode 49Autoexec.bat

adding command 38, 38backing up 124backing up before editing 39editing 123PATH variable 121

Autoexec.bat page 38automated build process 45, 256automatic run-time variable 246automatic self-repair 28, 55, 177AVI

control 217playing 184

Bback up replaced file on destination computer 48background of installer

displaying images in 149setting 71

background processing 24BACKUP 248backup copy during save 23BACKUPDIR 246, 246batch file, scheduling 256BDE_CONFIGDIR 246beep for next disk 42

Before$ 254billboard

about 232adding 39adding to script 149arranging object 237bitmap, adding 236editing text 234ellipse, adding 235exporting 233importing 233line, adding 234location 238moving object 237number to display 238object, adding 233opening 233overlapping object 237polygon, adding 235properties 238rectangle, adding 235resizing object 237saving 233scaling to screen 40, 238settings 238slowing down 238timing the display 238transition 238working with 232

Billboards page 39binary file

reading from 189writing to 189

bitmapadding to billboard 236displaying in background 149,

231Bitmap Settings dialog box 237blank line in script 190blank script 14BRANDING 248branding/registration 48Browse for Directory 126BUFFERS 196Build Settings page 41build, automated 45, 256built-in dialog box event 229

CCAB file 43CAB File page 43

WiseScript Package Editor Reference 259

Page 260: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
CAB file, mobile device

about 180adding to installation 181device support 181

cabinet fileSee CAB file

CabWizabout 180

Call COM Object 163Call DLL Function

example using structure 130script action 126

cancel script 100CAPICOM 49Capture Application to SVS Layer 131CD

copying files from 42, 139storing installation 61

CDESKTOPDIR 249CD-ROM drive, getting 170CER file 49CGI 185CGROUPDIR 249Change SVS Layer GUID 132check box control

adding to dialog box 207problem with disabling 227

Check Configuration 132Check Disk Space 133Check HTTP Connection 135Check If File/Dir Exists 136Check In-use File 137Check Service 137Chinese installation 60CMDLINE 246code signing

See digital signaturecolor, in script 24, 98combo box control

adding to dialog box 208pre-selected option 209size requirement 210

command-line optionsabout 255automated build 256compile 256silent compile 256silent installation 257silent uninstall 257test mode 257uninstall 257WiseScript executable 256WiseScript project 257

comment out lines 102comments in scripts 190COMMON 249

company name, getting 170compile

automated 45, 256errors 256from command line 256in background 24installation 17options 41silently 256speeding 24stopping 172

compiler variableabout 44, 113adding to script 138defining for SVS Driver 70description 245disabling prompt 45entering into an expression 113example 109list of 245naming convention 113percent sign 113prompting for value 45referenced in script 44sample script 44setting 44underscore 113

Compiler Variable Else 138Compiler Variable End 138Compiler Variable If 138Compiler Variables page 44complex structure 130component

about 115adding 45conditional statement with 46disk space for 222installed by default 46list box for 216optional 48program file for 45selecting for installation 48size, modify 182

component-based installation, sample 45COMPONENTS 115, 134, 182, 249Components page 45Concat$ 253conditional loop 111Config ODBC Data Source 139Config.sys

adding command 46backing up before editing 47, 125editing 124

Config.sys page 46connection lines in script 99Contained within structure 130control

attributes 194

changing text 195setting to current 195

control, dialog boxabout 206adding 207aligning 223check box, See check boxcombo box, See combo boxdrop-down 208edit text 210editing 207frame 220graphic 212group box 213hot text 213list box 215location 223play AVI 217push button 217radio button 219rectangle 220spacing 223static 212, 221tab order 224text 221

convert script message 15Copy Local File(s) 139CRC 42Create Directory 142Create Directory in SVS Layer 142Create Service 143Create Shortcut 144Create Shortcut in SVS Layer 145Create SVS Layer 146Create Virtual Directory 147credentials file 49, 50CRLF 246Crystal Reports, runtime support 70CSTARTMENUDIR 249CSTARTUPDIR 249Custom Billboard 147Custom Billboard Editor

about 232accessing 231window 231

custom dialog box 147Also see dialog box

custom dialog box scriptabout 228creating 229examples 230

custom dialog box setSee dialog box set

Custom Dialog Editorabout 202accessing 203

custom installation template 20custom script code, incompatible 15

WiseScript Package Editor Reference 260

Page 261: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
custom splash screen 66customizing

development environment 19cyclic redundancy check 42

DDAO 70data source, ODBC 62, 139date/time file modified

getting 170getting four-digit year 171

date/time, currentgetting 170getting four-digit year 171

Deactivate SVS Layer 147debug VBScript 161debug version, building 109debugging

commands 108commenting out script lines 102script 108

default directory 226default script, changing 20Delete File from SVS Layer 148Delete File(s) 148Delete SVS Layer 149dependency

files not found 241dependency, service 73, 143Desktop icon 74DESKTOPDIR 249destination directory

append directory problem 226default, setting 65dir exists message 226user-select 48

development environment 19development process, streamlining 20, 103device 125device driver

adding to System.ini 47defining 47

Devices page 47dialog box

adding to script 203Also see dialog box setanimation 217appearance 205calling dialog boxes 227changing control text 195common problems 225creating 147, 203default image, changing 225displaying text file 152editing 204event, built-in 229

executing program from 222floating 228font problems 60getting file name 185getting text input 186installation wizard 48listing Program groups 215message 151movie 217properties 205saving 204script actions 229script, custom 228scripting 194, 195settings 205size 205stop appending to path 226stop dir exists message 226tab order, setting 224template 204title 205translating 30Web link 214wizard loop dialog boxes 201

dialog box controlSee control, dialog box

dialog box setabout 227creating 227editing 228floating dialog box 228master dialog box 227naming 228properties 228

Dialogs page 48digital signature

adding 49Digital Signature page 49DIRECTION 249directory

adding contents 53changing 26checking existence 136creating empty 142creating in layer 142default, setting 65filtering with wildcard 53in installation 26renaming 191renaming in layer 191searching for 79

DirectX 70disable script lines 102disk space

checking 133getting 171

DISK_NUMBER 246DISPLAY 249Display Billboard 149

Display Messageexample 109script action 151

Display Progress Message 151Display Text File 152distribute

See Package DistributionDLG 204DLG_EVENT_TYPE 247DLL

call function 126checking if loaded 136excluding with

ApplicationWatch 24excluding with Import VB

Project 24self-registering 141, 177, 193sending parameters 128shared 55

DOBACKUP 249DOBRAND 249documentation, Wise 9DOS version, getting 170double-byte language 30, 60Download Runtimes 24drive

CD-ROM, getting 170getting first network drive 170type, getting 170

driverdefining device driver 47MDAC 70

drop-down list control 208DRV 47duplicate files in script 103Duplicate Files report 51, 103dword 128dword pointer 129

EEdit INI File 152Edit Registry 153Edit Registry for SVS Layer 156edit text control 210ellipse in billboard 235Else Statement 157ElseIf Statement 157empty project 14End Statement 158environment variable

getting 167reading 168

error messageAlso refer to Knowledgebasechanging text for 22compiler variable 23

WiseScript Package Editor Reference 261

Page 262: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
translating 22version error 24

evaluate expression 198Evaluate Windows Installer Condition 158event script

cancel 100exit script 100mainline 99selecting 97

exclude entrysetting 197

EXEAlso see installer .EXEcompiling 17getting path 170location after compile 42naming 42running silently 159self-registering 141, 177, 193

execute installation 17execute program

from dialog box 222script action 158

Execute VBScript 159exit code 164Exit Installation 164exit script 100Exit Without Saving 233EXPLORER 249Export SVS Layer 164expression

about 112evaluating 198

expression operators 253Expression True 157, 173, 200, 201extensions

See the first letter

Ffast create 24feature

See component 45file

adding to installation 52adding to layer 121adding with wildcard 53attributes 54, 196backing up replaced file on

destination computer 48checking existence 136copying from CD-ROM 42copying to destination

computer 176date/time modified 170deleting 148deleting from layer 148details 54

downloading from Web 139duplicate file 51error during compile 26extension, adding 50finding on destination

computer 165four-digit modified date 171FTP from Web 139in use 137location, changing 27, 27multiple files, adding 53name, changing 54not opening 26removing from installation 53renaming 191renaming in layer 191replacing in System32 244replacing on destination

computer 55, 141, 177requiring password 54searching for 79, 193self-repairing 28, 55, 75, 145,

177, 177size, getting 170troubleshooting replacement 244version checking 55, 141, 177version, getting 170

file associationadding 50editing 51

File Associations page 50file extensions

See the first letterfile name

converting short to long 198long 198prompting for 185short 198

file, CAB (mobile device)about 180adding 181

Files page 51adding directory 53adding file 52

filter directories with wildcards 53Find File in Path 165Find First SVS Layer 166Find Next SVS Layer 166Find SVS Layer GUID 166Finished dialog box 48First element of structure 130floppy disk, configuring for 42FON 56font 56, 190font, adding 56Fonts page 56FONTS variable 247forums 10

four-digit year 171free disk space, getting 171FTP

copying files through 139protocol through proxy server 85

functionDLL function 126sending parameters 128

function, VBScript 161

GGeneral Information page 57Get Environment Variable 167Get Name/Serial Number 167Get Registry Key Value 168Get SVS Layer Info 168Get System Information 169Get Temporary Filename 171Get Windows Installer Property 172Get WiseScript Variable 162Getting Started Guide 9global options, setting 23graphi

control 212graphic

checking support 133displaying in background 149,

231in wizard dialog box 225

GRF file 233GROUP 249group box control 213group for service 73, 143group name for icon on destination computer 48group, action 99GROUPDIR 249GUID, layer

finding 166variable, creating 146

HHalt Compilation 172hardware, check 132help

about 9Installation Expert 35using 9

HELPFILE 247hot text control

adding to dialog box 213link to Web 214

HTTPchecking connection 135copying files through 139protocol 85

WiseScript Package Editor Reference 262

Page 263: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
server, post to 185

HTTP POST 185

Iicon

adding 144adding automatically 23Also see shortcutfor installation .EXE 42group name 48

If Statementending 158starting 172

IIS Web sitecreating 147setting permissions 198

image, displaying in background 149, 231Import SVS Layer 173Import Visual Basic Project 240include file tab 24include script

about 100action 174adding 174editing 101, 101saving 101selecting 101tab 24, 98, 100Wise-created 100

incompatible custom script code 15INF file, mobile device

about 180INI file

creating 57editing 152reading value 187searching 80settings 58updating on destination

computer 57, 59INI Files page 57initialization splash screen 65Initialize SVS 174Insert Line into Text File 175INST 247INST_LOG_PATH 247Install File(s) 176Install SVS Package 178Install Windows Mobile Application 181Install WiseUpdate Client 179Install.log 59, 243

adding text 122opening, closing 182

INSTALL_RESULT 158, 247Install_SVS_Package 178

installationbackground 71beep for next disk 42billboard, displaying 149blank script 14building 17compiling, See compilecopying from 139creating from installed

application 239creating from VB 240creating new 14debugging 109fast create 24getting started 13icon for 42import VB project 240Internet-based 55language 22, 42log file 59manual mode 24media 61naming 42optional items 45patching 55pausing 184process 13prompting to save 23rebuilding automatically 24recording activity 243reducing traffic 42repair option 28saving automatically 23script, See scriptself-repairing 28, 55, 177serial number 64shortcut 74single-file 17temp directory 43testing 17title 64troubleshooting 243upgrade 75version 57watching 239wizard dialog box 48Zip format-compatible 42

Installation Expertabout 34help 35page groups 21, 35page navigation 35pages, resetting 35undo changes 35

installation logadding text 122creating 59default location 59for uninstall 81opening, closing 182using 243

Installation Log page 59

installation messageediting 22translating 22

installation template 20installer

Also see installationicon 42naming 42

installer .EXEAlso see EXEbuilding 17command-line options 257path 170prompting for file location 24rebuilding automatically 24

installer messageSee installation message

Instr$ 253international installation 60Internet

check 135registration 63

Internet-based installation 83download option 55FTP protocol 85HTTP protocol 85WebDeploy process 84

in-use file, forced replacement 42IPF file, opening 15Item Field, in .INI 80

JJapanese

font 60point size 60

KKnowledgebase 10

LLANG 247language

about 29adding 30, 61adding to installation 60code 254copying text between dialog

boxes 60double-byte 30font problems 60message 22new 30pre-translated 29process for adding 30selecting for installation 22specifying 98uninstall dialog boxes 31using another .INI for 42

Languages page 60

WiseScript Package Editor Reference 263

Page 264: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
launch

WiseScript Editor 13WiseScript Package Editor 14

layerSee virtual software layer

Lcase$ 254Left$ 253Len$ 254License Management Portal 10line

adding to billboard 234number 98

list boxmisinterpreted item 23problem selecting item from 23

list box controladding to dialog box 208, 215with check boxes 216

localizationSee language

log fileSee installation log

logging 59, 81, 243logon name, getting 171long 128long pointer 129loop

beginning 200ending 158

lowercase, converting 198Ltrim$ 254

Mmain installation script 99MAINDIR 249mainline script 99manifest, run level 43manual mode 24manual, reference 9master dialog box 227maximum compression 41MDAC 70Media page 61media-based installation 61memory

checking 133finding 170

messagechanging text for 22displaying to user 151translating 22

MFC 70Microsoft Active Directory 36Microsoft SMS page 61

Microsoft Windows MobileSee Windows Mobile

Mid$ 253MIF file

creating 61opening 15

mobile device installationabout 180Also see Windows Mobile

installationModify Component Size 182movie on dialog box 217MSDE 70MSJet 70multimedia file, playing 184multiple instances of same file 51multiple scripts 102

NNAME 249name script 97navigating between views 15

networkdrive, getting 170installation 42traffic, reducing 42

new featuresRefer to Release Notes

new folder 52

Oobject list 161OCX

excluding with ApplicationWatch 24

exluding with Import VB Project 24

self-registering 141, 177, 193ODBC page 62OLE2 Support 70Online Registration page 63Open Software Description 145Open/Close Install.log 182operating system, check 133operators 253optional installation item

See componentoptions for command line 255OSD 145owner name, getting 170

PPackage Definition File (PDF) 61Package Distribution

about 32

pageSee Installation Expert

page groupsabout 35customizing 21properties 21

Pages menuadding groups 21properties 21

paging 133parameters, pass to function 130Parse String 183passive FTP transfer 83PASSWORD 247Password page 64password, requiring 54, 54, 64, 140, 176patch installation 55, 56, 75, 178path

changing directories 26relative paths 27UNC paths 27

PATH variable 38, 121, 165Pause 184PDF (Package Definition File) 61percent sign with compiler variable 113Personal Information Exchange file 49PFX file 49play AVI control 217Play Multimedia File 184Pocket PC

See Windows Mobile installationpolygon in billboard 235portable project 17Post to HTTP Server 185preferences, setting 23Previous Version page

See System Search pageprivate key 50private key file 49processor, checking 133PROCEXITCODE 158, 250Product Details page 64product registration 63program

executing 158executing from dialog box 222running silently 159

Program Manager, hiding 71PROGRAM_FILES 250progress bar

calculation 65placement 65suppressing 55

WiseScript Package Editor Reference 264

Page 265: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
Progress Bar page 65progress message 151Project Settings

about 36project, portable 17prompt

changing text for 22for file name 185for installation directory 48for text 186translating 22

propertiesgetting 172setting 199

properties page group 21proxy server information 25Public/private key pair 49push button control 217PVK file 49

Rradio button control

adding to dialog box 219problem with disabling 227

Radio Button Dialog 187Read INI Value 187Read/Update Text File 188Read/Write Binary File 189ReadMe

for application 48readme

See release notesreboot

after installing SVS Driver 71at script completion 189, 248message, turning off 41

Reboot System 189rebuild installation after changes 24rectangle control, on dialog box 220rectangle, in billboard 235reference manual 9REG file

importing 67, 153importing to virtual layer 156

REG_EXPAND_SZ 168register .OCX/.DLL/.EXE/.TLB 55register files 141, 177Register Font 190register software 10registration 63registry

adding automatically 23editing 153editing in virtual layer 156empty key, adding 67searching 81

value, adding 67registry key

appending to 69, 156editing 67getting value 168importing 67removing from destination

computer 68, 154removing from installation 66,

154, 154, 156, 156self-repair 69, 145, 155settings 154

Registry page 66relative paths, converting to 27release notes 9Remark 190removable media 61Remove SVS Exclude Entry 190Rename File or Directory in SVS Layer 191Rename File/Directory 191Rename SVS Layer 192repair

about 28Also see self-repairapplication 69, 75, 145, 155, 177during uninstall 28, 81, 84turning on 75, 145

require password 140, 176reset page 35resolution (screen) requirement 78RESTART 164, 248restart

at script completion 189, 248message, turning off 41

return code 256Right$ 253rollback, from command line 257rollback.wse 100, 100Rtrim$ 254run application, from ApplicationWatch 239run installation 17run level, Vista 43run program from installation 158run-time variable

about 113automatic 246with script actions 248

runtimesApollo 70Crystal Reports 70DAO 70database 69, 70downloading 24MDAC 70MSDE 70

MSJet 70Software Virtualization

Solution 70updating 24Visual Basic 70Visual C++ 70Visual FoxPro 70Windows 70

SSave Changes and Exit 233, 233saving installation automatically 23scaling billboard 40scheduling task 256screen

colors requirement 78resolution requirement 78

Screen page 71script

about 114adding action 101blank 105colors 24commenting out lines 102comments 190conditional loop 111conditional statement for

component 46connection lines 99converting 15debugging 108duplicate files in 103editing 101, 102finding text in 102include script, See include scriptline number 98naming 97opening multiple 102placing new lines 23referencing compiler variable 44replacing text in 102saving 101saving to text file 102sections 114testing 17

script actionabout 119adding 101Also see actions by namecolors for 98copying 101dialog box 229pasting 101repeating 111

Script Editorabout 96actions, customizing list 99line color 24, 98tabs 100window 97

WiseScript Package Editor Reference 265

Page 266: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
Search for File 193Select Language dialog box 22self-register files 55, 141, 177Self-Register OCXs/DLLs 193self-repair

about 28application 28, 55, 177automatic 28, 55, 177file 28, 55, 177registry value 69, 155turning on 75, 145using 28, 55, 177

serial numbergetting from user 167specifying 64

serviceadding 72, 143checking 137controlling behavior 72, 143creating 72, 143dependency 73, 143group 73, 143settings 72, 143starting 73, 144, 199stopping 199

service pack number, getting 171Services page 72Set Activate SVS Layer on Startup 194Set Control Attributes 194Set Control Text 195Set Current Control 195Set File Attributes 196Set Files/Buffers 196Set SVS Exclude Entry 197Set Variable 197Set Web Permissions 198Set Windows Installer Property 199Set WiseScript Variable 163Setup.dll, mobile device 180setup.exe

See installer .EXEShare Support 70shared .DLL 55, 55, 140, 177shared directory for user-defined action 24, 103shared file

keeping track of 55shell execute 159short 128short pointer 129shortcut

adding 74creating in layer 145creating, editing 144editing 74

shortcut, mobile device 181

Shortcuts page 74signcode.exe 49signtool.exe 49silent compile 256silent installation

from command line 257reboot message 41

silent uninstall 257single installation file 17, 61size of file, getting 170smart create 24SmartPatch 56, 178SmartPatch page 75Smartphone

See Windows Mobile installationSMS

installation 61opening an SMS installation 15

software registration 10Software Virtualization Solution 119sound support 78source directory

relative 27UNC-based 27

source filelocation, changing 26relative paths 27UNC path 27

space, checking 133SPC file 49specify proxy server information 25splash screen 66start

WiseScript Editor 13WiseScript Package Editor 14

Start menu 74, 144, 215Start/Stop Service 199STARTMENUDIR 250STARTUPDIR 250static control 212, 221status MIF file 61string

buffer 129parsing 183pointer 128

structurepassing structure example 130passing to DLL 129

substitution 112support

Altiris Support Helpdesk 10forums 10Knowledgebase 10user groups 10

SVSdata protection 197

exclude entry, removing 190exclude entry,setting 197initialize 174Items 119script actions 119variables 250

SVS Driverruntime support 70

SVS exclude entryremoving 190

SVS layer GUIDchanging 132

SVS layer infogetting 168

syntax, check in VBScript 161SYS 47, 248SYS32 248system information, getting 169system requirements

checking 132setting 77

System Requirements page 77system requirements, Wise product

Refer to Getting Started Guidesystem restore (Windows Me) 41System Search page

.INI file 80about 78file or directory 79registry 81

System.ini, adding device 47, 125System32

installing files 244replacing files 244

Systems Management ServerSee SMS

Ttab 159tab order in dialog box 224tabs in Script Editor 100technical support

Altiris Support Helpdesk 10forums 10Knowledgebase 10user groups 10

Temp 171TEMP variable 248template, dialog box 204template, installation

creating 20customizing 20import VB project 240

temporary filedirectory 43

temporary file name, getting 171

WiseScript Package Editor Reference 266

Page 267: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
testing installation 17, 108

from command line 257text

adding to billboards 234finding in script 102manipulating 183prompting for 186reading from file 188updating in file 188

text control 221text file

displaying in dialog box 152editing 175

title of installation 64TLB, self-registering 141, 177tools overview 239translation

Also see languagedialog boxes 30installation 29See language

troubleshootingdialog box 225installations 243

TrueType font 56, 190TTF file 56, 190

UUcase$ 254UNC path

converting to 27getting 170

underscore in compiler variable 113undo

Installation Expert page 35uninstal.wse 100uninstall

Also see uninstallerinitiating repair 28repair option 81, 84Windows Mobile application 180

uninstall dialog boxes, translating 31Uninstall page 81UNINSTALL_LANG 248UNINSTALL_PATH 248uninstaller

adding commands 82customizing 81customizing with log file 182deleting files 82deleting registry keys 82executing programs 82logged installation 59using installation log 122

unwise.exe 29, 81, 257unwise32.exe 257upgrading 75

uppercase, converting 198URL check 135user groups 10user-defined action

about 103blank script for 105changing parameter 104creating 104dialog box for 106in actions list 105interacting with developer 106parameters for action 106shared directory 24, 103testing 107tutorial 105

Vvalues file 198variable

about 112automatic run-time 246compiler 113, 245filling from file 198incrementing, decrementing 198run-time 113, 248setting value 197

variable, SVS 250VB project, importing 240VBP file 240VBScript 159

about 100actions 162calling COM object 163checking syntax 161debugging 161editing 160executing from WiseScript 159functions, viewing 161getting WiseScript variable 162objects, viewing 161setting WiseScript variable 163tab 98

VER_CHECK_TYPE 250version checking 24, 55, 141, 177version number, getting 170version, installation 57virtual directory

creating 147setting permissions 198

virtual software archive 164virtual software layer

activating 121, 194adding file 121capturing application to 131creating 146creating directory in 142creating shortcut in 145deactivating 147deleting 149

deleting file 148exporting 164finding first 166finding GUID 166finding next 166GUID 146importing 173registry, editing 156renaming 192renaming file, directory 191

virtual software packageinstalling 178

Visual Basic 70project types 240

Visual C++ 70Visual FoxPro 70volume label, getting 171VSA file 164VSHARE.386 70VSP

installing 178VXD 47

WWAV, playing 184Web-based installation 83WebDeploy

about 83creating installation 84process overview 84, 84uploading installation 86

WebDeploy page 84Welcome dialog box 48While Statement

beginning 200ending 158

wildcardadding files with 53filtering directories 53

WIN 248Win16 SDK 129Win32 System Directory 201Win32s version, getting 170window background 71Windows

logon name, getting 171required version 77runtime components 70version, getting 170

Windows Installerusing WiseScript 16

Windows Installer condition, evaluate 158Windows Installer property

getting 172setting 199

Windows language code 254

WiseScript Package Editor Reference 267

Page 268: WiseScript Package Editor Reference - Symantecorigin-symwisedownload.symantec.com/resources/sites... ·  · 2010-01-29WiseScript Package Editor Reference 2 Legal Notice The software
Windows Mobile

about 180Windows Mobile installation

about 180Also see mobile device installationCAB file 180INF file 180process for adding 181Setup.dll 180uninstalling 180

Windows NT, required version 78Windows Runtime page 69Windows service

adding 72, 143checking 137controlling behavior 72, 143creating 72, 143starting, stopping 199

WinSock 85, 135Wise include script

See include scriptWise scripting language 12wise.ini 22WISE_ERROR_RTN 164, 250Wise32.exe, run from command 256WiseScript

about 12actions 119in Windows Installer 16portable project 17troubleshooting 243

WiseScript Editorabout 11starting 13

WiseScript Package Editorstarting 14

WiseUpdateabout 87adding with script 179client 87, 93configuring 89INI file 91process 88running from application 93running silently 93testing 92tips 94troubleshooting 95update file, about 91updating file 90uploading, FTP client 92using 89using with SmartPatch 94using with WebDeploy 94

WiseUpdate page 87WiseUpdt.exe 93wizard

See tools

wizard dialog boxchanging image 225disabling check box 227disabling radio button 227for installation 48

Wizard Loopaction 201adding dialog box 147

word 128word pointer 129

ZZAP file

creating 36ZIP format, compatible with 42

WiseScript Package Editor Reference 268