//
// 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; }
Si nous engendrons un nouveau processus, quand devons-nous définir UseShellExecute sur True?
processStartInfo.RedirectStandardOutput=true
, il me semble que vous pouvez toujours rediriger la sortie standard en faisantprocess.Arguments= "cmd /c dir >c:\\crp\\a.a"
. De même à partir d'une boîte de dialogue d'exécution, vous pouvez le fairecmd /c dir>c:\crp\a.a