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.
Nevermind, I figured it out. Open a command prompt and type:
Just type "echo %USERNAME%" into command line.
You can combine to get domain and user in one call.
echo %userdomain% %username%
This definitely isn't the easiest way to find out, it's probably more for the Jackie Chan fans. Install the following:
Then run the following command:
(This command is available in later versions of Windows but you need to install the file above to use it in XP)
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.