I know how to empty event log on windows XP, and then I have a script which cleans the numerous Windows 7 log categories. The windows 7 script looks like this:

wevtutil.exe cl Analytic

wevtutil.exe cl Application

wevtutil.exe cl DirectShowFilterGraph

wevtutil.exe cl DirectShowPluginControl

wevtutil.exe cl EndpointMapper

wevtutil.exe cl ForwardedEvents

wevtutil.exe cl HardwareEvents

wevtutil.exe cl Internet Explorer

wevtutil.exe cl Key Management Service

wevtutil.exe cl MF_MediaFoundationDeviceProxy


But the script receives access denied under windows 8 (even with Administrator account).

1- Is there a better method tho empty Windows 8 log? Or is there any way to make the script work again?

2- How is it possible to increase the event log file size in Windows 8?


  • Run the cmd as admin (windows.microsoft.com/en-US/windows7/…). – magicandre1981 Mar 23 '13 at 7:07
  • Thanks. You are right. I guess in Windows 7 I had set the script to always run as administrator but forgot to do the same on Windows 8. – wmac Mar 24 '13 at 4:44
  • moving the slider in the UAC panel to the button doesn't disable the uAC in Win8. Maybe this was your issue. – magicandre1981 Mar 24 '13 at 5:52

1) I've been using the same batch file script since Vista, and it still works fine under 8. It's similar to yours, but does ALL the logs regardless of their name:

for /f %%a in ( .\LOGLIST.TXT ) do WEVTUTIL CL %%a

You will have to right-click the batch file and run it elevated ("as administrator").

2) You can enlarge individual logs by right-clicking them in Event Viewer and editing the Properties:

enter image description here

  • Thanks for the short script. Yes, I guess I did not run the script as administrator. – wmac Mar 24 '13 at 4:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.