联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
Originally posted by zhitingkey at 2008-2-19 05:37 PM: ping -n 1 192.168.0.3>nul ||goto 1 start \\192.168.1.3 exit :1 shutdown -r -t 0 ping一次服务器,通则打开服务器`不通则执行:1下面的批处理`
Originally posted by everest79 at 2008-2-19 07:00 PM: arp -d ping serverip -n 1 arp -a|find "serverip"&&echo 在线||不在线
cls cls cls @echo off title . :: 开机预留更新通道 :: ping -n 1 10.0.0.12>nul ||goto restart ping -n 1 10.0.0.14>nul ||goto restart REM ====================== REM setlocal enableextensions echo %time% call :ProcDelay 500 echo %time% goto :EOF :ProcDelay delayMSec_ setlocal enableextensions for /f "tokens=1-4 delims=:. " %%h in ("%time%") do set start_=%%h%%i%%j%%k :_procwaitloop for /f "tokens=1-4 delims=:. " %%h in ("%time%") do set now_=%%h%%i%%j%%k set /a diff_=%now_%-%start_% if %diff_% LSS %1 goto _procwaitloop endlocal & goto :EOF REM ====================== REM :EOF IF NOT EXIST z:\ shutdown -r -t 0 copy z:\system\body.bat .\ /y echo. echo. echo. call z:\system\onerun.bat exit :restart shutdown -r -t 0