Skip to content

RunCommand

Execute a command in the current working directory.

Declaration

Source position: processbody.inc line 264

function RunCommand(const exename: TProcessString; 
                   const commands: Array of TProcessString = String; 
                   out outputstring: string; 
                   Options: TProcessOptions=[]; 
                   SWOptions: TShowWindowOptions=swoNone) : Boolean;
function RunCommand(const cmdline: TProcessString; 
                   out outputstring: string) : Boolean;

Description

RunCommand runs RunCommandInDir with an empty current working directory.

The version using CmdLine attempts to split the command line in a binary and separate command-line arguments. This version of the function is deprecated.

See also

Name Description
RunCommandInDir Run a command in a specific directory.