How can I alter Event Log properties programmatically in Dot.Net?

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

Guest

Neither the EventLog component in dot net nor the EventLog Class will allow
me to access or alter the "Maximum log size" or to select "Overwrite Events
As Needed". Does anyone know how to do this in dot.net?
 
Hi,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to change the "Maximum log
size" in the Event Log. If there is any misunderstanding, please feel free
to let me know.

Both EventLog class and EventLog component are designed to provide
interaction with Windows event logs. The interactions include add, delete
events and event sources. Changing the Event Log settings are not the
responsibilities for EventLog class in .NET framework.

I think you can use the Event Log Management Script tool (Eventlog.pl) to
manage event logs. Please check the following for more information.

http://support.microsoft.com/default.aspx?scid=kb;en-us;318763

If you need to do this without tool, I suggest you try to post this
question in microsoft.public.dotnet.framework.wmi newsgroup.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top