0

edit - this is a duplicate from here

I would like to create a gui wrapper (in C#) to an existing CLI application (I only have the binaries of this CLI application). in order to do that I need to run the CLI application, and then parse its output, give more commands (witch depends on the output) and so on.

I know that I can use System.Diagnostics.Process.Start(...) to run a single command. but is there any way to communicate with that thread? or is there any other way to do this in C#?

Community
  • 1
  • 1
  • 2
    Redirect stdin/out, E.g. http://stackoverflow.com/questions/21270842/reading-writing-to-a-command-line-program-in-c-sharp – Alex K. Mar 12 '14 at 15:55
  • Sounds like you need to attach to the IO streams of the process.. dunno if that helps you in your Googling.. look for something like `stdin stdout system.diagnostics.process.start c#` – Michael Coxon Mar 12 '14 at 15:57
  • this will (hopefully) will give me access to the output. but how can I send new input to the processes afterwards? write to the stream? – Amir David Nissan Cohen Mar 12 '14 at 16:10
  • Yes, write to the input stream – Alex K. Mar 12 '14 at 16:16

0 Answers0