Writes a value to the specified environment variable.
EnvSet EnvVar , Value
Type: String
The name of the environment variable, e.g. "Path"
.
Type: String
If omitted, the environment variable will be deleted. Otherwise, specify the value to write.
An OSError is thrown on failure.
The operating system limits each environment variable to 32 KB of text.
An environment variable created or changed with this function will be accessible only to programs the script launches via Run or RunWait. See environment variables for more details.
This function exists because normal script variables are not stored in the environment. This is because performance would be worse and also because the OS limits environment variables to 32 KB.