[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Execute another process (program).
Source position: osutilsh.inc line 33
function ExecuteProcess( |
const Path: RawByteString; |
const ComLine: RawByteString; |
Flags: TExecuteFlags = [] |
):Integer; |
const Path: RawByteString; |
const ComLine: array of RawByteString; |
Flags: TExecuteFlags = [] |
):Integer; |
const Path: UnicodeString; |
const ComLine: UnicodeString; |
Flags: TExecuteFlags = [] |
):Integer; |
const Path: UnicodeString; |
const ComLine: array of UnicodeString; |
Flags: TExecuteFlags = [] |
):Integer; |
ExecuteProcess will execute the program in Path, passing it the arguments in ComLine. ExecuteProcess will then wait for the program to finish, and will return the exit code of the executed program. In case ComLine is a single string, it will be split out in an array of strings, taking into account common whitespace and quote rules.
The program specified in Path is not searched in the searchpath specified in the PATH environment variable, so the full path to the executable must be specified in Path, although some operating systems may perform this search anyway (notably, windows)
Flags can be used to control the passing of file handles: if ExecInheritsHandles is included, the file handles of the current process will be passed on to the newly executed process.
In case the program could not be executed or an other error occurs, an EOSError exception will be raised.
|
Flags for ExecuteProcess |
|
|
Operating system error. |