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

Get current users profile path 2

Status
Not open for further replies.

bakerm

Programmer
Apr 25, 2000
53
US
How can you get the currently logged on users' profile path?

I need to get something like the following:

C:\Documents and Settings\User

Thanks in advance for any help.
 
A starting point:
Set WshShell = CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("PROCESS")
MsgBox WshSysEnv("HOMEPATH")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
OOps, sorry for the typo:
MsgBox WshSysEnv("USERPROFILE")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
It's an old post, but found what I was looking for. Here's a star for you, PHV!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top