Jump to content

Anything wrong with this Event Log Cleaner?


Recommended Posts

I have this batch file to clear the event log. When I ran it on my friend's PC which has NOD32 as well, NOD32 blocked it.

 

Just wanna make sure the batch file is safe?

 

@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

 

Link to comment
Share on other sites

  • Administrators

It's detected as a potentially unsafe application since it's also used by malware to clear its traces. The detection is optional and is disabled by default. You can exclude the file from detection or the detection itself by its name.

Link to comment
Share on other sites

15 hours ago, Marcos said:

It's detected as a potentially unsafe application since it's also used by malware to clear its traces. The detection is optional and is disabled by default. You can exclude the file from detection or the detection itself by its name.

Thanks, just wanted to make sure there's nothing wrong with that script.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...