ICC Home / Members / Meetings / Peer Support / Documentation / Projects
Procedures for |
IntroductionThere has been some discussion about ways to attribute users to machines. LogonLog.vbsSet objNetwork = CreateObject("Wscript.Network") Set objConnection = CreateObject("ADODB.Connection") objConnection.CommandTimeout=5 objConnection.Open "Driver={SQL Server};Server=IF-SRV-SQL02.AD.UFL.EDU;Database=AD-APPS" objConnection.Execute "INSERT INTO UsageLog (Username, Computer, Time, Action) VALUES ('" & objNetwork.ComputerName & "', '" & objNetwork.Username & "', '" & Now() & "', 'Logon')" LogoffLog.vbsSet objNetwork = CreateObject("Wscript.Network") Set objConnection = CreateObject("ADODB.Connection") objConnection.CommandTimeout=5 objConnection.Open "Driver={SQL Server};Server=IF-SRV-SQL02.AD.UFL.EDU;Database=AD-APPS" objConnection.Execute "INSERT INTO UsageLog (Username, Computer, Time, Action) VALUES ('" & objNetwork.ComputerName & "', '" & objNetwork.Username & "', '" & Now() & "', 'Logoff')" Output stored in SQL1 IF-99SVG41 hughescj 4/21/2006 5:21:06 PM Logon 2 IF-99SVG41 hughescj 4/21/2006 5:23:08 PM Logoff 3 IF-99SVG41 hughescj 4/21/2006 5:26:39 PM Logon 4 IF-99SVG41 hughescj 4/21/2006 5:26:42 PM Logoff |
last edited 25 April 2006 by Steve Lasley