Batch file to show who is logged in

Dell / Inspiron 9100...
September 11, 2011 at 18:06:12
Specs: Windows XP, 3.192 GHz / 1023 MB
i want to make a batch file that can show what Windows XP users are logged on and also show which ones aren't, like this example-
Users:
BatchCoder
BatchCoder1

it would display it like this
-----------------------------------------------
| BatchCoder-Logged on |
| BatchCoder1-Logged out |
-----------------------------------------------

or something like that, is this possible to do in batch on windows xp.


See More: Batch file to show who is logged in

Report •


#1
September 11, 2011 at 23:23:19
psloggedon, from the Pstools can determine when a user is logged on the local or remote machine. Even if two different users are logged in, it shows both logged in date & time.

Regards,

Happy is ONE who says I am an OttoMAN.


Report •

#2
September 12, 2011 at 07:17:46
i dont wanna use any third party stuff. i want it so that some can just put the batch on a flash drive and plug it into any computer thats running windows xp and it shows them who is logged in and who isnt.

If you can't play youtube (320p) on newer computers, then you know you got ripped off


Report •

#3
September 12, 2011 at 07:54:53
Hmm,

Since only one user can log in at the same time..

Try built in variable %username%

Happy is ONE who says I am an OttoMAN.


Report •

Related Solutions

#4
September 12, 2011 at 10:26:22
i already tried that and it only shows the username for the current user, i wanted some type of code or something that would list all users and.... *bangs head on wall* think i just though of one...

echo currently logged in user %username%
echo other users
net user

that would output like this
currently logged in user BatchCoder
other users
------------------------------------------------------------------------------------------------------------------------
Aministrator Guest Help Assistant
SUPPORT_"random numbers" BatchCoder


so i guess that could work right? but... only thing is i use another code in this batch file that uses the %username% command but i have a vairable and value assigned to it so it wouldnt show my user name which is BatchCoder it would to assigned one which is BatchCoderCLS which i dont want. its getting info from a code at the begining of the batch file? how cna i stop this do i just change the code so that instead of %username% it says %username1% so that when i type %username% it puts BatchCoder? or would that not work? im confused

If you can't play youtube (320p) on newer computers, then you know you got ripped off


Report •

#5
September 12, 2011 at 12:39:05
On your server run:

net session

You could also use:

finger @10.10.10.10

or whatever your server is but most systems are setup to block finger because hackers use it to determine what available users there are on the network.


Report •


Ask Question