[Overview][Types][Classes] Reference for unit 'process' (#fcl)

TProcess.Execute

Execute the program with the given options

Declaration

Source position: process.pp line 97

public procedure TProcess.Execute; virtual;

Description

Executeactually executes the program as specified in CommandLine, applying as much as of the specified options as supported on the current platform.

If the poWaitOnExitoption is specified in Options, then the call will only return when the program has finished executing (or if an error occured). If this option is not given, the call returns immediatly, but the WaitOnExitcall can be used to wait for it to close, or the Runningcall can be used to check whether it is still running.

The TProcess.Terminatecall can be used to terminate the program if it is still running, or the Suspendcall can be used to temporarily stop the program's execution.

The ExitStatusfunction can be used to check the program's exit status, after it has stopped executing.

Errors

On error a EProcessexception is raised.

See also

TProcess.Running

  

Determines wheter the process is still running.

TProcess.WaitOnExit

  

Wait for the program to stop executing.

TProcess.Terminate

  

Terminate a running process

TProcess.Suspend

  

Suspend a running process

TProcess.Resume

  

Resume execution of a suspended process

TProcess.ExitStatus

  

Exit status of the process.