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

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 win7! 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 win7, 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
Windows 7 Tutorial Category
Event Viewer Event Id 2002, Source: EapHost, Log Application
Well, I tryed to manage page-file but unfortunataly it resulted in problems. Then I lost VAIO-CARE and 7 ZIP files too. When I open Event Viewer every single day I see this: event Id 2002, Souce: Eap Host, Log name: Application and number of Eventes: 84. As I am desparate about that, What sould...
General Discussion
Event Viewer: Clear All Events
How to Clear all Event Logs in Event Viewer using Windows PowerShell This tutorial will show you how to quickly clear all event logs in Event Viewer with a one line PowerShell script. This one line command clears each log in the Event log list one at a time. wevtutil el gets the Event log...
Tutorials
BSOD when watching videos on youtube, Event 41 in Event Viewer
It's been a while since I've experienced a BSOD as I'm viewing a video on youtube. It would freeze as if the audio was caught in mid-stream then BSOD, then would restart automatically. I go to Event Viewer after windows as loaded and I see Event 41 Kernel-Power in there. I had this issue...
BSOD Help and Support
After BSOD Event Viewer Logs Event ID 3012 and 3011 every time I boot
I was running 3DMark06 and got a BSOD code 124. After that every time I boot Event Viewer logs Error Codes ID 3012 and 3011. Attached are screenshots of both. I googled this and found two different threads where someone suggested to rebuild the performance counters. Both responses were...
BSOD Help and Support
How To Clear Administrative Events Log - Event Viewer
Hi: Does anyone know how to clear the Administrative Events log listed under Custom Views in the Event Viewer? All the logs listed under the Windows logs have options to clear, but the above does not. Thanks, ColTom2
Performance & Maintenance
WHEA-Logger event 18/19 errors in Event Viewer (W7 Home Premium)
Hi, I was hoping somebody could offer an insight on the below, as searching around I've not found much to go on other than "overheating" Basically my laptop has been having very high temperatures for a long time (usually ~60C for CPU and often 100-110 for GPU...insanely high, in other words)...
Hardware & Devices

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 07:56.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App