Ext.CmdLineWait( cmdLine )


Executes the string cmdLine in the operating system's command line interpreter and waits for the command to finish. When searching for applications or batch files, the ScriptAppPath registry setting is not used, but the OS %Path% variable is. Refer also to Ext.NewTask( appName, arg1, arg2, ... ) and Ext.NewTaskWait( appName, arg1, arg2, ... ).



This argument can contain redirect symbols, pipe characters, wildcards, and anything else legal at a command line prompt.

Return Values

The command line interpreter's return value, which is the exit code of the program or batch file called. A program that does not generate a runtime error and does not call the "exit" statement has an exit code of zero. A batch file has an exit code of zero if its last executing line is not a runtime error or an "exit" statement. If a runtime error occurs in a program or batch file, the exit code is an OS error number, usually a large negative number. If an "exit" statement executes, its numeric parameter is the exit code. When a batch file uses the DOS "exit" statement with the "/B" option, the "exit" parameter is ignored, and the exit code is zero.
Note:   The "return" statement offered in C/C++ (and other programming languages) is not the same thing as the "exit" statement, and its parameter value has no effect on the exit code.

Related Topics