[Lazarus] Capturing the output from a command using TPorcess

Richard Mace richard.mace at gmail.com
Tue Jul 21 09:04:59 CEST 2015


On 20 Jul 2015 22:23, "Frederic Da Vitoria" <davitofrg at gmail.com> wrote:
>
> 2015-07-20 21:41 GMT+02:00 Richard Mace
>> How can I code TProcess, so that it shows me the output from the
"ipconfig /all" command instead?
>
>
> Hello,
>
> This is not exactly what you asked for, but you could simply redirect the
output with something like "ipconfig /all > ipconfig..txt" then read the
contents of ipconfig.txt (or whatever name you gave to the output file).
You must take care where you put the output file, though: you must have the
rights to write in that folder.
>
> Of course my solution is only a quick trick, the answer to your question
would be much cleaner and much more interesting.
>
Hi Frederic, that's a good idea and I hadn't thought of that work around.
I'll give it a go

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150721/62041fee/attachment-0003.html>


More information about the Lazarus mailing list