How to detect that a DOS process is waiting for input

  • Thread starter Thread starter Matt Burland
  • Start date Start date
M

Matt Burland

Hi,

My app runs a DOS program as a process. Most of the time, given the right
command line arguments, the DOS process runs by itself without needing any
user intervention, but there is a certain situation that can arise where it
expects the user to respond "y" or "n" to a question. Is there any way to
detect that the process is waiting for this user input?

Thanks

Matt
 
question. Is there any way to detect that the process is waiting for
this user input?

When you start the DOS app with the System.Process class, you can have it
redirect the standard input and output. From that you can monitor the text
that is output by the DOS app and if it is asking a question then you can
respond with the answer.

Chris
 
Thanks, but that's what I'm doing. I was looking for something more general
that didn't rely on me having prior knowledge of what the output is going to
be.
 
Back
Top