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

一鍵切換 IP 位址:netsh 匯出/匯入腳本 + 批次檔實現零重開機切換

編輯:Windows 技巧

傳統修改註冊表切換 IP 需重開機,效率極低。利用 netsh 可秒級完成:

建立兩組 IP 設定檔

# 先在網卡屬性設好 A 網 IP
netsh interface dump > C:\A.txt

# 再設好 B 網 IP
netsh interface dump > C:\B.txt

切換指令

# 從 A 切換到 B
netsh -f C:\B.txt

製作一鍵批次檔

  1. 「執行」輸入 edit 開啟 DOS 編輯器。
  2. 輸入 netsh -f C:\B.txt,存檔為 B.bat。
  3. 同理製作 A.bat(內容 netsh -f C:\A.txt)。

未來雙擊對應 .bat 即可瞬間完成 IP 切換,無需重開機、無需記指令,極適合頻繁在不同網段移動的筆電使用者。

Copyright © Windows教程網 All Rights Reserved