[fpc-pascal] How to execute a command line

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Nov 19 21:26:29 CET 2008

On 19 Nov 2008, at 20:53, Felipe Monteiro de Carvalho wrote:

> I was asking myself how to execute a command line, so I went to use
> Unix.shell, but now it seams to be deprecated.
> What should I be using instead?


> Not TProcess, because I don't know the exact path of what I am
> calling, I would like to use something in the path.

Note that this is dangerous (it allows an attacker to override  
whatever you are calling with something else, simply by changing the  
path). Make sure this is never done from a general consumer app or  
something which might run with elevated privileges.

> I also need something that works on all OSes (yes, I know that UNIX
> unit wouldn't).

There is no such OS-independent function afaik.


More information about the fpc-pascal mailing list