Find path to %userprofile%
Posted on 2006-06-13
Can someone help me find a way to view the full path to the currently logged in user profile? (i.e. %userprofile% from cmd line). This is not the same as "C:\Documents and Settings\" & username because I have a couple of machines that weren't in a domain at one time, and are now. And when you join a domain, you receive a new profile, it puts .domainname at the end of your profile. (what would be administrator becomes administrator.domain & both profiles exist) So currently, my user profile path is "C:\Documents and Settings\Administrator.INTRANET" . Thanks in advance for the assistance. Right now, I am looking for all the folders containing my username, and finding the most recently created one, but I would prefer a better way to do it if possible.