Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.



Windows 7: Event Viewer One Click Clear

19 Sep 2009   #49
Zardoc

Windows 7 x64 Ultimate SP1
 
 
Event Viewer One Click Clear

How to Clear Event Viewer with One Click in Windows


...

My System SpecsSystem Spec
.

08 Jan 2012   #50
Zardoc

Windows 7 x64 Ultimate SP1
 
 

Hi Blappy and welcome to the forums.

We're all here to help each other.



My System SpecsSystem Spec
.

02 Mar 2012   #51
Airbot

Windows 7 Ultimate x64 SP1
 
 

This still works fine in Win 8 CP just FYI.
My System SpecsSystem Spec
03 Mar 2012   #52
Zardoc

Windows 7 x64 Ultimate SP1
 
 

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

Windows 7 Home Premium 64 bit, Windows 7 Professional 64 bit
 
 

Awesome!!

Zardoc,

Thanks for posting this very useful batch file.
My System SpecsSystem Spec
05 Mar 2012   #54
Zardoc

Windows 7 x64 Ultimate SP1
 
 

Hi Redstar,

Welcome to the forums.

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

Windows 7 Professional x64 SP1
 
 

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
My System SpecsSystem Spec
05 Jun 2012   #56
lsrvhayes

Windows 7 Professional 64bit
 
 

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

Windows 7
 
 

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

win 7 64 bit
 
 
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

Windows 7 Ultimate x86/x64 dual boot
 
 

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





Tutorial Tools



Similar help and support threads for2: Event Viewer One Click Clear
Windows 7 Tutorial Category
In Event Viewer, Where is event log for cleanmgr.exe (Disk Cleanup)? Performance & Maintenance
Solved Event Viewer Warning - Source e1yexpress - Event ID 27 General Discussion
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
Event 18 WHEA-Logger Error in Event Viewer Hardware & Devices
How to clear events in viewer? General Discussion

Our Sites

Site Links

About Us

Find Us

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

All times are GMT -5. The time now is 11:00 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33