日期:2014-05-17 浏览次数:20776 次
@echo off setlocal enabledelayedexpansion set adslUser=057188825632 set adslPass=123456 set adslName=宽带连接 set total=121 set loopC=0 set loopD=0 set repeatNum=2 set var=0 :loopC for /f "delims=" %%i in (C:\url.txt) do ( echo. ping 127.1 -n 3 >nul 2>&1 set /a var+=1 echo 计数%total%次暂停3分钟并关闭TheWorld.exe,当前计数!var! echo. if !var! geq %total% ( ping 127.1 -n 30 >nul 2>&1 set var=0 taskkill /im TheWorld.exe /f >nul ) else ( echo %%i echo. start %%i ) ) set /a loopC+=1 if !loopC! lss %repeatNum% ( rasdial "%adslName%" /disconnect rem 请根据自己的网络情况自行调节延时的长短以确保能够能够获得新的IP ping -n 10 127.1 >nul rasdial "%adslName%" %adslUser% %adslPass% goto :loopC ) else ( goto :loopD ) :loopD for /f "delims=" %%i in (D:\url.txt) do ( echo. ping 127.1 -n 3 >nul 2>&1 set /a var+=1 echo 计数%total%次暂停3分钟并关闭TheWorld.exe,当前计数!var! echo. if !var! geq %total% ( ping 127.1 -n 30 >nul 2>&1 set var=0 taskkill /im TheWorld.exe /f >nul ) else ( echo %%i echo. start %%i ) ) set /a loopD+=1 if !loopD! lss %repeatNum% ( rasdial "%adslName%" /disconnect rem 请根据自己的网络情况自行调节延时的长短以确保能够能够获得新的IP ping -n 10 127.1 >nul rasdial "%adslName%" %adslUser% %adslPass% goto :loopD ) else ( goto :loopC ) pause>nul