Event Viewer One Click Clear

Page 6 of 11 FirstFirst ... 45678 ... LastLast

  1. Posts : 557
    Windows 7 x64 Ultimate SP1
    Thread Starter
       #50

    Hi Blappy and welcome to the forums.

    We're all here to help each other.

      My Computer


  2. Posts : 18,404
    Windows 7 Ultimate x64 SP1
       #51

    This still works fine in Win 8 CP just FYI.
      My Computer


  3. Posts : 557
    Windows 7 x64 Ultimate SP1
    Thread Starter
       #52

    Airbot said:
    This still works fine in Win 8 CP just FYI.
    Thanks for the heads up Airbot
      My Computer


  4. Posts : 2
    Windows 7 Home Premium 64 bit, Windows 7 Professional 64 bit
       #53

    Awesome!!

    Zardoc,

    Thanks for posting this very useful batch file.
      My Computer


  5. Posts : 557
    Windows 7 x64 Ultimate SP1
    Thread Starter
       #54

    Hi Redstar,

    Welcome to the forums.

    You're welcome
      My Computer


  6. Posts : 1
    Windows 7 Professional x64 SP1
       #55

    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 17:34. Reason: Changed echo off to echo on
      My Computer


  7. Posts : 6
    Windows 7 Professional 64bit
       #56

    Very nice indeed! Thank ya :)
      My Computer


  8. Posts : 570
    Windows 7
       #57

    Lovely thanks!!
      My Computer


  9. Posts : 1
    win 7 64 bit
       #58

    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 Computer


  10. Posts : 27
    Windows 7 Ultimate x86/x64 dual boot
       #59

    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 Computer


 
Page 6 of 11 FirstFirst ... 45678 ... LastLast

  Related Discussions
Our Sites
Site Links
About 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 05:03.
Find Us