Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specifics of Environ Function?? 1

Status
Not open for further replies.

jgoodman00

Programmer
Jan 23, 2001
1,510
Does anyone know of anywhere that I can find a complete listing of the possible envstring parameters. The MSDN library simple states this can be used to return a string associated with 'an operating system environment variable', but it does not say what envstring needs to be in order to return these strings. I currently know of two; "UserName" & "WinDir", but would like to know what other information is attainable through this function......

James Goodman
j.goodman00@btinternet.com
 
It's easy to display the environment in a list box:
[tt]
List1.Clear
Do
Tmp$ = Environ(List1.ListCount + 1)
If Tmp$ = "" Then Exit Do
List1.AddItem Tmp$
Loop
[/tt]
A complete listing of all the possible environment variables is quite unlikely. The items populating the list box will be representative of the environment variables you will find on similar machines (you will probably find more items on an NT server than you will find on a typical Win9x box).

VCA.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top