Clear the Event Viewer in Windows 7

Are you a regular user of the Event Viewer in Windows 7? Ever wonder why Microsoft haven’t programmed it to clear itself after a certain amount of entries or time?

As it stands right now, I have tens of thousands of entries in the Event Viewer which is unnecessary and bogs down the loading time. Maybe for a corporate administrator this is required but for average Joe, it isn’t.

What is the Event Viewer?

“Windows NT has featured event logs since its original release in 1993. Applications and operating system components can make use of this centralized log service to report events that have taken place, such as a failure to start a component or complete an action. The system defines three log sources:

  • “System”
  • “Application”
  • “Security”

Microsoft intends the System and Application log sources for use by the Windows operating system and Windows applications respectively. Only the Local Security Authority Subsystem Service (lsass.exe) can directly write to the Security log.”

With that out of the way, on with the guide to show you how to clear the Event Viewer.

Step 1.

Click the Start Menu and type notepad.  Click on Notepad from the results.

Step 2.

In Notepad, copy and paste the entirety of Clear-Event-Viewer. Make sure that the top line reads “@echo” and the bottom line reads “exit” (both without quotation marks).

Once it’s all in there, go to File > Save As…

Make sure that under Save as type; All Files (*.*) is selected.

Name the file, Clear Event Viewer.bat and click Save.

Your new file should now look like this:

If it doesn’t and it looks like this:

Go back and try again.

Step 3.

Find the batch file we created a second ago and double click it.  The command prompt window will now pop-up and run through the batch file commands.  Let it finish and it will automatically close.

Now you can go ahead and open up the Event Viewer and have a completely clear view!

via Clear the Event Viewer in Windows 7 [How To] | Windows 7 Maintenance | Windows Tools, Help & Guides.

Leave a Reply