Run

Top  Previous  Next

 

The Run command allows you to run any application that can be run from the command line from within the script WITHOUT waiting or monitoring the progress of the application.

lamp IMPORTANT: The function of this command is to run third party applications. As a result if you need support on the syntax required by any application you should contact the support team of the product developer. We are unable to offer support for third party applications of which we have no knowledge and over which we have no control.

Command Syntax

 

Run:[ExecutablePathAndFileName],[CommandLineArguments]

 

The colon after the command is compulsory. The comma character after the executable path is only compulsory where command line arguments are specified. The Run command itself is not case sensitive, but parameters may be depending on the program, operating system, and locale.

 

Parameters:

 

ExecutablePathAndFileName: The fully qualified path and file name identifying the executable file to be run

CommandLineArguments: Any arguments to the command line that may be required.

 

The ExecutablePathAndFileName parameter is compulsory. The CommandLineArguments parameter may or may not be required depending upon the requirements of the application being run. If any required parameter is missing or invalid an error will be thrown. The parameters must be surrounded by quotation marks if one or more spaces or Reserved Characters are included. It is good practice to include the quotation marks in any case, so that it reduces the risk of error when writing scripts.

 

Example:

 

Just run Notepad:

 

Run:"Notepad.exe"

 

Run Notepad loading a specified file into the application:

 

Run:"Notepad.exe","C:\Test\My Test Text File.txt"

lamp Note: Unlike the Exec command which waits until the executed application completes, the Run command will usually return BEFORE the program you start from your script terminates.

See Also: Exec Conditional DeleteFile MoveFile RenameFile