attached to an all-users GPO. Just change the Data folder location. It writes a "User" and a "Computer" file with the same information. I also use a similar script for the logout but targeted to a different location. Use an Admin $ share and the users will never know that we know when they REALLY started work...
[pre]
Const ForAppending = 8
Dim sDatafolder, oNetwork, oFSO, sUserName, sComputerName
' Set environment
sDataFolder = "User Logon data file share"
' Get Session objects
Set oNetwork = CreateObject("WScript.Network")
Set oFSO = CreateObject("Scripting.FileSystemObject")
' Get basic user info
sUserName = oNetwork.UserName
sComputerName = oNetwork.ComputerName
' Write workstation file
LogData sDataFolder & sComputerName & ".log"
' Write user log file
LogData sDataFolder & sUserName & ".log"
' Tidy up and exit
Set oNetwork = Nothing
Set oFSO = Nothing
wscript.Quit(0)
' -----------------------------
' Subs and Functions
Sub LogData(sFileName)
' Open file (create if needed), append new data and close
Dim oDatafile
Set oDataFile = oFSO.OpenTextFile(sFileName, ForAppending, True)
oDataFile.WriteLine FormatDateTime(date,vbShortDate) & _
vbTab & FormatDateTime(time,vbShortTime) & _
vbTab & sComputerName & vbTab & sUserName
oDataFile.Close
Set oDataFile = Nothing
End Sub
[/pre]