1
ysc3839 2018 年 9 月 25 日
RedirectStandardOutput 的问题?
|
2
xujinkai 2018 年 9 月 25 日
你设置了 UseShellExecute 和 CreateNoWindow 当然是没反应的,当然是看不到窗口的
RedirectStandardOutput 以后,需要使用 p.OutputDataReceived += ... 来获取输出 MSDN https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.outputdatareceived?redirectedfrom=MSDN&view=netframework-4.7.2 这是我写的 https://xujinkai.net/posts/csharp-use-process-run-command |