Solved

Windows 2000 Event Log file structure

Posted on 2001-08-08
1
175 Views
Last Modified: 2013-12-28
Any one know where can i get the Windows 2000 Event Log file structure so that i can write a simple program to read the *.evt files?

Or any recommended tools instead of built-in-dummy Event Viewer?
0
Comment
Question by:chnelson
1 Comment
 
LVL 10

Accepted Solution

by:
Longbow earned 100 total points
ID: 6363609
Hi chnelson,

Already have a job wich does the job.
Put next text to a .vbs file.
It will run if VBScript Engine 5.x (or MSIE5)
 is installed.

You will find stmadmin.dll here :
http://cwashington.netreach.net/main_site/downloads/default.asp?topic=n-z

'Beginning of .vbs file
'Check EventLog and show each record to the screen
'It only work on a local workstation. Better to come later...
'This will work if ie 5.01 is installed and admin.dll
'   registered (VBScript and WSH are needed)
'Type "regsvr32 c:\winnt\system32\stmadmin.dll" in a DOS window

Set EventLog = CreateObject("STMAdmin.EventLog")
EventLog.Open("System")               'System or Application or Security

EventLog.ReportEvent "xxx", 123, "yyy"

List = List & "Number of Records: " & EventLog.NoRecords & VbCrLf
Wscript.Echo List

For Each rec In EventLog.Records(8)
     List = ""                    'Empty previous record
     PrintRecord(rec)
Next

Sub PrintRecord(rec)
     List = List & "EventID: " & rec.EventID & VbCrLf
     List = List & "Source Author: " & rec.SourceName & VbCrLf
     List = List & "Computer Author: " & rec.ComputerName & VbCrLf
     List = List & "Event String: " & rec.Event & VbCrLf
     
     List = List & "Strings: " & VbCrLf
     For Each str In rec.Strings
          List2 = List & " " & str & VbCrLf & VbCrLf
Wscript.Echo List2
     Next
End Sub
'End of .vbs file

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question