Link to home
Start Free TrialLog in
Avatar of Lmoen
Lmoen

asked on

interacting with DOS

Hi.  How does one interact with DOS from Delphi/Pascal.  I want to (for example) be able to interact with a program run externally (by e.g WinExec), and do different things based on its output.

1) run dos command using winexec
THEN
if *this* happens, do this
if *that* happens, do this,
so my question is basically how to do this - how can I use Delphi to read the output of another program run in e.g DOS?

Thanks for the help
ASKER CERTIFIED SOLUTION
Avatar of Mohammed Nasman
Mohammed Nasman
Flag of Palestine, State of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of teacher_mod
teacher_mod

Irrelevant and offensive comments have been deleted from this Question by:

teacher_mod
Community Support Moderator
Experts-Exchange
teacher_mod@experts-exchange.com
hi,

i've just implemented the above code named "RunDosInMemo" in my app, and it works fine when the DOS prog returns something but it hangs up when it does not return anything.  

the DOS outputs depends on the parameter being passed when called.

is there a way to determine if the DOS prog does not return anything?

thanks.
--juncanonigo