How To: Execute command line in C#, get STD OUT results

后端 未结 17 1741
既然无缘
既然无缘 2020-11-21 13:12

How do I execute a command-line program from C# and get back the STD OUT results? Specifically, I want to execute DIFF on two files that are programmatically selected and wr

17条回答
  •  佛祖请我去吃肉
    2020-11-21 13:48

    There one other parameter I found useful, which I use to eliminate the process window

    pProcess.StartInfo.CreateNoWindow = true;
    

    this helps to hide the black console window from user completely, if that is what you desire.

提交回复
热议问题