Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Here is some WMI code that can query the event logs for that same information:
;Eventcode 6005 = The Event log service was started. ;Eventcode 6006 = The Event log service was stopped. objSWbemLocator = GetObject("winmgmts:") objEventSet = objSWbemLocator.ExecQuery("select * from Win32_NTLogEvent where Logfile='System' and EventCode='6005'") if objEventSet.Count == 0 message("Notice","No Events") objEventSet = 0 objSWbemLocator = 0 exit endif foreach LogEvent in objEventSet data = StrCat( "Event Number: ", LogEvent.RecordNumber, @CRLF ) data = StrCat( data, "Log File: ", LogEvent.LogFile, @CRLF ) data = StrCat( data, "Type: " , LogEvent.Type, @CRLF ) data = StrCat( data, "Source: " , LogEvent.SourceName, @CRLF ) data = StrCat( data, "Message: " , LogEvent.Message, @CRLF ) DMTF_date = LogEvent.TimeWritten yr = StrSub(DMTF_date,1,4) mnth = StrSub(DMTF_date,5,2) day = StrSub(DMTF_date,7,2) hr = StrSub(DMTF_date,9,2) mins = StrSub(DMTF_date,11,2) secs = StrSub(DMTF_date,13,2) YMDHMS_date = StrCat(yr,":",mnth,":",day,":",hr,":",mins,":",secs) data = StrCat( data, "Time: " , YMDHMS_date, @CRLF ) data = StrCat( data, "Code: " , LogEvent.EventCode, @CRLF ) Message("Last Logon",StrCat("Event data:",@crlf,@crlf, data )) ;only grab first instance break next objEventSet = 0 objSWbemLocator = 0 Exit
Article ID: W17029
File Created: 2007:07:03:14:27:42
Last Updated: 2007:07:03:14:27:42