Environ

This function returns the environment variables (operating system variables set with the SET command). To access an environment variable, use a numeric index or the variable's name. If you access the environment variables by index, as in

Conso1e.WriteLine(Environ(2))

you'll get a string that contains both the name of the environment variable and its value, such as:

TMP=C:\WINDOWS\TEMP

To retrieve only the value of the TMP environment variable, use the expression Conso1e.WriteLine(Environ("TMP")) and the function will return the value: C:\WINDOWS\TEMP

If you specify a nonexistent environment variable name, a zero-length string ("") is returned.

0 0

Post a comment