Solved

Find path to %userprofile%

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now