Quote:

If you want to know who is logged on to the machine, why not just enumerate your local processes?

If you ignore all the daemon process owners what's left will be the user(s).

If you run full desktops it's even easier - you just need to look for any "explorer.exe" processes.




I like that idea. So pardon the question, but what is the best way to enumerate all explorer.exe's and grab the user? I've done a search and see an example using cmdow.exe but I;d like to avoid any outside executibles if I can.

tasklist /FI would work, but I dont get the user name on that.