way_2_hot_a
Beta member
- Messages
- 3
Batch file help. Please help me.
Ok my first time here at tech-forums.
Anyways i have a problem with my isp, they seem to disconnect me after large amounts of bandwidth are consumed and then bandwidth consumption is reduced. Such as playing an online game, watching too many youtube videos. Where i live isp's are not quality there just quantity. So i have been working on a way to keep a batch file running that pings google so when no reply is sent back it disconnects my network connection then starts it back up again automatically.
By the way it is a pppoe connection and here is some of the code i have been playing around with.. its noob code so plz bear with me.
side note the pings under the rotocol/protcol3 goto functions are there only for delaying the next function. such as a ping after the disconnection function to let the connection stop before starting it again.. anyways it doesnt work so help would be appreciated.
thanks for any help. Much appreciated
just noticed the goto functions protocol have the : infront of them so they make tongue faces on the forums. sorry about that
Ok my first time here at tech-forums.
Anyways i have a problem with my isp, they seem to disconnect me after large amounts of bandwidth are consumed and then bandwidth consumption is reduced. Such as playing an online game, watching too many youtube videos. Where i live isp's are not quality there just quantity. So i have been working on a way to keep a batch file running that pings google so when no reply is sent back it disconnects my network connection then starts it back up again automatically.
By the way it is a pppoe connection and here is some of the code i have been playing around with.. its noob code so plz bear with me.
side note the pings under the rotocol/protcol3 goto functions are there only for delaying the next function. such as a ping after the disconnection function to let the connection stop before starting it again.. anyways it doesnt work so help would be appreciated.
Code:
@ECHO OFF
:Game
PING www.google.com |FIND "Reply from " > NUL
IF NOT ERRORLEVEL 1 ECHO Internet connection is reciving packets boss.
IF ERRORLEVEL 1 rasdial dsl /disconnect GOTO:protocol
:protocol
PING www.google.com
PING www.google.com
PING www.google.com
cd "%ProgramFiles%\DSL" && START dsl"
PING www.google.com
PING www.google.com GOTO:protocol3
:protocol3
PING www.google.com |FIND "Request timed " > NUL
IF NOT ERRORLEVEL 1 rasdial dsl /disconnect GOTO:protocol
IF ERRORLEVEL 1 GOTO:Game
just noticed the goto functions protocol have the : infront of them so they make tongue faces on the forums. sorry about that