Command Line Enable/Disable Of Hardware

Recently a user was having issues with their computer’s network connection. When starting fresh in the morning the integrated network connection would not properly initialize. Disabling and enabling the network adapter solved the issue, but requiring a user to do this was tedious. I tried a list of solutions, different drivers, different cables, Windows 7, Windows XP, fresh installs, didn’t make a difference.

So I turned to devcon. Using this little guy I was able to create a simple bat file that disables then enables the network adapter in a few short steps.

  1. I downloaded and extracted the 32bit version of devcon from the Microsoft download site.
  2. With devcon now in the %windir%\system32 directory I exported a list of the hwids using the following command:
    devcon ¬†hwids “*” > c:\hwids.txt
  3. I searched the text file for the network adapter Name: Intel(R) 82578DC Gigabit Network Connection
  4. Associated with that is the device instance id: PCI\VEN_8086&DEV_10F0&SUBSYS_00753842&REV_05\3&11583659&0&C8
  5. Then I confirmed with a simple disable/enable in the command line:
    devcon disable *DEV_10F0*
    devcon enable *DEV_10F0*
  6. With the network adapter responding accordingly, I wrote a small bat file, included it in startup of the machine, tested. It worked without issue.

While not the most ideal solution, everything else seems to have failed. It might be a sign of further issues with the motherboard to come, but for now this solves the issue and the user can get back to work!

Comments are closed.