@echo off echo on error resume next>clear.vbs echo set wmi_clear=getobject("winmgmts:\. ootcimv2")>>clear.vbs echo dim lianan_names(2)>>clear.vbs echo lianan_names(0)="application">>clear.vbs echo lianan_names(1)="security">>clear.vbs echo lianan_names(2)="system">>clear.vbs echo for each lianan_name in lianan_names>>clear.vbs echo set lianan_logs=wmi_clear.execquery("select * from win32_nteventlogfile where logfilename='"^&lianan_name^&"'")>>clear.vbs echo for each lianan_log in lianan_logs>>clear.vbs echo lianan_log.cleareventlog()>>clear.vbs echo next>>clear.vbs echo next>>clear.vbs echo 创建文件完毕! echo 正在清除日志... clear.vbs echo 清除日志完毕! echo 删除创建的文件 del /f /q clear.vbs echo 日志清除完毕 pause