How to detect that a DOS process is waiting for input

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
 
C

Chris Dunaway

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
 
M

Matt Burland

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top