EventLog

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How to create a ".evt" like the Evnt viewer by code.
I whan to save in a file the current Evenlog. I know a can do

public static void SaveLog(){
System.Diagnostics.EventLog oLog = new EventLog("Application");
foreach(System.Diagnostics.EventLogEntry oEntry in oLog.Entries){
//oEntry.Message etc.
}
}

but this kind of file cannot be load directly with the event viewer after...

Thanks
 
You could probably just copy the event file in question. The application
log is stored in the %windir%\system32\config directory. Just copy that
to where you want it.

Regards,
Joakim
 
Back
Top