Question Locked

Need Script for automatic network connection repair

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

This is my problem: My network connection
keeps dropping out, I.E, red X on little
computer in taskbar. In order to fix it, I
have to right click and select repair
connection. It repairs with no problem and i'm
back online. Problem is, If I'm not around to
do this, then hours go by with no connection
and so I'm losing important online time when
downloading, ect. Due to my current location,
and available resources, there is no way at the
moment to fix the source of this problem, so
I'm wondering if anyone has a script or a
utility or something that would automatically
notice when the connection drops out and thus
automatically initiate a connection repair in
order. I've read around for answers and had
seen Devcon.exe mentioned a few times, and even
downloaded it, but I couldn't find any
information on using this utility or how to
utilize it to create and run the kind of script
I need. I would greatly appreciate any help
which might be provided and my family back in
the US would be mighty happy as well.

4 replies

by rob miners

You can use Device Manager to change the power management settings for a network adapter. To disable this setting in Device Manager, expand Network Adapters, right-click the adapter, click Properties, click the Power Management tab, and then clear the Allow the computer to turn off this device to save power check box.

Keep us informed as to your progress if you require further assistance. ;) :D

by donkere.prins

Thank you for your quick response, but the issue is not one of power, it is a usb issue, actually, I am using usb over cat5e extenders to connect my usb wireless network adapter to my laptop because I have to have the adapter outside and nearly 15 feet off the ground to access the wifi being provided at my location. This disconnection issue did not arise until after connecting the network using the extenders, so I'm figuring the problem lies within the extender devices or something where it keeps dropping the usb device off of the computer. I don't have the means, at the moment, however, to acquire other extenders so what I have right now I've been trying to make do with, which is why I'm looking for a way to handle the automatic reset/repair of the network when connectivity is lost.

I have a script I found as follow, posted on another thread somewhere, and the thread said that the individual used Devcon.exe to create and run the batch file, but I don't have the slightest idea where to begin there, other than to download the devcon.exe program, which I did:

ping -n 1 yahoo.com
if %errorlevel% EQU 0 goto end
devcon restart PCI\VEN_14E4* >>C:\log.txt

REM This adds a 60 seconds delay
PING 1.1.1.1 -n 1 -w 60000 >NUL
ipconfig /renew
ipconfig /release

:end

Now, of course, that script may not work in my situation, as I believe he was using an actual pci lan card, but its something to start with, I think.

by rob miners

In the Device Manager, Universal Serial Bus Controllers, USB Root Hub, Power Management. Uncheck the Allow the computer to turn off this device to save power. Uncheck all boxes on all root hubs.

Resart the PC.

It seems a bit drastic but you can try this.

Right click your desktop and choose New Shortcut and in the dialogue box type or copy and paste

%windir%\System32\ping.exe yahoo.com -t -w 20000

Keep us informed as to your progress if you require further assistance. ;) :D

Someone else may have a better idea.

This discussion is closed to new replies.