语言

ProcessStartInfo.StartDetached 属性

定义

获取或设置一个值,该值指示是否应以分离的方式启动进程。

public:
 property bool StartDetached { bool get(); void set(bool value); };
public bool StartDetached { get; set; }
member this.StartDetached : bool with get, set
Public Property StartDetached As Boolean

属性值

true 启动从父级分离的进程;否则,为 false. 默认值为 false。

注解

使用标准输入、输出和错误重定向到 null 设备(在 Windows,Unix 上)启动一个新的分离过程,NUL除非用户显式配置了 RedirectStandardInput、RedirectStandardOutput、RedirectStandardError、 StandardInputHandleStandardOutputHandle或 StandardErrorHandle。 /dev/null

在Windows,进程以DETACHED_PROCESS标志启动。

在 Unix 上,该过程作为新会话的负责人启动。

此属性不能与 UseShellExecute 设置为 true.

适用于