What's the easiest way to determine the logged on user in Windows XP (without loading any support tools)? I'm looking for something similar to the 'whoami' command but for Windows. I need something that'll display the domain and username.
Asked
Active
Viewed 9.4k times
6 Answers
10
You can combine to get domain and user in one call.
echo %userdomain% %username%
Mike Chess
- 6,973
7
This definitely isn't the easiest way to find out, it's probably more for the Jackie Chan fans. Install the following:
Windows XP Service Pack 2 Support Tools
Then run the following command:
whoami
(This command is available in later versions of Windows but you need to install the file above to use it in XP)
Richard Lucas
- 2,830
3
If you go to a command prompt and type set, you get a wealth of information. If note is the homepath variable. In an older machine that may or may not have had the profiles remapped, it tells you the current path in use.
There is also a lot of other information, including username and domain.
These are all system variables that can be individually "Echoed" as suggested above.
Indrek
- 24,874
Andy Coyle
- 41
