Oct 10, 2006 #1 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.
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.
Oct 10, 2006 2 #2 PHV MIS Nov 8, 2002 53,708 FR 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 Upvote 0 Downvote
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
Oct 10, 2006 #3 PHV MIS Nov 8, 2002 53,708 FR 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 Upvote 0 Downvote
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
Oct 10, 2006 Thread starter #4 bakerm Programmer Apr 25, 2000 53 US Thx! Works perfect. Upvote 0 Downvote
Dec 1, 2006 #5 monsterjta IS-IT--Management Sep 12, 2005 702 US It's an old post, but found what I was looking for. Here's a star for you, PHV! Upvote 0 Downvote