| [Overview][Classes][Procedures and functions][Index] |
Executes a command found in the current PATH environment
Source position: utf8process.pp line 54
procedure RunCmdFromPath( |
ProgramFilename: string; |
CmdLineParameters: string |
); |
ProgramFilename |
|
Name of the program to execute |
CmdLineParameters |
|
Command line parameters for the process |
RunCmdFromPath is used to execute a command which can be found in the current PATH environment. For example, the following locates and executes the /bin/ls command with the specified arguments:
RunCmdFromPath('ls', '-l /home');
An exception will be raised if the program file cannot be located, or cannot be executed.
RunCmdFromPath creates an instance of TProcessUTF8 to execute the program using the specified arguments.
| lazarus-ccr.sourceforge.net |