To spare you some time looking I have compiled a list of the environment variables that you can use with the function <b>environment_get_variable(name)</b>. Each bold text is valid as an argument and will return something similar to the examples below them.
<b>SystemDrive </b>
C:
<b>SystemRoot </b>
C:\WINNT
C:\WINDOWS
<b>SystemDirectory</b>
C:\WINNT\System32
C:\WINDOWS\System32
<b>WinDir </b>
C:\WINNT
C:\WINDOWS
C:\WINNT\Program Files
<b>ComSpec </b>
C:\WINNT\system32\cmd.exe
<b>Temp</b>
C:\DOCUME~1\Usr\LOCALS~1\Temp from
C:\Documents and Settings\Usr\Local Settings\Temp
<b>HOMEDRIVE </b>
C: The drive letter associated with the user's home directory
<b>HOMEPATH</b>
The path to the user's home directory (excluding drive):
\Documents and Settings\Guest
<b>OS </b>
Windows_NT
The operating system the user is running
<b>USERDOMAIN</b>
The name of the domain that contains the user's account
<b>USERNAME</b>
The user's name
Example call (will return the name of the logged on user):
environment_get_variable(“USERNAME”)
.
Users logged in:
Comments
Loading comments...