SBM AppScript Reference → Programming SBM AppScript → Extension Functions → Ext.NewTask( appName, arg1, arg2, ... )
Executes an external application as a new process on the Web server, passing any given arguments. The new process runs concurrently; the script does not wait for it to exit.
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. Ext.NewTask() cannot execute any .BAT file whose file name or path contains one or more spaces. Other file types have no such limitation. Arguments following appName are optional. For details on using ScriptAppPath, refer to Setting Script Application Paths.
Returns the operating system handle of the new process. This handle is useless within SBM AppScript, 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.
Copyright © 2007–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.