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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read envrionment variable 1

Status
Not open for further replies.

dan

MIS
Oct 7, 1998
298
US
I am trying to locate the full path to a file that I wrote to %TEMP%.\ directory using a DOS batch file. How can I read this DOS environment variable from within a VB Program?


Dan
 
You can use Environ$("EnironmentVariableName")

e.g.
Code:
strPath = Environ$("Temp")
Regards

Daren


Must think of a witty signature
 
Thanks. I knew it was simple. Just didn't know the syntax.

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top