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
Solved

Find path to %userprofile%

Posted on 2006-06-13
1
353 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
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

Suggested Solutions

Title # Comments Views Activity
VB 6.0 printer how to align 6 66
Create Files based on Cell Values in a Range in Excel 12 43
RUNRMTCMD from AS/400 12 68
backup program with robocopy 6 42
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

792 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