I have made a login script that will put the login and logoff times into a users script when they login or logoff. It stores this information in a file. If you think that will help please let me know and ill give it to you.
I placed it up here a few days ago. thread96-733100 here is the main part again.
Here is part of my bat script. You have to have a shared drive for place the logs in. I have a shared drive called Loginlog$ (the $ means that the drive is a hidden share). The user logs are kept in a folder called “User Log” in the log share. The log is created with the users name by using %username%. The echo line then places the date, time and computername into the log file that is named for the user logging in. The resulting line in the file looks like this logging in to a computer named C35: Mon 11/17/2003 13:29:08.17 C35
:: this records where a user has logged to what pc and at what time.
set logfile="\\servername\Loginlog$\User Log\%username%.txt"
echo %date% %time% %computername% >> %logfile%
Now this one records the PC log for who logged into that particular PC. I have it stored in the loginlog share under the folder “Computer Log”. The file in that drive will be called whatever the computer is called by using %computername%. And the rest of the script is like above except it puts the username of who logged in. The line in the file looks like this for user Ryan logging into a computer: Thu 11/20/2003 16:58:53.77 Ryan
:: this records where who logged into a PC and at what time.
set logfile="\\servername\Loginlog$\Computer Log\%computername%.txt"
echo %date% %time% %username% >> %logfile%
So let me know it this is any help to you and if you have questions i will be glad to answer them.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.