我在我的系统中打开了一个命令提示符,我正在使用它传递一些命令
System.Windows.Forms.SendKeys.Send(key);
方法。
现在是否可以获得命令提示符的状态,这意味着它是在执行命令还是处于空闲状态以及如何知道它在特定时间执行的命令?
答案 0 :(得分:0)
使用StartInfo.RedirectStandardOutput
请参阅此帖子:
Piping in a file on the command-line using System.Diagnostics.Process