ProcessStartInfo.LoadUserProfile 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示是否要从注册表加载 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中,配置文件会在新进程后卸载,并且已创建的所有子进程都已终止。