Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Batch file help. Warning NOOB HERE
Closed Thread
Old 08-09-2009, 03:16 AM   #1 (permalink)
 
Newb Techie

Join Date: Aug 2009

Posts: 3

way_2_hot_a is on a distinguished road

Default 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.

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

Last edited by way_2_hot_a; 08-10-2009 at 12:47 AM.
way_2_hot_a is offline  
Old 08-09-2009, 03:26 AM   #2 (permalink)
Hefemeister's Avatar
 

Join Date: Feb 2004

Location: Sweden

Posts: 6,677

Hefemeister is just really niceHefemeister is just really niceHefemeister is just really niceHefemeister is just really nice

Default Re: Batch file help. Warning NOOB HERE

tried to clean your code up for you. In the future place code in a [code] bb tag. Double check it for accuracy.

also:
Computer Forums - Announcements in Forum : Rules, News and Announcements
__________________
ASUS P6T Deluxe V2 :: INTEL i7 920 @3.4 :: XFX GTX260 :: 6gb Corsair 1600 :: Corsair 750TX :: TRUE 120 :: Samsung T240 24" :: Windows 7 X64

I do not accept support questions via PM

"The man in black fled across the desert, and the gunslinger followed."
Hefemeister is offline  
Old 08-09-2009, 03:28 AM   #3 (permalink)
 
Newb Techie

Join Date: Aug 2009

Posts: 3

way_2_hot_a is on a distinguished road

Default Re: Batch file help. Warning NOOB HERE

Ok thanks. sorry about the code.
way_2_hot_a is offline  
Old 08-09-2009, 10:29 AM   #4 (permalink)
office politics's Avatar
 
It's all just 1s and 0s

Join Date: Jan 2004

Location: in the lab

Posts: 4,410

office politics will become famous soon enough

Default Re: Batch file help. Warning NOOB HERE

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.
office politics is offline  
Old 08-09-2009, 12:00 PM   #5 (permalink)
 
Newb Techie

Join Date: Aug 2009

Posts: 3

way_2_hot_a is on a distinguished road

Default Re: Batch file help. Warning NOOB HERE

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?
way_2_hot_a is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
logs. please analyze myr707 HijackThis Logs (finished) 5 06-11-2009 02:31 PM
virus shuts down avg 8.5, commonpriv.log.lock VirusHater HijackThis Logs (finished) 9 06-05-2009 09:21 PM
wincodecpro infestation clcrutch Virus - Spyware Protection / Detection 16 05-18-2009 07:09 PM
Installing Ubuntu. 95BlackGA Linux, BSD, other *nixes & Open Source Software 1 10-16-2008 09:44 PM
Another Hijack Log boo HijackThis Logs (finished) 17 06-26-2007 12:30 PM