[1]中提到數種方法,其中
netsh int set interface name="Local Area Connection 3" admin=disabled
netsh int set interface name="Local Area Connection 3" admin=enabled
netsh int set interface name="Local Area Connection 3" admin=enabled
One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the correct sy
ntax.
Usage set interface [name = ] IfName
[ [admin = ] ENABLED|DISABLED
[connect = ] CONNECTED|DISCONNECTED
[newname = ] NewName ]
Sets interface parameters.
IfName - the name of the interface
admin - whether the interface should be enabled (non-LAN only).
connect - whether to connect the interface (non-LAN only).
newname - new name for the interface (LAN only).
Notes:
- At least one option other than the name must be specified.
- If connect = CONNECTED is specified, then the interface
is automatically enabled even if the admin = DISABLED
option is specified.
ntax.
Usage set interface [name = ] IfName
[ [admin = ] ENABLED|DISABLED
[connect = ] CONNECTED|DISCONNECTED
[newname = ] NewName ]
Sets interface parameters.
IfName - the name of the interface
admin - whether the interface should be enabled (non-LAN only).
connect - whether to connect the interface (non-LAN only).
newname - new name for the interface (LAN only).
Notes:
- At least one option other than the name must be specified.
- If connect = CONNECTED is specified, then the interface
is automatically enabled even if the admin = DISABLED
option is specified.
使用下列指令可得到網卡資料,需注意事項" hwids 空格 =net"
devcon hwids =net
輸出結果如:
PCI\VEN_10EC&DEV_8167&SUBSYS_E0001458&REV_10\4&BC67B8D&0&28F0
Name: Realtek RTL8169/8110 Family Gigabit Ethernet NIC
Hardware ID's:
PCI\VEN_10EC&DEV_8167&SUBSYS_E0001458&REV_10
PCI\VEN_10EC&DEV_8167&SUBSYS_E0001458
PCI\VEN_10EC&DEV_8167&CC_020000
PCI\VEN_10EC&DEV_8167&CC_0200
Compatible ID's:
PCI\VEN_10EC&DEV_8167&REV_10
PCI\VEN_10EC&DEV_8167
PCI\VEN_10EC&CC_020000
PCI\VEN_10EC&CC_0200
PCI\VEN_10EC
PCI\CC_020000
PCI\CC_0200
ROOT\MS_L2TPMINIPORT\0000
Name: WAN Miniport (L2TP)
Hardware ID's:
ms_l2tpminiport
.
.
.
選擇網卡資料之Compatible ID's:的第一筆資料,如下指令可成功停用及啟用網卡。
停用:
devcon disable "PCI\VEN_10EC&DEV_8167&REV_10"
啟用:
devcon enable "PCI\VEN_10EC&DEV_8167&REV_10"
[1] http://windowsitpro.com/articles/index.cfm?articleid=41111&cpage=4
[2] http://forum.sysinternals.com/forum_posts.asp?TID=9483
[3] http://social.msdn.microsoft.com/Forums/zh-TW/241/thread/2ff7a678-0b27-46ec-9b54-ad7e75dbd54f
[4] http://www.wlanbook.com/enable-disable-wireless-card-command-line/
[5] http://support.microsoft.com/kb/311272/zh-tw
沒有留言:
張貼留言