[Overview][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'process' (#fcl)


Execute the program with the given options


Source position: process.pp line 115

public procedure TProcess.Execute; virtual;


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

If the poWaitOnExit option 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 WaitOnExit call can be used to wait for it to close, or the Running call can be used to check whether it is still running.

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

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


On error a EProcess exception is raised.

See also



Determines wheter the process is still running.



Wait for the program to stop executing.



Terminate a running process



Suspend a running process



Resume execution of a suspended process



Exit status of the process.

This page is hosted on Get Lazarus Code and Component Repository at SourceForge.net. Fast, secure and Free Open Source software downloads