ProcessStartInfo.UserName Proprietà

Definizione

Ottiene o imposta il nome utente da usare all'avvio del processo. Se si usa il formato UPN, user@DNS_domain_name, la proprietà Domain deve essere null.

public:
 property System::String ^ UserName { System::String ^ get(); void set(System::String ^ value); };
public string UserName { get; set; }
member this.UserName : string with get, set
Public Property UserName As String

Valore della proprietà

Nome utente da usare all'avvio del processo. Se si usa il formato UPN, user@DNS_domain_name, la proprietà Domain deve essere null.

Commenti

Importante

La WorkingDirectory proprietà deve essere impostata se UserName e Password viene fornita. Se la proprietà non è impostata, la directory di lavoro predefinita è %SYSTEMROOT%\system32.

Se la UserName proprietà non null è o una stringa vuota, la UseShellExecute proprietà deve essere falseo verrà generata una InvalidOperationException classe quando viene chiamato il Process.Start(ProcessStartInfo) metodo.

Si applica a