xtd - Reference Guide
0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <process_start_info.h>
Specifies a set of values that are used when you start a process.
Inherits xtd::object.
Public Member Functions | |
process_start_info ()=default | |
Initializes a new instance of the xtd::diagnostics::process_start_info class without specifying a file name with which to start the process. More... | |
process_start_info (const xtd::ustring &file_name) | |
Initializes a new instance of the xtd::diagnostics::process_start_info class and specifies a file name such as an application or document with which to start the process. More... | |
process_start_info (const xtd::ustring &file_name, const xtd::ustring &arguments) | |
Initializes a new instance of the xtd::diagnostics::process_start_info class, specifies an application file name with which to start the process, and specifies a set of command-line arguments_ to pass to the application. More... | |
const xtd::ustring & | arguments () const |
Gets the set of command-line arguments to use when starting the application. More... | |
process_start_info & | arguments (const xtd::ustring &value) |
Sets the set of command-line arguments to use when starting the application. More... | |
bool | create_no_window () const |
Gets a value indicating whether to start the process in a new window. More... | |
process_start_info & | create_no_window (bool value) |
Sets a value indicating whether to start the process in a new window. More... | |
const xtd::ustring & | domain () const |
Gets a value that identifies the domain to use when starting the process. More... | |
process_start_info & | domain (const xtd::ustring &value) |
Sets a value that identifies the domain to use when starting the process. More... | |
std::map< xtd::ustring, xtd::ustring > & | environment () |
Gets the environment variables that apply to this process and its child processes. More... | |
const std::map< xtd::ustring, xtd::ustring > & | environment () const |
Gets the environment variables that apply to this process and its child processes. More... | |
std::map< xtd::ustring, xtd::ustring > & | environment_variables () |
Gets search paths for files, directories for temporary files, application-specific options, and other similar information. More... | |
const std::map< xtd::ustring, xtd::ustring > & | environment_variables () const |
Gets search paths for files, directories for temporary files, application-specific options, and other similar information. More... | |
bool | error_dialog () const |
Gets a value indicating whether an error dialog box is displayed to the user if the process cannot be started. More... | |
process_start_info & | error_dialog (bool value) |
Sets a value indicating whether an error dialog box is displayed to the user if the process cannot be started. More... | |
intptr_t | error_dialog_parent_handle () const |
Gets the window handle to use when an error dialog box is shown for a process that cannot be started. More... | |
process_start_info & | error_dialog_parent_handle (intptr_t value) |
Sets the window handle to use when an error dialog box is shown for a process that cannot be started. More... | |
const xtd::ustring & | file_name () const |
Gets the application or document to start. More... | |
process_start_info & | file_name (const std::filesystem::path &value) |
Sets the application or document to start. More... | |
process_start_info & | file_name (const xtd::ustring &value) |
Sets the application or document to start. More... | |
bool | load_user_profile () const |
Gets a value that indicates whether the Windows user profile is to be loaded from the registry. More... | |
process_start_info & | load_user_profile (bool value) |
Sets a value that indicates whether the Windows user profile is to be loaded from the registry. More... | |
const xtd::security::secure_string & | password () const |
Gets a secure string that contains the user password to use when starting the process. More... | |
process_start_info & | password (const xtd::security::secure_string &value) |
Sets a secure string that contains the user password to use when starting the process. More... | |
xtd::ustring | password_in_clear_text () const |
Gets the user password in clear text to use when starting the process. More... | |
process_start_info & | password_in_clear_text (const xtd::ustring &value) |
Sets the user password in clear text to use when starting the process. More... | |
bool | redirect_standard_error () const |
Gets a value that indicates whether the error output of an application is written to the xtd::diagnostics::process::standard_error stream. More... | |
process_start_info & | redirect_standard_error (bool value) |
Sets a value that indicates whether the error output of an application is written to the xtd::diagnostics::process::standard_error stream. More... | |
bool | redirect_standard_input () const |
Gets a value indicating whether the input for an application is read from the Process.StandardInput stream. More... | |
process_start_info & | redirect_standard_input (bool value) |
Sts a value indicating whether the input for an application is read from the Process.StandardInput stream. More... | |
bool | redirect_standard_output () const |
Gets a value that indicates whether the textual output of an application is written to the xtd::diagnostics::process::standard_output stream. More... | |
process_start_info & | redirect_standard_output (bool value) |
Sets a value that indicates whether the textual output of an application is written to the xtd::diagnostics::process::standard_output stream. More... | |
bool | use_shell_execute () const |
Gets a value indicating whether to use the operating system shell to start the process. More... | |
process_start_info & | use_shell_execute (bool value) |
Sets a value indicating whether to use the operating system shell to start the process. More... | |
const xtd::ustring & | user_name () const |
Gets the user name to be used when starting the process. More... | |
process_start_info & | user_name (const xtd::ustring &value) |
Sets the user name to be used when starting the process. More... | |
xtd::ustring | verb () const |
Gets the verb to use when opening the application or document specified by the FileName property. More... | |
process_start_info & | verb (const xtd::ustring &value) |
Sts the verb to use when opening the application or document specified by the FileName property. More... | |
std::vector< xtd::ustring > | verbs () const |
Gets the set of verbs associated with the type of file specified by the xtd::diagnostics::process_start_info::file_name property. More... | |
xtd::diagnostics::process_window_style | window_style () const |
Gets the window state to use when the process is started. More... | |
process_start_info & | window_style (xtd::diagnostics::process_window_style value) |
Sets the window state to use when the process is started. More... | |
const xtd::ustring & | working_directory () const |
When the xtd::diagnostics::process_start_info::use_shell_execute property is false, gets or sets the working directory for the process to be started. When xtd::diagnostics::process_start_info::use_shell_execute is true, gets or sets the directory that contains the process to be started. More... | |
process_start_info & | working_directory (const xtd::ustring &value) |
When the xtd::diagnostics::process_start_info::use_shell_execute property is false, gets or sets the working directory for the process to be started. When xtd::diagnostics::process_start_info::use_shell_execute is true, gets or sets the directory that contains the process to be started. More... | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. More... | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. More... | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. More... | |
template<typename object_t > | |
std::unique_ptr< object_t > | memberwise_clone () const |
Gets the type of the current instance. More... | |
virtual xtd::ustring | to_string () const noexcept |
Returns a std::string that represents the current object. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from xtd::object | |
static bool | equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are considered equal. More... | |
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are the same instance. More... | |
|
default |
Initializes a new instance of the xtd::diagnostics::process_start_info class without specifying a file name with which to start the process.
|
explicit |
Initializes a new instance of the xtd::diagnostics::process_start_info class and specifies a file name such as an application or document with which to start the process.
file_name_ | An application or document with which to start a process. |
xtd::diagnostics::process_start_info::process_start_info | ( | const xtd::ustring & | file_name, |
const xtd::ustring & | arguments | ||
) |
Initializes a new instance of the xtd::diagnostics::process_start_info class, specifies an application file name with which to start the process, and specifies a set of command-line arguments_ to pass to the application.
file_name | An application with which to start a process. |
arguments | Command-line arguments to pass to the application when the process starts. |
const xtd::ustring& xtd::diagnostics::process_start_info::arguments | ( | ) | const |
Gets the set of command-line arguments to use when starting the application.
process_start_info& xtd::diagnostics::process_start_info::arguments | ( | const xtd::ustring & | value | ) |
Sets the set of command-line arguments to use when starting the application.
value | File type–specific arguments that the system can associate with the application specified in the xtd::diagnostics::process_start_info::file_name property. The default is an empty string (""). |
bool xtd::diagnostics::process_start_info::create_no_window | ( | ) | const |
Gets a value indicating whether to start the process in a new window.
process_start_info& xtd::diagnostics::process_start_info::create_no_window | ( | bool | value | ) |
Sets a value indicating whether to start the process in a new window.
value | true if the process should be started without creating a new window to contain it; otherwise, false. The default is false. |
const xtd::ustring& xtd::diagnostics::process_start_info::domain | ( | ) | const |
Gets a value that identifies the domain to use when starting the process.
process_start_info& xtd::diagnostics::process_start_info::domain | ( | const xtd::ustring & | value | ) |
Sets a value that identifies the domain to use when starting the process.
value | The Active Directory Domain to use when starting the process. The xtd::diagnostics::process_start_info::domain property is primarily of interest to users within enterprise environments that use Active Directory. |
std::map<xtd::ustring, xtd::ustring>& xtd::diagnostics::process_start_info::environment | ( | ) |
Gets the environment variables that apply to this process and its child processes.
my_process.start_info().environment().insert({"TempPath", "C:\\Temp"});. You must set the xtd::diagnostics::process_start_info::use_shell_execute property to false to start the process after changing the xtd::diagnostics::process_start_info::environment property. If xtd::diagnostics::process_start_info:use_shell_execute is true, an xtd::invalid_operation_exception is thrown when the xtd::diagnostics::process::start method is called.
const std::map<xtd::ustring, xtd::ustring>& xtd::diagnostics::process_start_info::environment | ( | ) | const |
Gets the environment variables that apply to this process and its child processes.
my_process.start_info().environment().insert({"TempPath", "C:\\Temp"});. You must set the xtd::diagnostics::process_start_info::use_shell_execute property to false to start the process after changing the xtd::diagnostics::process_start_info::environment property. If xtd::diagnostics::process_start_info:use_shell_execute is true, an xtd::invalid_operation_exception is thrown when the xtd::diagnostics::process::start method is called.
std::map<xtd::ustring, xtd::ustring>& xtd::diagnostics::process_start_info::environment_variables | ( | ) |
Gets search paths for files, directories for temporary files, application-specific options, and other similar information.
my_process.startInfo().environment_variables().insert({"TempPath", "C:\\Temp"});. You must set the xtd::diagnostics::process_start_info::use_shell_execute property to false to start the process after changing the xtd::diagnostics::process_start_info::environment_variables property. If xtd::diagnostics::process_start_info::use_shell_execute is true, an xtd::invalid_operation_exception is thrown when the xtd::diagnostics::process::start method is called.
const std::map<xtd::ustring, xtd::ustring>& xtd::diagnostics::process_start_info::environment_variables | ( | ) | const |
Gets search paths for files, directories for temporary files, application-specific options, and other similar information.
my_process.startInfo().environment_variables().insert({"TempPath", "C:\\Temp"});. You must set the xtd::diagnostics::process_start_info::use_shell_execute property to false to start the process after changing the xtd::diagnostics::process_start_info::environment_variables property. If xtd::diagnostics::process_start_info::use_shell_execute is true, an xtd::invalid_operation_exception is thrown when the xtd::diagnostics::process::start method is called.
bool xtd::diagnostics::process_start_info::error_dialog | ( | ) | const |
Gets a value indicating whether an error dialog box is displayed to the user if the process cannot be started.
process_start_info& xtd::diagnostics::process_start_info::error_dialog | ( | bool | value | ) |
Sets a value indicating whether an error dialog box is displayed to the user if the process cannot be started.
value | true if an error dialog box should be displayed on the screen if the process cannot be started; otherwise, false. The default is false. |
intptr_t xtd::diagnostics::process_start_info::error_dialog_parent_handle | ( | ) | const |
Gets the window handle to use when an error dialog box is shown for a process that cannot be started.
process_start_info& xtd::diagnostics::process_start_info::error_dialog_parent_handle | ( | intptr_t | value | ) |
Sets the window handle to use when an error dialog box is shown for a process that cannot be started.
value | A pointer to the handle of the error dialog box that results from a process start failure. |
const xtd::ustring& xtd::diagnostics::process_start_info::file_name | ( | ) | const |
Gets the application or document to start.
process_start_info& xtd::diagnostics::process_start_info::file_name | ( | const std::filesystem::path & | value | ) |
Sets the application or document to start.
value | string The name of the application to start, or the name of a document of a file type that is associated with an application and that has a default open action available to it. The default is an empty string (""). |
process_start_info& xtd::diagnostics::process_start_info::file_name | ( | const xtd::ustring & | value | ) |
Sets the application or document to start.
value | string The name of the application to start, or the name of a document of a file type that is associated with an application and that has a default open action available to it. The default is an empty string (""). |
bool xtd::diagnostics::process_start_info::load_user_profile | ( | ) | const |
Gets a value that indicates whether the Windows user profile is to be loaded from the registry.
process_start_info& xtd::diagnostics::process_start_info::load_user_profile | ( | bool | value | ) |
Sets a value that indicates whether the Windows user profile is to be loaded from the registry.
value | true if the Windows user profile should be loaded; otherwise, false. The default is false. |
const xtd::security::secure_string& xtd::diagnostics::process_start_info::password | ( | ) | const |
Gets a secure string that contains the user password to use when starting the process.
process_start_info& xtd::diagnostics::process_start_info::password | ( | const xtd::security::secure_string & | value | ) |
Sets a secure string that contains the user password to use when starting the process.
value | The user password to use when starting the process. |
xtd::ustring xtd::diagnostics::process_start_info::password_in_clear_text | ( | ) | const |
Gets the user password in clear text to use when starting the process.
process_start_info& xtd::diagnostics::process_start_info::password_in_clear_text | ( | const xtd::ustring & | value | ) |
Sets the user password in clear text to use when starting the process.
value | string The user password in clear text. |
bool xtd::diagnostics::process_start_info::redirect_standard_error | ( | ) | const |
Gets a value that indicates whether the error output of an application is written to the xtd::diagnostics::process::standard_error stream.
process_start_info& xtd::diagnostics::process_start_info::redirect_standard_error | ( | bool | value | ) |
Sets a value that indicates whether the error output of an application is written to the xtd::diagnostics::process::standard_error stream.
value | true if error output should be written to xtd::diagnostics::process::standard_error; otherwise, false. The default is false. |
bool xtd::diagnostics::process_start_info::redirect_standard_input | ( | ) | const |
Gets a value indicating whether the input for an application is read from the Process.StandardInput stream.
process_start_info& xtd::diagnostics::process_start_info::redirect_standard_input | ( | bool | value | ) |
Sts a value indicating whether the input for an application is read from the Process.StandardInput stream.
value | true if input should be read from Process.StandardInput; otherwise, false. The default is false. |
bool xtd::diagnostics::process_start_info::redirect_standard_output | ( | ) | const |
Gets a value that indicates whether the textual output of an application is written to the xtd::diagnostics::process::standard_output stream.
process_start_info& xtd::diagnostics::process_start_info::redirect_standard_output | ( | bool | value | ) |
Sets a value that indicates whether the textual output of an application is written to the xtd::diagnostics::process::standard_output stream.
value | true if output should be written to xtd::diagnostics::process::standard_output; otherwise, false. The default is false. |
bool xtd::diagnostics::process_start_info::use_shell_execute | ( | ) | const |
Gets a value indicating whether to use the operating system shell to start the process.
process_start_info& xtd::diagnostics::process_start_info::use_shell_execute | ( | bool | value | ) |
Sets a value indicating whether to use the operating system shell to start the process.
value | true if the shell should be used when starting the process; false if the process should be created directly from the executable file. The default is true. |
const xtd::ustring& xtd::diagnostics::process_start_info::user_name | ( | ) | const |
Gets the user name to be used when starting the process.
process_start_info& xtd::diagnostics::process_start_info::user_name | ( | const xtd::ustring & | value | ) |
Sets the user name to be used when starting the process.
value | The user name to use when starting the process. |
xtd::ustring xtd::diagnostics::process_start_info::verb | ( | ) | const |
Gets the verb to use when opening the application or document specified by the FileName property.
process_start_info& xtd::diagnostics::process_start_info::verb | ( | const xtd::ustring & | value | ) |
Sts the verb to use when opening the application or document specified by the FileName property.
value | The action to take with the file that the process opens. The default is an empty string (""), which signifies no action. |
std::vector<xtd::ustring> xtd::diagnostics::process_start_info::verbs | ( | ) | const |
Gets the set of verbs associated with the type of file specified by the xtd::diagnostics::process_start_info::file_name property.
xtd::diagnostics::process_window_style xtd::diagnostics::process_start_info::window_style | ( | ) | const |
Gets the window state to use when the process is started.
xtd::invalid_enum_argument_exception | The window style is not one of the xtd::diagnostics::process_window_style enumeration members. |
process_start_info& xtd::diagnostics::process_start_info::window_style | ( | xtd::diagnostics::process_window_style | value | ) |
Sets the window state to use when the process is started.
value | One of the enumeration values that indicates whether the process is started in a window that is maximized, minimized, normal (neither maximized nor minimized), or not visible. The default is xtd::diagnostics::process_window_style::normal. |
xtd::invalid_enum_argument_exception | The window style is not one of the xtd::diagnostics::process_window_style enumeration members. |
const xtd::ustring& xtd::diagnostics::process_start_info::working_directory | ( | ) | const |
When the xtd::diagnostics::process_start_info::use_shell_execute property is false, gets or sets the working directory for the process to be started. When xtd::diagnostics::process_start_info::use_shell_execute is true, gets or sets the directory that contains the process to be started.
process_start_info& xtd::diagnostics::process_start_info::working_directory | ( | const xtd::ustring & | value | ) |
When the xtd::diagnostics::process_start_info::use_shell_execute property is false, gets or sets the working directory for the process to be started. When xtd::diagnostics::process_start_info::use_shell_execute is true, gets or sets the directory that contains the process to be started.
value | When xtd::diagnostics::process_start_info::use_shell_execute is true, the fully qualified name of the directory that contains the process to be started. When the xtd::diagnostics::process_start_info::use_shell_execute property is false, the working directory for the process to be started. The default is an empty string (""). |