ProcessStartInfo.LoadUserProfile Property

Definition

Gets or sets a value that indicates whether the Windows user profile is to be loaded from the registry.

C#
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public bool LoadUserProfile { get; set; }
C#
public bool LoadUserProfile { get; set; }

Property Value

true if the Windows user profile should be loaded; otherwise, false. The default is false.

Attributes

Remarks

This property is referenced if the process is being started by using the user name, password, and domain.

If the value is true, the user's profile in the HKEY_USERS registry key is loaded. Loading the profile can be time-consuming. Therefore, it is best to use this value only if you must access the information in the HKEY_CURRENT_USER registry key.

In Windows Server 2003 and Windows 2000, the profile is unloaded after the new process has been terminated, regardless of whether the process has created child processes.

In Windows XP, the profile is unloaded after the new process and all child processes it has created have been terminated.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1