Event ID in Event Logs 
Author Message
 Event ID in Event Logs

I am trying to create a script, that will allow me to search event logs for
an event id.
code works fine with security log, but when it gets to system or application
it starts pull out some # for eventid, that make no sence i.e.:
-2147483584 -?
-2147483584 -?
-2147483584-?
-2147483584-?
-1073731819-?
1007, this one is actual # that you can see in event log viewer.
How would I interprite system and application eventids to something
meaningfull?

Thank You
Alexseys

Select Case logID
Case "Security" logonID = "(Security)}"
    logname= "'Security'"
Case "security" logonID = "(Security)}"
    logname = "'Security'"
Case "Application" logonID = "(Backup)}"
    logname = "'Application'"
Case "application" logonID = "(Backup)}"
    logname = "'Application'"
Case "System" logonID = "(Backup)}"
    logname = "'System'"
Case "system" logonID = "(Backup)}"
    logname = "'System'"
Case Else MsgBox "Provide Proper Name for log"
    logname = ""
    Input2
End Select

set LogFileSet1 = GetObject("winmgmts:{impersonationLevel=impersonate," &
logonID)_
.ExecQuery("select * from Win32_NTLogEvent where Logfile=" & logname)
For each Logfile in LogFileSet1
msgbox logfile1 & Logfile.EventIdentifier & vbCrlf



Tue, 15 Jul 2003 03:13:14 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. How to Retrieve Events For One Day From An Event Log on Windows 2000/NT

2. Write events to the event log ?

3. Accesing events in Event Viewer logs

4. Retrieve Events For One Day from an Event Log

5. Logging to system event logs...

6. How-to: Log to NT Event Log

7. Event id within an object - Please help

8. ERROR Event ID 11 on a agent action

9. Script: Event ID Checker

10. Can't run an NT 4.0 VBScript at Startup -- Event ID 1000

11. Windows 2000/NT Event log monitoring

12. System event logs

 

 
Powered by phpBB® Forum Software