Environ()

C

Chris

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
 
V

Van T. Dinh

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
 
D

Douglas J. Steele

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.
 
V

Van T. Dinh

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


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top