Home » Questions » Computers [ Ask a new question ]

How to determine logged on user in Windows XP?

How to determine logged on user in Windows XP?

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 by: Guest | Views: 312
Total answers/comments: 3
bert [Entry]

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

echo %userdomain%
echo %username%"
bert [Entry]

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

echo %userdomain% %username%"
bert [Entry]

"Run Notepad with Administrative Privileges and paste this piece of code into it:

@echo off
echo %computername%\%username%
exit /B

save the document as ""C:\Windows\system32\whoami.bat"" with quotes."
"Run Notepad with Administrative Privileges and paste this piece of code into it:

@echo off
echo %computername%\%username%
exit /B

save the document as ""C:\Windows\system32\whoami.bat"" with quotes."