sLiDeR Posted December 4, 2007 Posted December 4, 2007 Anyone have any tips how I can get a list of logged on users for a particular workstation on a particular day?? Much appreciated.
SpuffMonkey Posted December 4, 2007 Posted December 4, 2007 We wrote our own little application. Quite useful.
sahmeepee Posted December 4, 2007 Posted December 4, 2007 We wrote our own little application. Quite useful. Ditto - hard to imagine life without it now.
K.C.Leblanc Posted December 4, 2007 Posted December 4, 2007 adding echo %username% %time% %date% >> c:\userlog.txt to your logon script would do it.
ChrisH Posted December 4, 2007 Posted December 4, 2007 AB Tutor could do this for you. I started this last week with the newer version of AB tutor. You can have a log policy that teachers cant remove. Great addition.
cookie_monster Posted December 4, 2007 Posted December 4, 2007 If you have office on your stations then you can use the script below it uses JET so you need access installed or you can probably install JET seperatly (not sure about that). Set it to run at logon and it puts all the info into an access Db. On Error Resume Next Dim adoCn Dim adoRs Dim network Dim user Dim compname Dim strSQLInsert Set network = CreateObject("Wscript.Network") user = network.username compname = network.computername Set adoCn = CreateObject("ADODB.Connection") adoCn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=\\server\logs$\logs.mdb" 'CHANGE THIS BIT 'Check the connection opened ok If Err.Number <> 0 Then Call ErrHandler End If strSQLInsert = "INSERT INTO [Log On] ([date], [time], [user], compname) " & _ "VALUES ('" & Date & "', '" & Time & "', '" & user & "', '" & compname & "')" adoCn.Execute strSQLInsert, , 8 'Check the data was inserted OK If Err.Number <> 0 Then Call ErrHandler End If adoCn.Close Set adoCn = Nothing Set network = Nothing Sub ErrHandler() Dim fso, f Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("\\server\logs$\" & LogError & ".txt" , ForAppending, True) f.WriteLine Date & ", " & Time & ", " & user & ", " & compname & ", " & Chr(34) & Err.Description & Chr(34) f.Close Set fso = nothing Err.Clear End Sub
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now