xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
process_start_info.h
Go to the documentation of this file.
1 #pragma once
5 #include <filesystem>
6 #include <map>
7 #include <memory>
8 #include <string>
9 #include <vector>
10 #include "../core_export.h"
11 #include "../object.h"
12 #include "../security/secure_string.h"
13 #include "process_window_style.h"
14 
16 namespace xtd {
18  namespace diagnostics {
31  class core_export_ process_start_info final : public object {
32  public:
36  process_start_info() = default;
37 
42  explicit process_start_info(const xtd::ustring& file_name);
43 
49  process_start_info(const xtd::ustring& file_name, const xtd::ustring& arguments);
50 
53  process_start_info& operator=(const process_start_info&) = default;
55 
58  const xtd::ustring& arguments() const;
62  process_start_info& arguments(const xtd::ustring& value);
63 
67  bool create_no_window() const;
72  process_start_info& create_no_window(bool value);
73 
76  const xtd::ustring& domain() const;
80  process_start_info& domain(const xtd::ustring& value);
81 
86  const std::map<xtd::ustring, xtd::ustring>& environment() const;
91  std::map<xtd::ustring, xtd::ustring>& environment();
92 
96  const std::map<xtd::ustring, xtd::ustring>& environment_variables() const;
100  std::map<xtd::ustring, xtd::ustring>& environment_variables();
101 
105  bool error_dialog() const;
110  process_start_info& error_dialog(bool value);
111 
115  intptr_t error_dialog_parent_handle() const;
120  process_start_info& error_dialog_parent_handle(intptr_t value);
121 
126  const xtd::ustring& file_name() const;
132  process_start_info& file_name(const xtd::ustring& value);
138  process_start_info& file_name(const std::filesystem::path& value);
140  process_start_info& file_name(const char* value);
142 
147  bool load_user_profile() const;
153  process_start_info& load_user_profile(bool value);
154 
162  const xtd::security::secure_string& password() const;
171  process_start_info& password(const xtd::security::secure_string& value);
172 
175  xtd::ustring password_in_clear_text() const;
179  process_start_info& password_in_clear_text(const xtd::ustring& value);
180 
288  bool redirect_standard_error() const;
397  process_start_info& redirect_standard_error(bool value);
398 
461  bool redirect_standard_input() const;
525  process_start_info& redirect_standard_input(bool value);
526 
649  bool redirect_standard_output() const;
773  process_start_info& redirect_standard_output(bool value);
774 
780  const xtd::ustring& user_name() const;
787  process_start_info& user_name(const xtd::ustring& value);
788 
797  bool use_shell_execute() const;
807  process_start_info& use_shell_execute(bool value);
808 
813  xtd::ustring verb() const;
819  process_start_info& verb(const xtd::ustring& value);
820 
825  std::vector<xtd::ustring> verbs() const;
826 
830  xtd::diagnostics::process_window_style window_style() const;
835  process_start_info& window_style(xtd::diagnostics::process_window_style value);
836 
845  const xtd::ustring& working_directory() const;
855  process_start_info& working_directory(const xtd::ustring& value);
856 
857  private:
858  xtd::ustring file_name_;
859  xtd::ustring arguments_;
860  bool create_no_window_ = false;
861  xtd::ustring domain_;
862  bool error_dialog_ = false;
863  intptr_t error_dialog_parent_handle_ = 0;
864  std::map<xtd::ustring, xtd::ustring> environment_variables_;
865  bool load_user_profile_ = false;
867  bool redirect_standard_error_ = false;
868  bool redirect_standard_input_ = false;
869  bool redirect_standard_output_ = false;
870  xtd::ustring user_name_;
871  bool use_shell_execute_ = true;
872  xtd::ustring verb_;
874  xtd::ustring working_directory_;
875  };
876  }
877 }
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Contains xtd::diagnostics::process_window_style enum class.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
Specifies that the process has no special scheduling needs.
process_window_style
Specified how a new window should appear when the system starts a process.
Definition: process_window_style.h:17
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:26
Represents text that should be kept confidential, such as by deleting it from computer memory when no...
Definition: secure_string.h:18
The environment class.
Definition: environment.h:33
Specifies a set of values that are used when you start a process.
Definition: process_start_info.h:31