A couple of nice goodies can be found in the environment variables on a Terminal Server. For instance:
CLIENTNAME = *Name of the currently connected computer*
HOMEPATH = *The current user's home directory*
SystemRoot = *Obvious*
TEMP = *The user's temp directory*
USERNAME = *Obvious*
SESSIONNAME = *The name of the current session ex. "RDP-Tcp#233"*
You can get at them using
System.Environment.ExpandEnvironmentVariable("%VarName%")
where VarName = the variable you want
Lew Parker
EarthVectors Inc.
CLIENTNAME = *Name of the currently connected computer*
HOMEPATH = *The current user's home directory*
SystemRoot = *Obvious*
TEMP = *The user's temp directory*
USERNAME = *Obvious*
SESSIONNAME = *The name of the current session ex. "RDP-Tcp#233"*
You can get at them using
System.Environment.ExpandEnvironmentVariable("%VarName%")
where VarName = the variable you want
Lew Parker
EarthVectors Inc.