close

Privacy guaranteed - Your email is not shared with anyone.

Welcome to Glock Talk

Why should YOU join our Glock forum?

  • Converse with other Glock Enthusiasts
  • Learn about the latest hunting products
  • Becoming a member is FREE and EASY

If you consider yourself a beginner or an avid shooter, the Glock Talk community is your place to discuss self defense, concealed carry, reloading, target shooting, and all things Glock.

Deleting Windows 7 Event Logs

Discussion in 'Tech Talk' started by ArtCrafter, Sep 14, 2011.

  1. ArtCrafter

    ArtCrafter ¤Hocker Mocker¤

    5,237
    1
    Jul 14, 2008
    I was looking for a way to do this and found a pretty good discussion on it over in the Windows 7 forum on CNET:

    http://forums.cnet.com/7723-19411_102-378338.html

    I am now using the batch program by dexxus shown in the next to last post, and it seems to do the job.

    In particular, it took out a corrupted Media Center log file that was giving me no end of grief. (I have since shut off the Media Center service since I don't use it.)

    HTH :wavey:
     
  2. Just curious and wanting to know..........

    What is a event log and why would I ever want to clear it out
     


  3. ArtCrafter

    ArtCrafter ¤Hocker Mocker¤

    5,237
    1
    Jul 14, 2008
    Event Logs: http://technet.microsoft.com/en-us/library/cc938674.aspx

    Basically, these logs record system 'events' (such as 'logs cleared'...lol).

    As for why, you don't 'need' to clear them. Some say you shouldn't. Others view it as 'good housekeeping.' Still others see it as yet another 'privacy' issue (although it's not clear to me why).

    Mainly, I just like to keep my machine 'clean.' :)




    PS: I've switched to a more 'polished' wevtutil-based cleaning/clearing code: (Ref.)

    @echo off
    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 :eof

    :cancel
    cls
    echo.
    echo USER CANCELED, Quiting Silently...
    goto :eof

    ::eof


    Directions
    • copy/paste/save as text file (.txt) using Notepad. etc.
    • rename file *.bat (make sure to change the extension, not just the name)
    • dbl-click to run/follow prompts (these will appear in a CMD window)

    Notices/Disclaimers
    • works for me
    • USE AT YOUR OWN RISK
     
    Last edited: Sep 20, 2011