[Lazarus] Capturing the output from a command using TPorcess

Richard Mace richard.mace at gmail.com
Mon Jul 20 21:41:10 CEST 2015


Hi All,
I hope this question is going to make sense.
I am trying to obtain the MAC Address of a remote PC, using psexec \\pcname
and running the command "ipconfig /all".
If I run the psexec command from my machine via a command prompt, ipconfig
/all is successfully run on the remote machine, and I can see it's MAC
address, however, if I run it via TProcess, in Lazarus, the output I get
from TProcess is the output from psexec (successfully run and exited with
error code 0) rather than the output from ipconfig.
How can I code TProcess, so that it shows me the output from the "ipconfig
/all" command instead?

I hope that makes sense?

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150720/c9e696f8/attachment-0002.html>


More information about the Lazarus mailing list