beautypg.com

NEC 320Fc User Manual

Page 68

background image

Configuring Custom Actions

3-18

Express5800/320Fc: Active Upgrade™ User’s Guide

Executing Visual Basic Scripts and Other Types of Executable Files

By default, the File field on the Custom Actions page accepts only batch files (.bat),
application files (.exe), and Visual Basic scripts (.vbs). However, if necessary, you
might be able to run another type of executable file (such as a Perl script) by
implementing the command-line script host for the file.

You can also optionally run the command-line script host for Visual Basic scripts
(cscript.exe) if you need to enable options that are available only in that environment.

For example, to run your Visual Basic script in a command-line script host, do the
following when performing the procedure in

“Configuring Custom Actions” on

page 3-12

:

Next to File, type the full path and file name of the command-line script host:

%SystemRoot%\system32\cscript.exe

(%SystemRoot% is an environment variable that automatically inserts your system
root directory, typically C:\WINNT.)

Next to Arguments, type the full path name and file name of your executable file.
For example:

C:\bin\myvbscript.vbs

If applicable, you can type additional arguments that are specific to your script file or
options that are specific to the session. For example, for a cscript session, you might
want to specify the //T option to control the maximum amount of time your program is
allowed to run:

C:\bin\myvbscript.vbs //T:30

The preceding example would terminate the program and cscript session after 30
seconds. Setting this type of time limit is a useful way of ensuring that your executable
file cannot delay the upgrade process.

For more information about the cscript command, open a Command Prompt session
and enter cscript /?.

Related Topics

“Programming Notes for Custom Actions” on page 3-15

“Configuring Custom Actions” on page 3-12