Skip to content

Environment

Stef Heyenrath edited this page Nov 5, 2022 · 2 revisions

Custom Environment Helpers

These helpers can get the values from user and system environment variables.


GetEnvironmentVariable

Summary Retrieves the value of an environment variable from the current process for the current user or local machine.
Returns The value of the environment variable specified by the variable and target parameters, or null if the environment variable is not found.
Remarks
Parameters
variable The name of an environment variable.
target EnvironmentVariableTarget (Process, User or Machine). This is optional.

Example

Usage

"{{GetEnvironmentVariable \"x\" \"User\"}}"

Returns

testabc

GetEnvironmentVariables

Summary Retrieves all environment variable names and their values from the current process, or from the Windows operating system registry key for the current user or local machine.
Returns A dictionary that contains all environment variable names and their values from the source specified by the target parameter; otherwise, an empty dictionary if no environment variables are found.
Remarks
Parameters
variable The name of an environment variable.
target EnvironmentVariableTarget (Process, User or Machine). This is optional.
Clone this wiki locally