Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows 綜合教學 >> 關於 Windows

Win7 使用批次檔與 devcon 啟用/停用無線網卡

編輯:關於 Windows

透過 Microsoft devcon 工具與批次檔,可一鍵啟用或停用指定無線網卡,適合頻繁切換網路環境的用戶。

準備工作:

  1. 確認系統有 devcon.exe(在 C:\Windows\System32 或從微軟官網下載並放入該目錄)。
  2. 取得無線網卡硬體 ID:右鍵「電腦」→「管理」→「裝置管理員」→無線網卡右鍵「內容」→「詳細資料」→選「硬體 ID」記錄數值(如 PCI/VEN_14E4&DEV_4365&CC_0280)。

建立批次檔:

新建文字檔,儲存為 禁用網卡.bat 與 啟用網卡.bat,內容如下:

@echo off
; 禁用無線網卡,將 * 之間替換為實際硬體 ID
devcon disable *PCI/VEN_14E4&DEV_4365&CC_0280*
; 啟用無線網卡
; devcon enable *PCI/VEN_14E4&DEV_4365&CC_0280*
echo on
@echo off
; 禁用無線網卡
; devcon disable *PCI/VEN_14E4&DEV_4365&CC_0280*
; 啟用無線網卡
devcon enable *PCI/VEN_14E4&DEV_4365&CC_0280*
echo on

以系統管理員身分執行對應批次檔即可切換網卡狀態。

Copyright © Windows教程網 All Rights Reserved