Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 Jun : Capture command line output works not with every command (CreateProcess, TStartu

www.cryer.info
Managed Newsgroup Archive

Capture command line output works not with every command (CreateProcess, TStartu

Subject:Capture command line output works not with every command (CreateProcess, TStartu
Posted by:"Ruediger Kabbasch" (ruediger.kabbas..@thermo.com)
Date:Wed, 27 Jun 2007 17:05:22

Hi everybody

I use the CreateProcess function to run a DOS command. I try two versions
(TStartupInfo) to capture the output. I use a temp. file or pipes.

One thing I try to do is to capture the help informations.

e.g.

help xcopy
help dir
net /?
chkdsk /?

etc.

(The command line is (Win2k) cmd /c <and the command> [e.g. cmd /c help
xcopy])

The problem is that I'm not able to capture every output that I can see at
the command line.

e.g.
help xcopy could be captured with pipes but not with a temp file.
net /? could neither be captured with pipes nor with a temp file.

Can anybody can give me a hint what's different between net /? and chkdsk /?

Thanks in advance for any help.
Kind regards

Ruediger Kabbasch

Replies:

www.cryer.info
Managed Newsgroup Archive