Jump to content

Recommended Posts

Posted

Hi , Im using event viewer to track user logon times, and then developing a database application to analyse the data, is there a way of identifying the machine ID at the same time ?

 

REgards Jonathan

Posted (edited)

wouldnt something like

 

echo -------Log user access to Machine-------
set mytime=%TIME:~0,-3%
echo %username%,%computername%,%mytime%,%date% >> \\server\log$\userlog.txt

be easier just dumps the info a csv file on the server just add it to logon scripts and if you want logoff as well same with logoff (though id be tempted to add logon and logoff to the scripts

Edited by sted
  • Thanks 1
Posted
A second vote for sted's suggestion. We use the same system but to make things more manageable (and to avoid having one huge log file) we have seperate log files for each computer and user and have the script write to both the computer log and the user log at each logon.
Posted
If you're going to try and build it from the Event Log, have a look at logparser.exe one of the Microsoft tools - you already have the database in the form of the Event Log, you just need a tool to query it :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...