系統WIN7 x64位
下載devcon命令行工具
- Download the “Windows Driver Kit (WDK) 7.1.0 from Microsoft: http://www.microsoft.com/download/en/details.aspx?id=11800
- Extract the ISO to a temp directory with WinRAR, Uniectractor
- Extract the install file “WDK\setuptools_x64fre.msi” to a temp directory, where you will find “WinDDK\7600.16385.win7_wdk.100208-1538\tools\devcon\amd64\devcon.exe”
- 將devcon 復制到 C:\Windows\System32
- 注意: devcon MUST be run from an administrator cmd win *
查找網卡設備信息
- 使用管理員運行cmd
- 列出全部的PCI設備信息
devcon find PCI\*
- 記下網卡的信息,如
PCI\VEN_8086&DEV_15B7&SUBSYS_06B91028&REV_31\3&11583659&0&FE: Intel(R) Ethernet Connection (2) I219-LM
編寫bat腳本
@echo off
devcon enable *DEV_15B7*
echo on
@echo off
devcon disable *DEV_15B7*
echo on