Windows 7 Forums


Windows 7: Event Viewer One Click Clear

19 Sep 2009   #49
Zardoc

 
Event Viewer One Click Clear

How to Clear the Windows 7 Event Viewer with One Click

...


Last edited by Brink; 03 Nov 2011 at 10:12 PM..
My System SpecsSystem Spec

08 Jan 2012   #50
Zardoc

 

Hi Blappy and welcome to the forums.

We're all here to help each other.

My System SpecsSystem Spec

02 Mar 2012   #51
Airbot

 

This still works fine in Win 8 CP just FYI.

My System SpecsSystem Spec
03 Mar 2012   #52
Zardoc

 

Quote   Quote: Originally Posted by Airbot View Post
This still works fine in Win 8 CP just FYI.
Thanks for the heads up Airbot
My System SpecsSystem Spec
04 Mar 2012   #53
RedStar

 

Awesome!!

Zardoc,

Thanks for posting this very useful batch file.
My System SpecsSystem Spec
.


05 Mar 2012   #54
Zardoc

 

Hi Redstar,

Welcome to the forums.

You're welcome
My System SpecsSystem Spec
12 May 2012   #55
Quad5Ny

 

Here's my take on the script.

Code:
@echo off
cls
title Eventing Command Line Utility: Cleanup Script
goto :question

:question
echo.
echo EMPTY ALL WINDOWS AND PROGRAM EVENT LOGS?
echo.
set /p ANSWER=(YES/NO): 
if /i {"%ANSWER%"}=={"y"}   (goto :start)
if /i {"%ANSWER%"}=={"yes"} (goto :start)
if /i {"%ANSWER%"}=={"n"}   (goto :cancel)
if /i {"%ANSWER%"}=={"no"}  (goto :cancel)
goto :input_error

:input_error
cls
echo.
echo          *ERROR: Invalid Option
echo _________________________________________
goto :question

:start
for /f "tokens=*" %%G in ('wevtutil.exe el') do (call :clear "%%G")
goto :finish

:clear
echo Emptying %1
wevtutil.exe cl %1
goto :eof

:finish
cls
echo.
wevtutil.exe cl System
echo.
echo DONE. Press any key to exit.
pause>nul
goto :end

:cancel
cls
echo.
REM USER CANCELED, Quiting Silently...
goto :end

:end
title Command Prompt
cls
@echo on
goto :eof

:eof

Last edited by Quad5Ny; 05 Jun 2012 at 05:34 PM.. Reason: Changed echo off to echo on
My System SpecsSystem Spec
05 Jun 2012   #56
lsrvhayes

 

Very nice indeed! Thank ya
My System SpecsSystem Spec
08 Jul 2012   #57
D3LL

 

Lovely thanks!!
My System SpecsSystem Spec
06 Oct 2012   #58
Gerard48

 
Gerard48

Gentlemen: First of all: Many thanks for this script to clean up Windows 7! As we say here in the Netherlands: It went like a spear. I searched all internet for a script like this, well, it sounds familiar to you I think. I have a question: Our daily computer is Windows 7, but is there also a script to clean up win xp home edition? Because I purchased a beautiful Acer 9800, you know, that 21" laptop that can`t be used on the lap because its weight of about 18 pound , but with a very nice screen for my technical works and drawings. A friend of mine put winxp on it, so that`s why I would like a script to clean it up sometimes. Well, wishing all of you all the best, Gerard, The Netherlands.
My System SpecsSystem Spec
29 Oct 2012   #59
vsrawat

 

That bat file is magical. cleaned all my event logs. I had been searching for days how to clear that custom administrative logs dating back to 2-3 year old entries on my pc. This script did that.

thanks.
--
Rawat
India
My System SpecsSystem Spec
Comment

 Event Viewer One Click Clear problems?



Tutorial Tools



Similar help and support threads for: Event Viewer One Click Clear
Windows 7 Tutorial Category
How To Clear Administrative Events Log - Event Viewer Performance & Maintenance
WHEA-Logger event 18/19 errors in Event Viewer (W7 Home Premium) Hardware & Devices
Event Viewer Error Message Event ID11 - How do I get rid of this to? BSOD Help and Support
Solved Event Viewer Error Message Event ID10 - How to get rid of it? BSOD Help and Support
Event 18 WHEA-Logger Error in Event Viewer Hardware & Devices


All times are GMT -5. The time now is 09:12 PM.



Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd