Windows 7 Forums Search
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows 7. The Windows 7 forum also covers news and updates and has an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7 - Event Viewer One Click Clear

 
09-19-2009   #49
Zardoc


Windows 7 x64 Ultimate SP1
 
 

Event Viewer One Click Clear

How to Clear the Windows 7 Event Viewer with One Click

...


Last edited by Brink; 11-03-2011 at 10:12 PM..
My System SpecsSystem Spec
01-08-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
03-02-2012   #51
Airbot


Windows 7 Ultimate x64 SP1
 
 


This still works fine in Win 8 CP just FYI.
My System SpecsSystem Spec
03-03-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
03-04-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
.


03-05-2012   #54
Zardoc


Windows 7 x64 Ultimate SP1
 
 


Hi Redstar,

Welcome to the forums.

You're welcome
My System SpecsSystem Spec
2 Weeks Ago   #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 off
goto :eof

:eof
My System SpecsSystem Spec
Comment

 Event Viewer One Click Clear problems?



Tutorial Tools



Similar 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? Crashes and Debugging
Solved Event Viewer Error Message Event ID10 - How to get rid of it? Crashes and Debugging
Event 18 WHEA-Logger Error in Event Viewer Hardware & Devices


All times are GMT -5. The time now is 02:25 AM.



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
  

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