Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Windows 2000 Event Log file structure

Posted on 2001-08-08
1
174 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

Title # Comments Views Activity
Problem to App source 6 70
Windows 10 disk usage 100%. 28 173
Reset server 2008 R2 default permissions 2 22
Malware infection with local user rights? 6 27
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

840 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