Backup EventLog

HostMike

Newcomer
Joined
Jul 1, 2003
Messages
10
Anyone have any code that backup the eventlog entries and their associated data? I was trying to code something myself using MSDN for reference however I cannot get Eventlog.entries() to work for me. It gives me some error about formatting using library(IES)...i dunno. Let me know if anyone has any ideas.
 
This will make you loop trough every eventlog entries.

Visual Basic:
Dim A, B As Integer

		Dim Events() As EventLog
		Events = EventLog.GetEventLogs()

		For A = 0 To Events.Length - 1
			For B = 0 To Events(A).Entries.Count - 1
				Debug.WriteLine(Events(A).LogDisplayName & ": " & Events(A).Entries(B).Message)
			Next
		Next

You might want to change the debug.writeline with something else like writing them to a file.
 
Worked

That works nicely, got everything backing up nicely. I think it needs a better interface though, do you know any tutorials where I can find out how to make windows.
 
Back
Top