FEDER1C0 Posted August 31, 2013 Share Posted August 31, 2013 Hi guys good day to all. I'm looking for some script to reset my connection when my network speed doesn't work or if I can't ping google for example. I tried looking for a similar topic but i have a hard time searching for scripts in the forum. hope you can help me. thanks. If it exists. please post the link. Thanks again. Link to comment Share on other sites More sharing options...
Bert Posted August 31, 2013 Share Posted August 31, 2013 is it your router? FEDER1C0 1 The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Solution 5471665561 Posted August 31, 2013 Solution Share Posted August 31, 2013 (edited) The code below will do the following: -Every second, ping google. -if google does not respond in 4 seconds, then disable the local area connection, wait 3 seconds, then re-enable it. Then wait 15 seconds before checking again -if google does respond in that time, then re-check in 1 second again Note: I only tested this on Windows 7While True Sleep(1000) If ping("www.google.com") == 0 Then run('wmic path win32_networkadapter where NetConnectionID="Local Area Connection" call disable') sleep(3000) run('wmic path win32_networkadapter where NetConnectionID="Local Area Connection" call enable') sleep(15000) EndIf WEnd Edited August 31, 2013 by Durnt FEDER1C0 1 Link to comment Share on other sites More sharing options...
Bert Posted September 1, 2013 Share Posted September 1, 2013 I'm trying to find out why you need to disable it then re-enable it. Is this happening @ home? @work? Do you have a router? Cable modem? Knowing your setup would be helpful. Just resetting your connection is not the solution. Figuring out the cause of your issue and getting it fixed is. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
FEDER1C0 Posted September 1, 2013 Author Share Posted September 1, 2013 thanks MVP i dont know. Im new here. seems like our line is being monitored and i figured the only way i go with my internet connection is via resetting I read get tons of PDFs on line and when i finish 2 of the at a time my line keeps disconnected. I don't know why. Im not in good terms with the IT either. I ask my colleagues if i can do the downloading for PDFs and they told me its okay. My guess is thats my last resort. THANKS for all the help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now