Batch file help. Warning NOOB HERE

Status
Not open for further replies.

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 :protocol/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
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
 
tried to clean your code up for you. In the future place code in a
Code:
 bb tag.  Double check it for accuracy.

also:
[url=http://www.techist.com/forums/f4/announcement-torrenting-discussions.html]Computer Forums - Announcements in Forum : Rules, News and Announcements[/url]
 
prolly easier to find a web page that automatically refreshes itself and leave it open. then set Internet Explorer to automatically dial the default connection in Internet options > Connections tab.
 
nice idea but the problem is the connection doesn't get drooped so the pppoe dialer or in the solution you gave me it doesnt detect that the connection was dropped so it doesn't redial. That's why i actually need something to end the connection upon no reply or no more packets being received then restart the connection.. Thanks for trying to help anyways, much appreciated. Any other ideas?
 
Status
Not open for further replies.
Back
Top Bottom