Click to See Complete Forum and Search --> : Environmental Variable


visual fzz
December 3rd, 1999, 02:54 AM
Hi everybody

I want to get the value of an environmental variable (TEMP)

on the dos prompt, if you enter "c:\set temp" you see TEMP=c:\TEMP

How can you get the result of a prompt action ( here c:\temp)???

Generally spoken, how can i get the value of a system variable without passing by the registry?

thanx
Fzz

Chris Eastwood
December 3rd, 1999, 03:42 AM
Use VB's built in 'Environ' routines, eg:


MsgBox Environ$("TEMP")
MsgBox Environ$("PATH")





Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb