//
// Summary:
// Gets or sets a value indicating whether to use the operating system shell
// to start the process.
//
// Returns:
// true to use the shell when starting the process; otherwise, the process is
// created directly from the executable file. The default is true.
[DefaultValue(true)]
[MonitoringDescription("ProcessUseShellExecute")]
[NotifyParentProperty(true)]
public bool UseShellExecute { get; set; }
如果我们生成一个新进程,什么时候需要将UseShellExecute设置为True?
processStartInfo.RedirectStandardOutput=true,但在我看来,您仍然可以通过执行重定向标准输出process.Arguments= "cmd /c dir >c:\\crp\\a.a"。同样,您可以从运行对话框中进行操作cmd /c dir>c:\crp\a.a