Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO off
- set USERNAME=1444000341
- set PASSWORD=20140303
- set DIALUPNAME=biznet
- set IPTOPING=8.8.8.8
- set DELAYINSECOND=120
- :loop
- echo Waiting %DELAYINSECOND% seconds...
- sleep %DELAYINSECOND%
- echo Checking Line NOW...
- ping -l 1 -w 5000 %IPTOPING% | find /I "TTL=" > NUL
- if errorlevel 1 goto dced
- echo Your Internet is OK !!
- goto loop
- :dced
- echo Your Internet is DOWN !! ..Start Re-dialling process NOW...
- rasdial %DIALUPNAME% /disconnect
- echo LOG to Disconnected.txt...
- sleep 10
- verify >nul
- echo %time% %date% >> Disconnected.txt
- echo Re-dialling NOW...
- :redial
- rasdial %DIALUPNAME% %USERNAME% %PASSWORD% | find /I "Remote Access error"
- if errorlevel 1 goto loop
- echo can't connect, wait %DELAYINSECOND% seconds...
- sleep %DELAYINSECOND%
- goto redial
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement