I need to change the parameters of the Windows Event Log from a C++ code, and namely what is available via the System.Diagnostics.EventLog class in C#. I need to read and later possibly modify the following properties:
Asked
Active
Viewed 286 times
2 Answers
1
You can write the setting to the registry
MaximumKilobytes->MaxSize
OverflowAction&MinimumRetentionDays->Retention

Sheng Jiang 蒋晟
- 15,125
- 2
- 28
- 46
-
Thanks. It will do what I need. One question though. To change 'MaxSize' and 'Retention' values for the "Application" branch, all I need is to write them into the 'HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Application' registry key, right? Do they take effect immediately? – ahmd0 Nov 11 '12 at 02:27
0
You can do that by getting and setting values in the registry. Microsoft has pretty detailed documentation on this one. You would be interested in MaxSize
and Retention
values.

detunized
- 15,059
- 3
- 48
- 64