系统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