如何知道命令提示符的状态?

时间:2012-07-20 09:17:39

标签: c# input status command-prompt

我在我的系统中打开了一个命令提示符,我正在使用它传递一些命令 System.Windows.Forms.SendKeys.Send(key);方法。

现在是否可以获得命令提示符的状态,这意味着它是在执行命令还是处于空闲状态以及如何知道它在特定时间执行的命令?

1 个答案:

答案 0 :(得分:0)

使用StartInfo.RedirectStandardOutput请参阅此帖子:

Piping in a file on the command-line using System.Diagnostics.Process