@echo off :3 ping 121.16.35.52 -n 4if errorlevel 1 goto 1 if errorlevel 0 goto 0 :0 msg %username% /time:20 /w "等待20秒,点确定可以取消。" goto 3: :1 shutdown -s -t 120 ----修改time:600 就10分钟了