Windows 10: Failed to clear event logs


  1. Posts : 2
    Windows 7 Ultimate and Windows 10 Home
       17 Dec 2017 #1

    Failed to clear event logs


    Hi @Brink, hope you are around for this! LOL
    This has not occurred between October 16, 2016, when I purchased this it, and today.
    So, if it is a minor issue, I am OK with ignoring these results.

    Failed to clear event logs

    Failed to clear event logs using Clear_Event_Viewer_Logs.bat, which I downloaded yesterday.
    Please note the three logs just below:

    clearing "Microsoft-Windows-LiveId/Analytic"
    Failed to clear log Microsoft-Windows-LiveId/Analytic.
    Access is denied.

    clearing "Microsoft-Windows-LiveId/Operational"
    Failed to clear log Microsoft-Windows-LiveId/Operational.
    Access is denied.

    clearing "Microsoft-Windows-USBVideo/Analytic"
    Failed to clear log Microsoft-Windows-USBVideo/Analytic.
    The instance name passed was not recognized as valid
    by a WMI data provider.

    ===============================================================

    Clear_Event_Viewer_Logs.bat

    :: Created by: Shawn Brink
    :: Created on: August 15th 2016
    :: Updated on: May 13th 2017
    :: Tutorial: Clear All Event Logs in Event Viewer in Windows Performance Maintenance Tutorials


    @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 All Event Logs have been cleared!
    goto theEnd

    :do_clear
    echo clearing %1
    wevtutil.exe cl %1
    goto :eof

    :noAdmin
    echo Current user permissions to execute this .BAT file are inadequate.
    echo This .BAT file must be run with administrative privileges.
    echo Exit now, right click on this .BAT file, and select "Run as administrator".
    pause >nul

    :theEnd
    =============================================================================

    psjimm
    "No one can help everyone but everyone can help someone"
    Ronald Reagan

    p.s.
    I activated the build-in Administrator account, same results.
    At first I had used the Win 7 Clear Viewer V2.bat which I had downloaded from Seven Forums on June 16, 2015

    Dell Inspiron 570
    64-Bit
    Windows 10 Pro
    See Attached CPU-ID Report on my Dell Inspiron 570
    Failed to clear event logs Attached Files
    Last edited by Barman58; 17 Dec 2017 at 14:00.
      My ComputerSystem Spec


  2. Posts : 27,161
    64-bit Windows 10 Pro build 17604
       17 Dec 2017 #2

    Hello Jim, and welcome to Ten Forums.

    Just to verify, did you right click on the .bat file and click on "Run as administrator"?
      My ComputersSystem Spec


  3. Posts : 2
    Windows 7 Ultimate and Windows 10 Home
    Thread Starter
       24 Dec 2017 #3

    Brink asked
    "Just to verify, did you right click on the .bat file and click on "Run as administrator"?

    Yes, I did and I was in the hidden Admin account, bat not blocked.
    My apologies for the delay responding!
    Ran it on a Win 7 and a Win 10 machine
      My ComputerSystem Spec


  4. Posts : 27,161
    64-bit Windows 10 Pro build 17604
       24 Dec 2017 #4

    No problem Jim.

    It's not unusual for some of the event logs to not get cleared. I got "Access is denied" for the eact same ones you did. This can happen if they're in use or protected by the system.
      My ComputersSystem Spec


 

Related Threads
Performance & Maintenance Clear All Event Logs in Event Viewer in Windows in Tutorials
How to Clear All Event Logs in Event Viewer in Windows Event Viewer is a tool that displays detailed information as event logs about significant events on your PC. Event logs are special files that record significant events on your PC, such as...
Does anyone know where the Windows 10 Event Logs are stored? I know you can access them with Event Viewer, but I want to know where it loads them from. Googling didn't help much, as I only got results for Windows 7 and XP.
This has been happening since last 24 hours, My toshiba laptops shuts down automatically without showing any warning, the first it happened about 20 minutes after I turned it on , after the shutdown I again hit the power button and it started...
Performance & Maintenance Read Shutdown Logs in Event Viewer in Windows in Tutorials
How to Read Shutdown Event Logs in Windows You can use Event Viewer to view the date, time, and user details of all shutdown events caused by a shut down (power off) or restart. The event ID's below will show you these details. Event...
By mistake, I have executed a wrong command (SL /e:false to disable all event logging instead of clearing it. Got it from another website :o). Now I would like to reset all my event logs to default. Has someone an idea, how I could apply the...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 12:51.
Find Us