up vote 6 down vote favorite
1
share [g+] share [fb]

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.

link|improve this question

feedback

4 Answers

Just type "echo %USERNAME%" into command line.

link|improve this answer
Damn, few second. :D – sYnfo Oct 13 '09 at 19:41
You deserve a +1 anyway ;-) – Ivo Flipse Oct 13 '09 at 19:43
2  
I stated in the question that I was looking for something that included the domain as well as the username. – Mark Oct 14 '09 at 15:52
feedback
up vote 4 down vote accepted

Nevermind, I figured it out. Open a command prompt and type:

echo %userdomain%

echo %username%

link|improve this answer
feedback

You can combine to get domain and user in one call.

echo %userdomain% %username%
link|improve this answer
feedback

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)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.