I am really need a help please
i need to make two batch files between my network
i need batch files make this jobs
if one of the network open the batch and logged on with "user+pass"
display his name on other users on the network who have the batch file
for example i have the batch and my friend as well have it
if he ran the batch and logged on
i need message tell me for example "Michael Online"
Thanks
Ok...I don't think you can make a user log in, as I'm fairly sure that batch files get executed after they log in...but, you could do this.
@echo off
set log=Shared folder path\log.txt
for /f "tokens=1-2 delims=: " %%A in ("%time%") do set tme=%%A^:%%B
echo %username% has logged in at %tme%. >> "%log%"
exit
And one to check to see if he logged in,
@echo off
:loop
cls
type "Shared folder path\log.txt"
ping localhost -n 2 > nul
goto loop
If you put the first one in the startup script, you will always know when someone logs in.