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. The Valid Environment strings are ALLUSERSPROFILE APPDATA CI_HOLOS_CLI CLIENTNAME CommonProgramFiles COMPUTERNAME ComSpec FP_NO_HOST_CHECK HOMEDRIVE HOMEPATH include JAVA_HOME lib LOGONSERVER MSDevDir NUMBER_OF_PROCESSORS OS Path PATHEXT PROCESSOR_ARCHITECTURE PROCESSOR_IDENTIFIER PROCESSOR_LEVEL PROCESSOR_REVISION ProgramFiles SESSIONNAME SystemDrive SystemRoot TEMP TMP USERDNSDOMAIN USERDOMAIN USERNAME USERPROFILE windir The following code will help you get all the Environment variables on your system Code: Dim i as Integer Text1.Text = "" i = 1 While Environ$(i) <> "" Text1.Text = Text1.Text + Mid(Environ$(i), 1, InStr(1, Environ(i), "=") - 1) + vbNewLine i = i + 1 Wend