Environ()

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone have a list of things that can be found in the Operating System "string-table" for this function. So far I know that "USERNAME" and "COMPUTERNAME" can be returned by this function, but I'm having trouble finding out what else is
available?

Thanks
 
Unfortunately, AFAIK, this depends on what is stored in the Registry. For
example, on my PC, the following works:

PATH
TEMP
TMP

I am sure there are some more but whether anything is returned depends on
the settings on each computer. Also, check the Config.sys and Autoexec.bat.

--
HTH
Van T. Dinh
MVP (Access)




Chris said:
Does anyone have a list of things that can be found in the Operating
System "string-table" for this function. So far I know that "USERNAME" and
"COMPUTERNAME" can be returned by this function, but I'm having trouble
finding out what else is
 
Go to the Control Panel and click on the System icon. At the bottom of the
Advanced tab, there's a button labelled "Environment Variables". Click on
it, and it'll show all of the variables defined.

Chris: Just a word of caution. Environment variables can be reset relatively
easily, so it's generally not considered to be a good idea to rely on them
for anything, especially for things like Username and Computername. The API
calls are far more reliable. See http://www.mvps.org/access/api/api0008.htm
and http://www.mvps.org/access/api/api0009.htm at "The Access Web" for the
code for those two values.
 
Thanks,Doug

Cheers
Van


-----Original Message-----
Go to the Control Panel and click on the System icon. At the bottom of the
Advanced tab, there's a button labelled "Environment Variables". Click on
it, and it'll show all of the variables defined.

Chris: Just a word of caution. Environment variables can be reset relatively
easily, so it's generally not considered to be a good idea to rely on them
for anything, especially for things like Username and Computername. The API
calls are far more reliable. See http://www.mvps.org/access/api/api0008.htm
and http://www.mvps.org/access/api/api0009.htm at "The Access Web" for the
code for those two values.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Config.sys and
Autoexec.bat. that "USERNAME"
and


.
 
Back
Top