View RSS Feed

FN-GM

Script to Record Computer Usage

Rate this Entry
by , 9th May 2012 at 09:19 AM (5689 Views)
Hi,

Just thought these scripts would be handy. It will dump logon details to a text file.

You will need to create a share with a folder called Computers & one called users. Your users will need permissions to write to the folder.

These are the 2 script. You will need to make one a log on script and one a log off. You will need to modify the location of your share. They are both .bat format

Logon Script

Code:
rem The following line creates a rolling log file of usage by workstation
echo Log In %Date% %TIME% %USERNAME% >> \\server\share\Computers\%COMPUTERNAME%.log

rem The following line creates a rolling log file of usage by user
echo Log In %Date% %TIME% %COMPUTERNAME% >> \\server\share\users\%USERNAME%.log
Log Off Script

Code:
rem The following line creates a rolling log file of usage by workstation
echo Log Off %Date% %TIME% %USERNAME% >> \\server\share\Computers\%COMPUTERNAME%.log

rem The following line creates a rolling log file of usage by user
echo Log Off %Date% %TIME% %COMPUTERNAME% >> \\server\share\users\%USERNAME%.log
Categories
Uncategorized

Comments

  1. browolf's Avatar
    mine is similar to that but we don't bother with log-off script.

Trackbacks

Total Trackbacks 0
Trackback URL: