Windows Environment Variables in VB

Visual Basic 6 provides a function called Environ through which you can get all the environment variables available. It takes string parameter which is name of the Environment variable and returns its value.