Global support purchased on a regional business hours or 24 hours a day, 7 days a week basis Premium service offerings that include Account Management Services For information about Symantec’s support offerings, you can visit our web site at the following URL: www.symantec.com/business/support/ All support services will be delivered in accordance with your support agreement and the then-current enterprise technical support policy.
Page 4
Troubleshooting that was performed before contacting Symantec Recent software configuration changes and network changes Licensing and registration If your Symantec product requires registration or a license key, access our technical support Web page at the following URL: www.symantec.com/business/support/ Customer service Customer service information is available at the following URL: www.symantec.com/business/support/...
Page 5
Consulting Symantec Consulting Services provide on-site technical Services expertise from Symantec and its trusted partners. Symantec Consulting Services offer a variety of prepackaged and customizable options that include assessment, design, implementation, monitoring, and management capabilities. Each is focused on establishing and maintaining the integrity and availability of your IT resources.
Chapter 1 Introduction This chapter includes the following topics: About WiseScript on page 12 WiseScript Benefits on page 12 Getting Started on page 14 Starting the Software on page 13 The Product Interface on page 14 Using WiseScripts in a Windows Installer Installation on page 14 Compiling, Testing, and Running a WiseScript on page 15...
Introduction tools. Therefore, some of the information in this document does not apply to WiseScript Editor. WiseScript Benefits WiseScript 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 learn WiseScript supports a point-and-click method of scripting.
Introduction Modify a machine resource (example: registry key or .INI file). Locate and delete a file and its directory (example: to remove a spyware program). Free disk space by clearing the Temp directory, the Recycle Bin, or the Internet cache. Find the current Windows version.
WiseScript Package Editor is an application development tool for creating and editing installation packages based on the WiseScript™ scripting language. Select Start menu > Programs > Symantec > Wise Installation Studio > WiseScript Package Editor. Select File menu > New.
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. Select File menu > Open. The Open dialog box appears.
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.
Introduction If you use a WiseScript .EXE in a Windows Installer installation that will run on Windows Vista or later operating system, you must specify a manifest file that indicates the run level for the .EXE. Build Settings on page 43. Compiling, Testing, and Running a WiseScript To test an installation, use the Compile, Test, and Run buttons at the bottom of the main window.
Introduction Project Name Enter 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. Add default scripts that are included in this WiseScript Mark this to add any default WiseScripts or VBScripts that are included in the WiseScript.
Page 20
The product release notes cover new features, enhancements, bug fixes, and known issues for the current version of this product. To access the release notes, select Release Notes from the Symantec program group on the Windows Start menu. WiseScript Package Editor Reference...
Chapter 2 Setting Up This chapter includes the following topics: How to Customize Your Development Environment on page 21 Creating and Editing Installation Templates on page 22 Customizing Installation Expert Page Groups on page 23 Editing Installation Messages on page 24 Setting Preferences on page 25 Downloading Application Runtimes...
Setting Up Creating and Editing Installation Templates WiseScript 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.
Setting Up Customizing Installation Expert Page Groups WiseScript 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: Displays all page groups and all pages associated with each group. Properties Displays only the pages that do not add or change script lines in the script.
Setting Up Select the page or pages and click OK. Add more page groups and pages as appropriate. Click OK. Your new set of page groups appears under the Pages menu. Editing Installation Messages WiseScript 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.
Setting Up Dialog Title The title of the Select Language dialog box. Dialog Text This text appears on the Select Language dialog box. If the installation supports multiple languages, enter instructions in all supported languages. Setting Preferences WiseScript Package Editor only In Preferences, customize options for script development and compiling.
Setting Up Color Selection Select 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 Error Mark this to suppress errors that normally occur when version checking is performed on files that do not have version resources.
Page 27
Setting Up To download application runtimes Connect to the Internet. Select Help menu > Download Runtimes. The Check for Updates page appears. 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.
Chapter 3 Installation Management This chapter includes the following topics: Changing Source Directories on page 28 Converting to UNC-Based Source File Paths on page 29 Converting to Relative Source File Paths on page 29 Using Self-Repair on page 30 Language Support on page 31 Distributing an Installation on page 34...
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. Mark Change Sub-Directories to update the paths of the subdirectories of the selected directory.
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. Select Edit menu > Source Directories. The Change Source Directories dialog box appears and lists all the directories referenced in the script.
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. 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.
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.
Page 33
Installation Management 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.) Edit the dialog box text and controls, replacing the existing text with the text in the selected language.
Installation Management Distributing an Installation WiseScript Package Editor only When you complete and compile an installation, you can use Package Distribution to share or deploy it by: Copying an Installation to a Network Directory on page 34 Copying an Installation to an FTP Server on page 35 Copying an Installation to a Network Directory WiseScript Package Editor only.
Installation Management Copying an Installation to an FTP Server WiseScript Package Editor only. When you are ready to deploy an installation package to end users, you can use Package Distribution to copy the compiled installation to an FTP server. Package Distribution uses the FTP protocol to transfer the files to the server location you specify.
Chapter 2 Creating WiseScript Installations This chapter includes the following topics: About Installation Expert on page 38 Active Directory on page 40 Add/Remove Programs on page 41 Billboards on page 42 Build Settings on page 43 CAB Files on page 46 Compiler Variables on page 18 Components...
Creating WiseScript Installations System Requirements on page 77 System Search on page 78 Uninstall on page 81 WebDeploy on page 83 WiseUpdate on page 86 About Installation Expert 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 perform the most common installation tasks.
Page 39
Creating WiseScript Installations Page Groups Page Area View Navigation Compile, Test, and Run 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.
Creating WiseScript Installations Compiling and Testing Compile, Test, Debug, and Run buttons test and compile the WiseScript. See also: About Installation Expert on page 38 About the Project Settings View WiseScript Editor only The Project Settings view contains several pages that provide information that is required by certain script actions.
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. Add/Remove Programs WiseScript 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.
Creating WiseScript Installations Billboards WiseScript 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.
Creating WiseScript Installations Hide Progress Bar Mark this to hide the progress bar during graphic display. Center Vertical Place at Bottom Tile Background Mark this to repeat the graphic edge-to-edge to fill the entire screen. Erase All Mark this to remove all previous graphics from the screen before displaying the new one.
Page 44
Creating WiseScript Installations Use Internal 3D Effects This option is unavailable because it is no longer used. No Reboot Message During Silent Installs Normally, 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.
Page 45
Creating WiseScript Installations Setup Icon Pathname You 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.
Creating WiseScript Installations Specify a manifest file To 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”...
Page 47
Creating WiseScript Installations Variable Name Enter 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 Value Enter the default value of the compiler variable.
Creating WiseScript Installations Components WiseScript 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.
Creating WiseScript Installations Branding/Registration Prompts for the end user’s name, company name, and, optionally, a serial number. Destination Directory Lets the end user choose a destination directory for the installation. The directory the end user chooses is stored in the variable %MAINDIR%. Backup Replaced Files Lets the end user choose whether to back up files that are replaced during the installation and where to store the backups.
Page 50
Creating WiseScript Installations 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”...
Creating WiseScript Installations Signcode.exe with public/private key pair files Mark 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 Associations WiseScript 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.
Creating WiseScript Installations Source Pathname (Read-only) This is the path to the .EXE program associated with the specified document extension. Click OK. See also: File Associations on page 51 Files WiseScript Package Editor only Use the Files page to specify the files and directories to be installed on the destination computer.
Creating WiseScript Installations Details Edit file settings. Specifying Installation File Settings on page 55. Adding Files WiseScript Package Editor only Select Installation Expert > Files page. 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.
Creating WiseScript Installations Specifying Installation File Settings on page 55. 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.
Creating WiseScript Installations Specifying Installation File Settings WiseScript Package Editor only Select Installation Expert > Files page. 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.
Page 56
Creating WiseScript Installations Using Self-Repair on page 30. Replace Existing File Specify when to replace existing files on the destination computer. Always The new file always replaces the old file. Never The file never overwrites an existing file. Select this for files that should be installed if they are not present, but which might be customized by the end user and should therefore not be replaced on re-installation (example: configuration files).
Creating WiseScript Installations SmartPatch on page 76. Click OK. See also: Adding Contents of Directories on page 54 Files on page 52 Fonts WiseScript 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.
Creating WiseScript Installations Company Name INI Files WiseScript 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. Select Installation Expert > INI Files page. Select the destination directory from the left list.
Creating WiseScript Installations 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...
Creating WiseScript Installations Installation Log WiseScript 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.
Page 61
Creating WiseScript Installations Note If 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.
Creating WiseScript Installations Media WiseScript 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 Installation Mark this to pack all the files into a single installation file.
Creating WiseScript Installations Package Definition File To 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.
Creating WiseScript Installations Select Installation Expert > Online Registration page and complete the page: No Online Registration Mark this if you do not support online registration. Online Registration Mark this if you support online registration. The following fields become enabled: Post to URL Enter the URL of the CGI program or Active Server Page that accepts the data through the HTTP POST operation.
Creating WiseScript Installations 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.
Creating WiseScript Installations Center All Dialogs Over Progress Dialog Mark 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 Cancelled Mark this to disable the Cancel button on all dialog boxes that appear to the end user during installation.
Creating WiseScript Installations Delete Key, Delete Value Remove a registry key or value from the installation. This does not delete the key or value on the destination computer. Details Edit registry key settings. See also: Configuring Registry Key Settings on page 68 Creating or Editing Registry Key Settings on page 67 Creating or Editing Registry Key Settings...
Creating WiseScript Installations 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. Select Installation Expert > Registry page. Do one of the following: Click New >...
Page 69
Creating WiseScript Installations Data Type Select 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%%.
Creating WiseScript Installations Runtimes WiseScript 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 page 63.
Creating WiseScript Installations Note To 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.
Creating WiseScript Installations Top Color, Bottom Color Click these buttons to choose the top and bottom colors for the background gradient. The installation generates a smooth transition between the two colors. Screen Preview Displays a real-time mock-up of how the installation screen will look. Bold/Light Fonts Select the font option.
Creating WiseScript Installations See also: Create Service on page 142 Configuring Service Settings WiseScript Package Editor only Select Installation Expert > Services page. Select a service and click Details. The Create Service Settings dialog box appears. It lets you control the behavior of the service when it is run.
Creating WiseScript Installations you enter this string, "ftpsvr;httpsvr;drc;+sample", you create dependencies on the ftpsvr, httpsvr, and drc services and the sample group. Service Type Select a service type. Start Service Select the default setting for starting the service. Service Interacts With Desktop Mark this to let the service display its user interface.
Creating WiseScript Installations Create Shortcut on page 144 Editing Shortcut Details WiseScript Package Editor only Select Installation Expert > Shortcuts page. Select the shortcut and click Details. The Shortcut Details dialog box appears. 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.
Creating WiseScript Installations SmartPatch WiseScript 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.
Creating WiseScript Installations Maximum Patch Compression Mark this to compress patch files as much as possible. This takes extra time, so leave this unmarked during development and testing, and mark it only when creating your final distribution build. Directory This list displays directories on your computer that contain old versions of your application that end users might have installed on their computers.
Creating WiseScript Installations Message Title Enter a name to appear in the title bar of the error message. Message Text Enter 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.
Creating WiseScript Installations 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.
Creating WiseScript Installations Description Enter the message to display on the progress dialog box while searching. Drives to Search Select local hard drives only, network drives only, or both. Search Depth Set the search depth to zero to search the entire directory tree of the specified volumes.
Creating WiseScript Installations Remove File Name Mark this to return only the directory name if it ends with a file name. 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.
Creating WiseScript Installations Select Installation Expert > Uninstall page and complete the page. Do not add support for uninstall Mark this to not give end users the ability to uninstall the application. Support uninstall Mark this to allow uninstall and to enable the following uninstall options. Display uninstaller background window Mark this to display a gradient window similar to the one displayed during installation.
Creating WiseScript Installations 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. 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).
Creating WiseScript Installations Phase 1: Your Computer Your Internet Host (FTP/HTTP) Server Contains the installation The installation is copied to the host but is not used yet Upload files through FTP The installation and its pieces are stored in an .EXE file plus files named .001, .002, and so on When you develop the installation, you: Configure WebDeploy by specifying the location of...
Page 85
Creating WiseScript Installations Select one of the following: Add support for Internet-based Copy Local Files script action Mark 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.
Creating WiseScript Installations 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.
Chapter 5 Using 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 WiseUpdate...
Using WiseUpdate The WiseUpdate Process WiseScript Package Editor only Phase 1: Your Computer Your Web Server (FTP/HTTP): Contains the WiseUpdate When you first use WiseUpdate, you: update file that stores: 1. Develop the installation The current version number 2. Configure WiseUpdate and URLs to the installation files (FTP) specify:...
Using WiseUpdate Using WiseUpdate in an Installation WiseScript 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.
Page 90
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.
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.
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.
Using WiseUpdate To test how WiseUpdate works when an update is needed To make the application on the server appear to be a later version: 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) Compile the installation to create a new update file.
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.
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.
Chapter 3 Using Script Editor This chapter includes the following topics: About Script Editor on page 22 The Script Editor Window on page 22 Types of Scripts on page 25 Adding an Action to a Script on page 26 Editing Scripts on page 26 About User-Defined Actions on page 28...
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 Window The Script Editor window contains all the tools necessary to develop and edit WiseScripts.
Page 98
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. Languages on page 63. 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.
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 Actions Script Editor contains four default action groups: All Items, SVS Items, Favorites, and Custom.
Page 100
Using Script Editor Exit The script that’s executed when the installation is complete, or when an Exit Installation script command is executed. If you create a user-defined action, you store its custom dialog box here. Creating a User-Defined Action on page 29. Cancel The script that’s executed when the end user cancels the installation.
Using Script Editor Adding an Action to a Script in 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.
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. Customizing the List of Actions on page 24.
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.
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.
Using Script Editor 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. In Title, enter a combination of text and variables to define the format of the script line.
Page 106
Using Script Editor To create a dialog box for the action 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.
Page 107
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.
Using Script Editor Wait 9000 Milliseconds 9000 milliseconds equals nine seconds. Save the script. 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.
Using Script Editor 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. About Script Editor on page 96.
Page 110
Using Script Editor Variable Name Enter _DEBUG_ Default Value Enter NO Description Enter “Compile debug version of this installation?” Value List Enter YES on the first line and NO on the second line. Data Entry Type Select List of values (single-select). Do Not Prompt for Value Make sure this is cleared.
Using Script Editor Using the Debug Commands on page 111 Basic Scripting Concepts If 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 22 Conditions and Loops on page 33...
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.
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.
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. Compiler Variables on page 18. 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.
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...
Chapter 4 WiseScript Actions This chapter includes the following topics: About WiseScript Actions on page 40 About SVS Script Actions on page 40 Activate SVS Layer on page 41 Add Directory to PATH on page 42 Add File to SVS Layer on page 42 Add Text to INSTALL.LOG on page 43...
Page 117
WiseScript Actions Custom Dialog on page 67 Deactivate SVS Layer on page 67 Delete File from SVS Layer on page 67 Delete File(s) on page 68 Delete SVS Layer on page 68 Display Billboard on page 69 Display Message on page 70 Display Progress Message on page 71 Display Text File...
Page 118
WiseScript Actions Insert Line Into Text File on page 93 Install File(s) on page 94 Install SVS Package on page 96 Install Windows Mobile Application on page 99 Install WiseUpdate Client on page 96 Modify Component Size on page 99 Open/Close Install.log on page 100 Parse String...
SVS Items title bar. For more information about Software Virtualization Solution (SVS), search for Workspace Virtualization on the symantec.com Web site. Note If 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.
Page 120
WiseScript Actions Deactivate SVS Layer 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.
WiseScript Actions Script Action for Initializing SVS The Initialize SVS script action initializes the SVS Driver (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).
WiseScript Actions To complete the dialog box Layer GUID 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 page 66 and Find SVS Layer GUID...
WiseScript Actions To complete the dialog box Log Text Enter 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.
WiseScript Actions To complete the dialog box Text to Insert Enter 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 Number Enter the line number at which the new line should be inserted.
WiseScript Actions Search for Text Enter the text to search for here. The installation scans Config.sys looking for a line that begins with, ends with, or contains the text, depending on the setting of the Match Criteria field. The line is inserted at the first found match. Comment Text Enter text to insert at the beginning of the line that is found.
WiseScript Actions To complete the dialog box Window Name Enter the title for the dialog box. Description Enter text to explain the dialog box to the end user. Prompt Name Enter explanatory text to be displayed above the directory field. Default Value Enter the default location of the new directory.
Page 127
WiseScript Actions 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 Added Because WiseScript-specific .DLL functions have access to the variable list of the running installation, you can add new variables.
WiseScript Actions Hide progress bar before calling function If the .DLL has UI, you can us this to hide the progress bar. If you write a .DLL, use CALLBACK or WINAPI in the declaration of the .DLL. For help with .DLL development, review sample source code, such as GETCPU32.C, in the DLL subdirectory of this product’s installation directory.
Page 129
WiseScript Actions WiseScript Corresponds to Win32 Corresponds to Description SDK type Visual Basic type dword pointer Pointer to DWORD or Long 32-bit pointer to a DWORD data type DWORD* (use for LPDWORD (see DWORD for the reference to this or PDWORD) data type) string buffer char [size]...
WiseScript Actions Passing Complex Structures to a .DLL: An Example You 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).
WiseScript Actions Parameter in the C function Parameter type in Passing Type in WiseScript WiseScript title (third element of string buffer Contained within EMPLOYEE structure) structure (buffer length of 50) long Normal deptname (first element of string pointer First element of a DEPARTMENT structure) structure deptnum (second element of...
WiseScript Actions Change SVS Layer GUID This 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.
WiseScript Actions Display Message Only Abort Installation Start Block Begins a conditional block. All actions between this action and the next Else or End action are executed. Title Enter the title for the dialog box. Message Text Appears in the body of the message dialog box. Leave this blank to prevent a message from appearing.
Page 134
WiseScript Actions Status Variable Select 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.
WiseScript Actions 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"...
WiseScript Actions Win32 Error Text Variable Select or enter a variable to store the error text returned by the 32-bit winsock.dll. Win32 Error Number Variable Select or enter a variable to store the error code returned by the 32-bit winsock.dll. Win16 Error Text Variable Select or enter a variable to store the error text returned by the 16-bit winsock.dll.
WiseScript Actions Perform loop at least once If you chose Start While Loop, mark this to force the loop to execute once before the test is performed. If the 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.
Page 138
WiseScript Actions Compiler Variables on page 18. 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”.
WiseScript Actions To complete the dialog box Data Source Name This 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 Name Enter the name of the ODBC driver used by this data source.
Page 140
WiseScript Actions 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.
WiseScript Actions Replace Existing File Select when to replace existing files on the destination computer. Always The new file always replaces the old file. Never The file never overwrites an existing file. Select this for files that should be installed if they are not present, but that might be customized by the end user and should therefore not be replaced on re-installation (example: configuration files).
WiseScript Actions To complete the dialog box Pathname Enter the directory path to create. Start the path with a variable (example: %MAINDIR%). Create Directory in SVS Layer This 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.
Page 143
WiseScript Actions Display Name Enter the name to appear in the Services control panel. Executable Path Specify the complete path to the executable file as it will be on the destination computer. Start the path with a variable (example: %MAINDIR%). Login Username, Login Password Enter the user name and password under which the service should run.
WiseScript Actions Create Shortcut This action creates a shortcut. Common locations include the Start menu (%STARTMENUDIR%), the Startup directory (%STARTUPDIR%), the installation directory (%MAINDIR%), and the desktop (%DESKTOPDIR%). 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.
WiseScript Actions 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. Using Self-Repair on page 30.
WiseScript Actions 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.
WiseScript Actions To complete the dialog box Computer name Enter the name of the computer where the virtual directory is to be created. Web site name Enter the name of a new or existing Web site. Virtual directory name Enter a name for the new virtual directory. Virtual directory path Enter the path for the virtual directory on the destination computer.
WiseScript Actions Delete File from SVS Layer This 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.
WiseScript Actions Remove Directory Containing Files If 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.
WiseScript Actions Erase Num Enter 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 Effect Select a transition effect.
WiseScript Actions Message Text This 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 Icon Select an icon for the dialog box. Start If Block Mark this to display Yes, No, and Cancel buttons instead of OK and Cancel.
WiseScript Actions Display Text File This 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.
WiseScript Actions Comments (lines starting with ;) are not supported. See also: INI Files on page 58 Edit Registry This 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.
WiseScript Actions Delete Value Removes the selected value from the current installation. This does not remove it from the destination computer. To do that, you must change the Operation field in the value’s details dialog box. Data Settings These fields in this section of the dialog box correspond to fields you set when creating the value.
Page 155
WiseScript Actions Value Name Enter the name of a new named value. Data Value The data for the value. If the Data Type (below) is Double Word (DWORD), the data should be in decimal notation. To insert multiple lines of data here, press Ctrl+Enter to begin a new line.
WiseScript Actions Edit Registry for SVS Layer This 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). Note Use this action on a deactivated SVS layer only. To complete the dialog box Registry Keys This field shows root registry keys and the keys added by this action.
WiseScript Actions See also: About SVS Script Actions on page 40 Else Statement This action marks the beginning of a section of instructions to be executed when the condition specified in the matching If action is false. It takes no parameters, and selecting it from the Actions list inserts it directly into the script with no further dialog boxes or prompts.
WiseScript Actions Note This is different from the End Statement action that is in MSI Script in a Windows Installer installation. See also: If Statement on page 91 Evaluate Windows Installer Condition This 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.
WiseScript Actions Default Directory Specify 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.
WiseScript Actions To complete the dialog box VB Script Path Specify 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.
WiseScript Actions Right-Click Menu Options List Objects Displays 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 80. List Properties/Methods Displays, 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.
Page 162
WiseScript Actions 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.
WiseScript Actions 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 Use the Execute VBScript action to add a VBScript to the WiseScript. Execute VBScript on page 78.
Page 164
A status for the installation is added to the Status MIF file. Export SVS Layer This SVS script action exports a virtual software layer from the Symantec SVS applet as a virtual runtime archive (.VRA) file. The .VRA file is a portable file that you can deploy to other computers.
WiseScript Actions Overwrite archive file if it already exists Mark 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 40 Find File in Path This action searches for a file on the destination computer.
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 40 Find Next SVS Layer This 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.
WiseScript Actions To complete the dialog box Env. Variable Enter a Windows environment variable. Variable Name Enter 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.
WiseScript Actions Get Registry Key Value This 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 Name Select 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.
If 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 Variable The name of the layer as it appears in the Symantec SVS applet is placed in this variable. Layer Type Variable If the layer is read-only, 0 is placed in the variable.
Page 170
WiseScript Actions K Bytes Physical Memory The amount of physical RAM. File Date/Time Modified The time and date on which the file that is specified in Pathname was modified. File Version Number The 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.
WiseScript Actions 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.
WiseScript Actions To complete the dialog box Dest. Variable Select or enter a variable to store the value of a Windows Installer property. Property Name Enter the name of the Windows Installer property in the currently running Windows Installer installation. See also: Set Windows Installer Property on page 116...
WiseScript Actions 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 Value Enter the value to be used in the comparison, or an expression if the comparison is set to Expression True.
WiseScript Actions Include Script This action adds an additional script to the current installation script. During compile, the include script is copied into the calling script at the location of the Include Script action, resulting in a combination of the scripts. Include scripts can save time because you can develop a library of WiseScripts that perform specific functions, like subroutines.
WiseScript Actions Insert Line Into Text File This 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.
WiseScript Actions 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.
Page 177
WiseScript Actions No Progress Bar To hide the progress bar, mark this for every file in the installation. If you mark it for some files, but not others, the progress bar seems to display continuously because the screen does not refresh between files. Self-Register OCX/DLL/EXE/TLB All .OCXs and .TLBs and some .DLLs and .EXEs support self-registration.
WiseScript Actions Older For File Version, this replaces the existing file if it has a version resource that is older than the new file. If the existing file lacks a version resource, it is not replaced. For File Date/Time, this replaces the existing file if its modification date and time are older than the new file.
WiseScript Actions To complete the dialog box Source Pathname Specify the .WVP file. Activate Layer Check 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.
WiseScript Actions Update Filename Enter 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.
WiseScript Actions 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.
WiseScript Actions To complete the dialog box Application Name Enter 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). Description This appears on the Add/Remove Programs dialog box on the desktop computer.
WiseScript Actions Dest. Path Enter the directory where the files will be installed (example: %MAINDIR%\Pictures). Open/Close Install.log Use 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.
WiseScript Actions 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,”...
WiseScript Actions 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 Type Select either .WAV or .AVI. Pathname Specify the path to the .WAV or .AVI file.
WiseScript Actions Start Block The 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 Filename This action prompts the end user to select a file using a standard Open or Save dialog box.
WiseScript Actions Display prompt if overwriting existing file Mark this to display a message if a file selected by the end user already exists. Prompt for Text This 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.
WiseScript Actions Description Enter explanatory text to be displayed above the radio buttons. Press Shift+Enter for a carriage return. Component List Enter the choices, one on each line, pressing Enter after each. Read INI Value This action reads an entry from an existing .INI file into a variable. Example: Obtain a path to a file.
WiseScript Actions Variable Specify the variable in which to store each line of the text file (example: TEXTLINE). Action Select an action: Read lines of file into variable Reads a line into the variable, but does not write it back to the original file. Update file with new contents of variable Reads 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 Actions Transfer Direction Select whether to write to or read from the file. Null Terminated If this check box is marked, a zero byte is written to the binary file after the string. Reboot System This action restarts the destination computer. To complete the dialog box Reboot Operating System This option logs the end user out of Windows.
WiseScript Actions Remove SVS Exclude Entry This 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.
WiseScript Actions New File Name Enter the new file name or directory name (examples: picture2.jpg or Photos). Rename File or Directory in SVS Layer This 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.
WiseScript Actions New name Enter 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 40 Search for File...
WiseScript Actions 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/DLLs Use this action to self-register all queued .OCX, .DLL, and .EXE files or to add an existing file to the queue.
WiseScript Actions To access this action Double-click a Custom Dialog script line. The dialog box appears in the Custom Dialog Editor. Select View > Dialog Script Editor. A smaller list of actions appears in the Actions list, including this action. Double-click Set Control Attributes.
WiseScript Actions Set Current Control This 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 Actions To complete the dialog box Minimum Files The minimum number of files to be specified by FILES= in Config.sys. Set this to zero or leave blank to leave FILES= unchanged. Minimum Buffers The minimum number of buffers to be specified by BUFFERS= in Config.sys. Set this to zero or leave blank to leave BUFFERS= unchanged.
Page 198
WiseScript Actions To complete the dialog box Variable Specify 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 Value Enter the new value of the variable.
WiseScript Actions Set Web Permissions This 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. Create Virtual Directory on page 66. To complete the dialog box Computer Enter the name of the computer where the Web site resides.
WiseScript Actions 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.
WiseScript Actions Below the While Statement, add one or more actions to perform if the variable has the specified value. 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.
Page 202
WiseScript Actions Expression True means the expression in the Value field below is evaluated according to the rules outlined in Variables and Expressions on page 34. The variable is ignored and can be left blank. The result is considered true if it evaluates to a non-zero result.
Chapter 5 Creating Custom Dialog Boxes This chapter includes the following topics: About Dialog Boxes on page 120 About the Custom Dialog Editor on page 120 About Dialog Box Controls on page 122 Solutions for Dialog Box Problems on page 141 About Custom Dialog Box Sets on page 143 Creating a Custom Dialog Box Script...
Creating Custom Dialog Boxes Set dialog box properties Setting Dialog Box Properties on page 121. Create a dialog box set About Custom Dialog Box Sets page 143. Add interactivity to dialog boxes Creating a Custom Dialog Box Script page 144 Access the Custom Dialog Editor from: Installation Expert Click the Edit or Add button on the Dialogs page.
Creating Custom Dialog Boxes About Dialog Box Controls on page 122 Adding and Editing Dialog Box Controls on page 123 Select File menu > Save Changes and exit. Note To 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.
Creating Custom Dialog Boxes The dialog box opens in the Custom Dialog Editor. Make changes to the dialog box by adding, editing, or removing controls. Adding and Editing Dialog Box Controls on page 208 Aligning and Spacing Dialog Box Controls on page 224 Select File menu >...
Creating Custom Dialog Boxes About Dialog Box Controls Installation dialog boxes contain standard controls, which you can add and edit. Most controls are configured by completing their Settings dialog box. Adding and Editing Dialog Box Controls on page 123. You can add the following types of controls to dialog boxes: Check box A single check box for on/off, true/false settings.
Creating Custom Dialog Boxes Text Control Static text field for displaying messages. The end user cannot change text in this type of field. Adding Text Controls on page 138. 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.
Creating Custom Dialog Boxes Variable Specify the name of the script variable that stores the return value of this dialog box control. Note If 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.
Page 210
Creating Custom Dialog Boxes Note When you place a combo box, you must resize the bounding box so that it is taller than the visible combo box. Otherwise, the drop-down list fails to drop down when the installation runs. Open the dialog box in the Custom Dialog Editor. Editing Dialog Boxes on page 121.
Creating Custom Dialog Boxes Drop List. Drop-down list that only allows selection from the list. Control Name Enter 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-Position Specify the exact location of the control on the dialog box.
Page 212
Creating Custom Dialog Boxes Auto HScroll Mark this to scroll the text if it extends past the right edge of the edit field. Auto VScroll Mark this to scroll the text if it extends past the bottom of the edit field. Multi-line Mark this to allow multiple lines of text to be entered into the edit field.
Creating Custom Dialog Boxes Note A 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 / Height Specify the exact dimensions of the control in dialog units.
Creating Custom Dialog Boxes Adding Group Box Controls A 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. Open the dialog box in the Custom Dialog Editor. Editing Dialog Boxes on page 121.
Page 215
Creating Custom Dialog Boxes Variable Specify the name of the script variable that stores the return value of this dialog box control. Value Enter 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.
Creating Custom Dialog Boxes Underline Enabled Text Mark this to underline the hot text when the end user moves the mouse pointer over the text. X-Position / Y-Position Specify the exact location of the control on the dialog box. You can also use the alignment commands to precisely arrange controls on the dialog box.
Page 217
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. Components If this list box control is being used to specify the components to be installed, and if the components have sub-components, enter the names of sub-...
Creating Custom Dialog Boxes Width / Height Specify the exact dimensions of the control in dialog units. You can also resize controls by dragging their handles, though this is not as precise. Click OK. Adding Play AVI Controls You can play an animation on any of the installation dialog boxes by adding a Play AVI dialog box control.
Page 219
Creating Custom Dialog Boxes The Push Button Control Settings dialog box appears. Complete the dialog box: Label Enter the name of the push button. To create a keyboard shortcut for the button, enter an ampersand (&) immediately before a letter. For example, “< &Back”...
Creating Custom Dialog Boxes Note A 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 / Height Specify the exact dimensions of the control in dialog units.
Creating Custom Dialog Boxes Note If 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”...
Creating Custom Dialog Boxes Control Name Enter 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-Position Specify 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.
Creating Custom Dialog Boxes mark this check box, the & is displayed literally and no underlining is performed. Set Font Normally, 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.
Creating Custom Dialog Boxes Complete the dialog box: EXE Path Specify 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.
Creating Custom Dialog Boxes Align Controls Bottom Aligns the bottom edge of the selected controls with the bottom edge of the bottommost control. Space Evenly Down Distributes the selected controls vertically between the topmost and bottommost controls. Their horizontal position is not changed. Use an Align Controls Left or Align Controls Right command to move them into a column.
Creating Custom Dialog Boxes To exit the tab order view, press Esc. Note Although 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.
Creating Custom Dialog Boxes Click OK. Disabling the Appending of the Program Files Directory If 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.
Creating Custom Dialog Boxes Keeping Disabled Controls From Reactivating This 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”...
Creating Custom Dialog Boxes page 134. 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.
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).
Creating Custom Dialog Boxes Set Control Attributes on page 111 Set Control Text on page 112 Set Current Control on page 113 Set Variable on page 114 While Statement on page 117 Dialog Box Script Examples To see an example of a dialog box script Open the sample script Event Handler.wse in the Samples subdirectory of this product’s installation directory.
Chapter 6 Creating Custom Billboards This chapter includes the following topics: About Billboards on page 147 Accessing the Custom Billboard Editor on page 147 About the Custom Billboard Editor on page 148 Opening and Saving Custom Billboards on page 149 Adding Objects to a Billboard on page 149 About Billboards...
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.
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.
Creating Custom Billboards Click OK. Position the object on the billboard. Resizing, Moving, and Aligning Billboard Objects on page 153. Editing Billboard Text Objects Text you place on a billboard using the Text tool is editable. Each text object can use only one font, size, and style.
Creating Custom Billboards Complete the dialog box: Line Style Choose the texture for the line. Line Arrows Determines which ends of the line will have arrowheads. Line Direction Determines whether the line should connect the lower-left corner of the bounding rectangle to the upper-right corner, or the upper left to the lower right.
Creating Custom Billboards Editing Billboard Polygon Objects The polygon object consists of a series of points that are connected by lines. Access the Custom Billboard Editor. Accessing the Custom Billboard Editor on page 147. Select Add menu > Polygon, click where the points should be located, and close the polygon’s path by double-clicking on the starting point.
Creating Custom Billboards Accessing the Custom Billboard Editor on page 147. Select Add menu > Bitmap and drag the dimensions of the bitmap frame in the billboard editor. The Bitmap Settings dialog box opens. Complete the dialog box: Pathname Specify the path to a bitmap. Transparent Mark this to make the color in Transparent Color transparent.
Creating Custom Billboards Space Evenly Across Distributes the selected objects horizontally between the topmost and bottommost objects. Their vertical position is not changed. Use Align Top or Align Bottom to move them into a row. Setting Billboard Properties When you are done creating a billboard, use the Billboard Settings dialog box to set the behavior of the billboard as a whole.
Page 240
Creating Custom Billboards (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. Click OK. WiseScript Package Editor Reference...
Chapter 10 Tools This chapter includes the following topics: About WiseScript Package Editor Tools on page 241 ApplicationWatch on page 241 Import Visual Basic Project on page 242 About WiseScript Package Editor Tools WiseScript Package Editor only The WiseScript Package Editor contains powerful tools that perform specialized functions.
Tools ApplicationWatch records only the .DLL, .OCX, or .EXE files that are accessed during execution or installation of an application. Note Application Watch cannot monitor 16-bit applications. Note Files that you specify in System .DLLs to Exclude in Preferences are ignored. Setting Preferences on page 25.
Page 243
Tools 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.
Page 244
Tools a. Cancel the import. b. Locate the files and move them to the System or System32 directory. c. Restart the import. 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.
Chapter 7 Troubleshooting WiseScripts This chapter includes the following topics: About Troubleshooting a WiseScript on page 155 Using the Installation Log on page 155 File Replacement Problems in System32 on page 155 About Troubleshooting a WiseScript Use the following features to troubleshoot a WiseScript: Installation log Lets you determine what happens during the installation, including what fails.
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.
Chapter 8 Quick Reference This chapter includes the following topics: Automatic Compiler Variables on page 157 Automatic Run-time Variables on page 158 Run-time Variables on page 160 SVS Variables on page 162 Expression Operators on page 164 Windows Language Codes on page 256 Command-Line Options on page 166...
Quick Reference Variable Description _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_...
Page 249
Quick Reference Variable Description DLG_EVENT_TYPE Used for custom dialog box scripts. Built-in dialog box events are INIT, UPDATE, VERIFY. Creating a Custom Dialog Box Script on page 144. 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.
Quick Reference Variable Description RESTART At the end of the script, set this variable to: 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.
Page 251
Quick Reference Variable Description 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.).
Quick Reference Variable Description 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.
Page 253
Quick Reference Variable Description Example Value SYSTEMDRIVE The drive letter that contains the Windows directory that the system started. WINDIR The Windows directory C:\Windows that was started. PROFILESDIRECTORY The directory that contains C:\Documents and Settings local user profile information. ALLUSERSPROFILE The directory that contains C:\Documents and Settings\All Users the All Users profile.
Page 254
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...
Quick Reference Variable Description Example Value USERPROFILE Location of the current C:\Documents and Settings\User user’s profile. Expression Operators In 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.
Quick Reference 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.
Page 257
Quick Reference Language Code Script Dutch (Standard) Latin 1 English (American) Latin 1 English (Australian) Latin 1 English (British) Latin 1 English (Canadian) Latin 1 English (Ireland) Latin 1 English (New Zealand) Latin 1 Finnish Latin 1 French (Belgian) Latin 1 French (Canadian) Latin 1 French (Standard)
Quick Reference Command-Line Options You 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. If you compile from the command line, compile errors generate return codes.
Quick Reference Note To 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. WiseScript Installations Command-Line Options You can apply the following command-line options to .EXE files that you compile from WiseScript Package Editor projects.
Page 260
Quick Reference Silent mode. The uninstall proceeds silently with no splash screen, no dialog boxes, and no end user choices. Rollback mode. Removes the Select Uninstall Method dialog box, which means the end user does not see options for a custom, automatic, or repair uninstall.
Index Symbols Add to Config.sys 124 arranging object 238 bitmap, adding 237 Add to System.ini 125 % sign with compiler variable 113 editing text 235 Add/Remove Programs page 41 _ALIASNAME_ 247 ellipse, adding 236 administrator rights, checking 132 _ALIASPATH_ 247 exporting 234 After$ 256 importing 234...
Page 262
CabWiz installation 18 drop-down 209 about 180 options 43 edit text 211 silently 258 editing 208 Call COM Object 163 speeding 26 frame 221 Call DLL Function stopping 172 graphic 213 example using structure 130 group box 214 compiler variable script action 126 hot text 214 about 46, 113...
Page 263
data source, ODBC 63, 139 script, custom 229 checking if loaded 136 scripting 195, 196 excluding with date/time file modified settings 206 ApplicationWatch 26 getting 170 size 206 excluding with Import VB getting four-digit year 171 stop appending to path 227 Project 26 date/time, current stop dir exists message 227...
Page 264
Also see installer .EXE renaming 191 Get Environment Variable 167 compiling 18 renaming in layer 192 Get Name/Serial Number 167 getting path 170 replacing in System32 246 Get Registry Key Value 168 location after compile 44 replacing on destination Get SVS Layer Info 168 naming 44 computer 56, 141, 177 Get System Information 170...
Page 265
IIS Web site getting started 14 prompting for file location 26 creating 147 icon for 45 rebuilding automatically 26 setting permissions 199 import VB project 242 installer message Internet-based 55 image, displaying in background 149, See installation message language 24, 44 Instr$ 255 log file 60 Import SVS Layer 173...
Page 266
adding to dialog box 209, 216 Password page 64 with check boxes 217 password, requiring 55, 55, 64, 140, NAME 251 localization name script 97 See language patch installation 56, 56, 76, 178 navigating between views 16 log file path network See installation log changing directories 28...
Page 267
proxy server information 26 removable media 62 resolution requirement 78 Public/private key pair 49 Remove SVS Exclude Entry 191 Screen page 71 push button control 218 Rename File or Directory in SVS script Layer 192 about 114 PVK file 49 adding action 101 Rename File/Directory 191 blank 105...
Page 268
adding 72, 142 setting 77 checking 137 installation 62 System Requirements page 77 controlling behavior 73, 142 opening an SMS installation 16 system requirements, Wise product creating 72, 142 SMS file Refer to Getting Started Guide dependency 73, 143 copying 34 system restore (Windows Me) 44 group 73, 143 Software Virtualization Solution 119...
Page 269
VBScript 159 about 83 about 100 creating installation 84 Ucase$ 256 actions 162 process overview 83, 84 UNC path calling COM object 163 uploading installation 86 converting to 29 checking syntax 161 WebDeploy page 84 getting 170 debugging 161 Welcome dialog box 48 underscore in compiler variable 113 editing 160 While Statement...
Page 270
actions 119 in Windows Installer 17 portable project 18 troubleshooting 245 WiseScript Editor about 12 starting 15 WiseScript Package Editor starting 15 WiseUpdate about 87 adding with script 179 client 87, 93 configuring 89 INI file 91 process 88 running from application 93 running silently 93 testing 92 tips 94...
Need help?
Do you have a question about the WISESCRIPT PACKAGE EDITOR 7.0 SP2 - FOR WISE INSTALLATION STUDIO V1.0 and is the answer not in the manual?
Questions and answers