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

Get environment variable 1

Status
Not open for further replies.

sn0rg

IS-IT--Management
Aug 5, 2005
95
GB
I'm trying to get the location of "TMP=" via vbs for the user executing the script.

Any ideas?
 
A starting point:
Set S = CreateObject("WScript.Shell")
Set E = S.Environment
WScript.Echo E("TMP")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks!
Exactly what I'm after - now, (bear in mind its early in the morning here....) how do I convert that to a real path?
 
Set E = S.Environment("PROCESS")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Cheers PHV - got exaclty what I'm after now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top