[fpc-devel] TProcess and arguments with quotes

Martin lazarus at mfriebe.de
Wed Sep 5 10:41:30 CEST 2012

 From http://bugs.freepascal.org/view.php?id=22801
> You should not pass quotes. The quotes are only needed in a shell. 

That is not always possible. And the quotes work on most platforms.

I know TProcess changed from a single command-line to a listof 
arguments. So I couldn't find the User Changes note for this.

An application may however have a list of arguments in a single string 
(e.g. the IDE ask the user to specify extra arguments. This can be 0, 1 
or many)

Those must be broken into individual strings.  TProcess does that if 
send as command line.
In this case the quotes are needed. Or the commandline can not be broken 

The IDE could in that case of course try to parse the params itself, and 
try to remove the quotes. but that leaves much room for error (removing 
quotes that are meant to be passed to the app)

More information about the fpc-devel mailing list