I'm trying to spawn cmd.exe and write its output to a file. Here's the code:
I can see an empty console flash quickly on the screen, but the process seems to end straight away, and nothing is written to the file. Shouldn't it write the prompt to the file, and then wait for something from STDIN?
Thread thd=new Thread(new ThreadStart(ReadStdOut));
public void ReadStdOut()
If there is an easier way to do this I would love to know.