Exec.SetEnv
Description
- Set environment variable to provided text. Use the env(...) function in expressions to read environment variables.
Syntax
- Exec.SetEnv(varname, text)
Parameters
- varname
- (string) name of the Windows Environment variable to set
- text
- (string) new value for varname
Examples
- Exec.SetEnv("testEnvVar", "PowerPro is cool")
Win.Debug( env("testEnvVar") )- Creates an environment variable "testEnvVar" & sets it to the string "PowerPro is cool", or resets the variable to that string if it already existed. The variable's value is then debugged.
Notes
- If the Environment variable already exists, any previous value will be overwritten by this function.
See Also
-
PPSR > Built-in Functions > by Category > System > env