Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

Thanks.

share|improve this question
    
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 Answer 1

up vote 1 down vote accepted

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:

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

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

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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