By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,300 Members | 2,044 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,300 IT Pros & Developers. It's quick & easy.

EventLog

P: n/a
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
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

Franky wrote:
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

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.