pc71520 Posted April 12, 2019 Share Posted April 12, 2019 The Event Viewer can be found in Control Panel\All Control Panel Items\Administrative Tools Following, it is the content of a batch file that Clears the Event Viewer :: Set console. :: /************************************************************************************/ :mode echo off mode con cols=78 lines=30 color 17 cls @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 1) Copy the above. 2) Open Notepad. 3) Paste what you Copied. 4) Save as Clear Event Viewer Logs. 1) Running the Clear Event Viewer Logs.cmd file with Administrative Privileges (i.e. Right-click on it and select "Run as administrator") and 2) Rebooting your system will result in a clean Event Viewer. Link to comment Share on other sites More sharing options...
truemate Posted April 12, 2019 Share Posted April 12, 2019 any way how to check when was your last time pc was booted.. like in my absence do someone booted the pc Link to comment Share on other sites More sharing options...
mp68terr Posted April 12, 2019 Share Posted April 12, 2019 Is it mandatory to reboot after these commands? Tried in a VM (w7 x64) and the event viewer logs seemed empty right after running your .cmd file. Link to comment Share on other sites More sharing options...
debebee Posted April 12, 2019 Share Posted April 12, 2019 event logs will be cleared in real-time.. no reboot necessary.. 1 hour ago, truemate said: any way how to check when was your last time pc was booted.. like in my absence do someone booted the pc https://lifehacker.com/use-event-viewer-to-tell-when-your-pc-last-rebooted-5459919 Link to comment Share on other sites More sharing options...
Kalju Posted April 12, 2019 Share Posted April 12, 2019 If You have CCleaner, why not to use this feature? Spoiler Link to comment Share on other sites More sharing options...
debebee Posted April 12, 2019 Share Posted April 12, 2019 still faster to do batch files.. ccleaner takes a while to load esp with winapp lists.. Link to comment Share on other sites More sharing options...
pc71520 Posted April 13, 2019 Author Share Posted April 13, 2019 14 hours ago, mp68terr said: Is it mandatory to reboot after these commands? Tried in a VM (w7 x64) and the event viewer logs seemed empty right after running your .cmd file. Then, you know. Link to comment Share on other sites More sharing options...
pc71520 Posted April 13, 2019 Author Share Posted April 13, 2019 12 hours ago, teodz1984 said: ccleaner takes a while to load esp with winapp lists.. Try winapp2ool by MoscaDotTo https://github.com/MoscaDotTo/Winapp2/raw/master/winapp2ool/bin/Release/winapp2ool.exe Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.