TClrProcessStartInfo.UserName Property

Gets or sets the user name to use when starting the process. If you use the UPN format, user@DNS_domain_name, the Domain property must be null.

Namespace: CNClrLib.Component.Process
published
 property UserName: String read GetUserName write SetUserName;

Property Value

Type: String

The user name to use when starting the process. If you use the UPN format, user@DNS_domain_name, the Domain property must be nil.

Important Note
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 an empty string, the UseShellExecute property must be false, or an InvalidOperationException will be thrown when the TCnProcess.Start(_ProcessStartInfo) method is called.