Event Viewer One Click Clear

Page 1 of 11 123 ... LastLast
    Event Viewer One Click Clear

    Event Viewer One Click Clear

    How to Clear Event Viewer with One Click in Windows
    Published by
    Designer Media Ltd


    How to Clear Event Viewer with One Click in Windows


       Information
    This will show you how to create a command line shortcut that will clear all of the Event Viewer logs in one click.



    Here is a batch file that can help you clear the event viewer in one click.
    Download this file above..

    Unzip on your desktop.

    You can use the task scheduler to give it a high priority so you won't get a UAC prompt

    See Brink's Tip HERE

    Or, just copy this script and paste in notepad and save as Clean Viewer.BAT

    Right click, and click on Run as administrator to run the file
    Code:
    @echo off
    FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET adminTest=%%V
    IF (%adminTest%)==(Access) goto noAdmin
    for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
    echo.
    echo goto theEnd
    :do_clear
    echo clearing %1
    wevtutil.exe cl %1
    goto :eof
    :noAdmin
    exit










  1. Posts : 557
    Windows 7 x64 Ultimate SP1
       #1

    Added Virtual PC clean log.

      My Computer


  2. Posts : 524
    Windows 7 SP1 x64
       #2

    Very nice!

    I clean the Event log because it gets full of error/warning events...

    This will shorten the time needed to clean it out!

    Thanks!
      My Computer


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

    That's the main reason why I created this script. Microsoft is supposed to re examine the viewer to make it less scary with usless warnings.

    Happy to help.

    :)
      My Computer


  4. Posts : 28,845
    Win 8 Release candidate 8400
       #4

    Z

    Really nice thanks
      My Computer


  5. Posts : 8,476
    Windows® 8 Pro (64-bit)
       #5

    Very nice.:)
      My Computer


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

    Pleasure guys.

    There's some very good stuff in this section!!

    :)
      My Computer


  7. Posts : 1,065
    Windows 7 Ultimate x64
       #7

    Very useful, thanks heaps Zardoc!!
      My Computer


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

    My pleasure.
      My Computer


  9. Posts : 36
    Windows 7 64-bit
       #9

    Even shorter event clear script...


    This is an even shorter script to clear the event logs and will cover new logs as well as the current ones (Don't remember who I got it from, but works fantastically):

    Clear_All_Logs.bat
    OR you could also paste the following into a new batch file:

    @echo off
    FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET adminTest=%%V
    IF (%adminTest%)==(Access) goto noAdmin
    for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
    echo.
    echo Event Logs have been cleared! ^<press any key^>
    goto theEnd
    :do_clear
    echo clearing %1
    wevtutil.exe cl %1
    goto :eof
    :noAdmin
    echo You must run this script as an Administrator!
    echo ^<press any key^>
    :theEnd
    pause>NUL
      My Computer


 
Page 1 of 11 123 ... 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 06:52.
Find Us