xtd 0.2.0
Loading...
Searching...
No Matches

◆ user_name() [2/2]

process_start_info & xtd::diagnostics::process_start_info::user_name ( const xtd::ustring value)
noexcept

Sets the user name to be used when starting the process.

Parameters
valueThe user name to use when starting the process.
Returns
The current instance of process_start_info.
Important
The xtd::diagnostics::process_start_info::working_directory property must be set if xtd::diagnostics::process_start_info::user_name and xtd::diagnostics::process_start_info::password are provided. If the property is not set, the default working directory is SYSTEMROOT%\system32.
Remarks
If the xtd::diagnostics::process_start_info::user_name property is not an empty string, the xtd::diagnostics::process_start_info::use_shell_execute property must be false, or an xtd::invalid_operation_exception will be thrown when the xtd::diagnostics::process::.start(xtd::diagnostics::process_start_info) method is called.