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

TPROCESS.Parameters

Command-line arguments. Supersedes CommandLine.

Declaration

Source position: processbody.inc line 149

published property TPROCESS.Parameters : TProcessStrings
  read FParameters
  write SetParameters;

Description

Parameters contains the command-line arguments that should be passed to the program specified in Executable.

Commandline arguments should be specified one per item in Parameters: each item in Parameters will be passed as a separate command-line item. It is therefor not necessary to quote whitespace in the items. As a consequence, it is not allowed to specify multiple command-line parameters in 1 item in the stringlist. If a command needs 2 options -t and -s, the following is not correct:

With Parameters do
  begin
  add('-t -s');
  end;

Instead, the code should read:

With Parameters do
  begin
  add('-t');
  Add('-s');
  end;
Remark: Note that Parameters is ignored if either of CommandLine or ApplicationName is specified. It can only be used with Executable.
Remark: The idea of using Parameters is that they are passed unmodified to the operating system. On Windows, a single command-line string must be constructed, and each parameter is surrounded by double quote characters if it contains a space. The programmer must not quote parameters with spaces.

See also

Executable

  

Executable name. Supersedes CommandLine and ApplicationName.

CommandLine

  

Command-line to execute (deprecated)

ApplicationName

  

Name of the application to start (deprecated)


Documentation generated on: Jun 23 2021