Retrieves the value of an environment variable from the current process or from the Windows operating system registry key for the current user or local machine.
- Parameters
-
variable | The name of an environment variable. |
target | One of the EnvironmentVariableTarget values. |
- Exceptions
-
std::invalid_argument | target is not a valid environment_variable_target value. |
- Returns
- xtd::ustring The value of the environment variable specified by the variable and target parameters, or empty "" if the environment variable is not found.
- Todo:
- Add xtd::registry and uncomment lines.