Solved

Find path to %userprofile%

Posted on 2006-06-13
1
356 Views
Last Modified: 2010-04-07
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.
0
Comment
Question by:jayh99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 13

Accepted Solution

by:
rettiseert earned 25 total points
ID: 16896864
environ("userprofile")
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month6 days, 13 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question