![](/images/new-backgrounds/1103032/103032135x1.webp)
Configuring Custom Actions
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
You can also optionally run the
For example, to run your Visual Basic script in a
•Next to File, type the full path and file name of the
(%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
•“Configuring Custom Actions” on page