Ext.NewTaskWait()

(SBM On-Premise only) Executes an external application, passing any given arguments and awaiting the results.

Function Signature

 int Ext.NewTaskWait( appName, [ arg1-6 ] )

int Ext.NewTaskWait( appName, Vector args )

Parameters

Parameter Type Description

appName

The appName can be any external application.

  • If appName does not contain a path component, it is searched for in the path list given by the optional SBM registry setting "ScriptAppPath." If not found, appName is then searched for in the path list given by the operating system's environment variable "Path." ScriptAppPath conforms to the same syntax as Path.
  • Folder paths are separated by semicolons, environment variables are surrounded by '%' characters, and spaces do not need to be escaped or quoted.
  • Unlike Path, any quotes in ScriptAppPath are interpreted literally as part of the folder name.
  • If appName does not contain a file extension, the system tries .COM, .EXE, .BAT, and then .CMD. Arguments following appName are optional.

For details on using ScriptAppPath, refer to Setting Script Application Paths.

arg (up to 6)

Variant

Optional. Between 0-6 parameters to pass to the command. For more than 6 parameters, use the Vector signature.

args

Vector

Parameters to pass to the command.

Return

Type Description

int

Returns the application's exit code. For details about exit codes, refer to Ext.CmdLineWait().

Technical Details

SBM ModScript version: 11.3.

Notes

While the script is waiting, its execution is frozen. This may cause performance problems for long scripts or scripts that occur repeatedly.

Related Topics

Extension Functions