ProcessStartInfo.LoadUserProfile 屬性

定義

取得或設定值,表示是否要從登錄載入 Windows 使用者設定檔。

public:
 property bool LoadUserProfile { bool get(); void set(bool value); };
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public bool LoadUserProfile { get; set; }
public bool LoadUserProfile { get; set; }
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
member this.LoadUserProfile : bool with get, set
member this.LoadUserProfile : bool with get, set
Public Property LoadUserProfile As Boolean

屬性值

如果應該載入 Windows 使用者設定檔,則為 true,否則為 false。 預設為 false

屬性

備註

如果使用使用者名稱、密碼和網域啟動進程,則會參考這個屬性。

如果值為 true,則會載入登錄機碼中的 HKEY_USERS 使用者配置檔。 載入配置檔可能相當耗時。 因此,只有在您必須存取登錄機碼中的 HKEY_CURRENT_USER 資訊時,才最好使用此值。

在 Windows Server 2003 和 Windows 2000 中,不論進程是否已建立子進程,配置檔都會在新的進程終止之後卸除。

在 Windows XP 中,配置檔會在新的進程和它建立的所有子進程終止之後卸除。

適用於