System.Diagnostics.ProcessStartInfo.UserName Property

Gets or sets the user name to be used when starting the process.

Syntax

[System.ComponentModel.NotifyParentProperty(true)]
public string UserName { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Note:

   The ProcessStartInfo.WorkingDirectory property must be set if ProcessStartInfo.UserName and ProcessStartInfo.Password are provided. If the property is not set, the default working directory is %SYSTEMROOT%\system32.

If the ProcessStartInfo.UserName property is not null or an empty string, the ProcessStartInfo.UseShellExecute property must be false, or an InvalidOperationException will be thrown when the Process.Start(ProcessStartInfo) method is called.

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0