Running a Script

 

WinBatch utilities run like any other Windows programs. They can run from a command line, or from a file listing such as the Windows Explorer.

 

WinBatch utilities are usually run as files with the extension .WBT. When some WinBatch utilities are used, they need information passed to them when they run. This is easily done by passing command line parameters to them.

 

This capability can be used from the command line "Start..Run" menu items in Windows. An example dialog is shown below.

 

Parameters can be also be passed through the command line entry included in the item properties of any icon in Program Manager. Finally, an application can send parameters to a WinBatch utility it launches from a command line or from a function in a macro language.

 

A command like this runs a WinBatch system utility from a command line or an icon:

 

WinBatchfilename filename.wbt param1 param2.. param[n]

 

This command line can be entered into a Command Line text entry box like this one from the Windows "Start… Run…" menu option.

 

image\01_cmdln_shg.gif

 

WINBATCHFILENAME is the generic name of your WinBatch executable. The specific, or actual, name for the WinBatch application will change to reflect the operating system in use.

 

"filename.wbt" is any valid WBT file, and is a required parameter.

 

"p1 p2 ... p[n]" are optional parameters to be passed to the WBT file on startup. Each is delimited from the next by one space character.

 

 

Writing a Script

Parameters

Menu Files

Ways to run WinBatch Scripts