|
-
August 18th, 2001, 03:40 AM
#1
Environ variables
can someone give me a list of all the environ varibles and what information a can get from them?
Thanks in advance for any reply.
-
August 19th, 2001, 03:55 PM
#2
Re: Environ variables
Dim EnvString, Indx, Msg' Declare variables.
Indx = 1 ' Initialize index to 1.
Do
EnvString = Environ(Indx) ' Get environment
' variable.
IF EnvString >"" THEN MsgBox EnvString'
Indx = Indx + 1
Loop Until EnvString = ""
-
August 20th, 2001, 07:11 AM
#3
Re: Environ variables
Code: Environ("<Param>")
Returns a string, where <Param> can be any of the following:
ALLUSERSPROFILE
APPDATA
CommonProgramFiles
COMPUTERNAME
ComSpec
HOMEDRIVE
HOMEPATH
LOGONSERVER
NUMBER_OF_PROCESSORS
OS
Os2LibPath
Path
PATHEXT
PROCESSOR_ARCHITECTURE
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
ProgramFiles
SystemDrive
SystemRoot
TEMP
TMP
USERDOMAIN
USERNAME
USERPROFILE
windir
If you wish to dump all of the environment variables, this simple piece
of code will work:
For i = 1 To 26
Debug.Print Environ(i) & vbCrLf
Next i
Iouri Boutchkine
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|