ProcessStartInfo.UserName Property
.NET Framework 3.0
Gets or sets the user name to be used when starting the process.
Namespace: System.Diagnostics
Assembly: System (in system.dll)
Assembly: System (in system.dll)
Important: |
|---|
| The WorkingDirectory property must be set if UserName and Password are provided. If the property is not set, the default working directory is %SYSTEMROOT%\system32. |
If the UserName property is not a null reference (Nothing in Visual Basic) or an empty string, the UseShellExecute property must be false, or an InvalidOperationException will be thrown when the Process.Start(ProcessStartInfo) method is called.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Important: