Run (execute a process)¶
function Run(commandLine: string): boolean
The Run
function spawns a process that executes an external program. The executed program
can take command line parameters, as shown in the example below.
This function waits for the spawned process to exit, and then returns true if it ran without errors, or false if errors occurred.
Example:
{
if (Run('cmd /c "/my_shell_scripts/some_script.bat"')) {
Log('Batch script ran successfully');
}
}