(SBM On-Premise only) Executes an external application as a new process, passing any given arguments.

Function Signature

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

int Ext.NewTask( appName, Vector args )


Parameter Type Description



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)


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



Parameters to pass to the command.


Type Description


Returns the operating system handle of the new process. This handle is useless within SBM ModScript, but occasionally a script may have some reason to pass the handle to another program. The application's exit code is unavailable because this function generally returns before the application exits.

Technical Details

SBM ModScript version: 11.3.


The new process runs concurrently; the script does not wait for it to exit.

Related Topics

Extension Functions