banner
绘素

绘素的Blog

twitter
github
email

Windows使用bat脚本更改网络设置

設置 IP、DNS 獲取方式為手動#

netsh interface ip set address name="以太網" source=static addr=192.168.50.138 mask=255.255.255.0 gateway=192.168.50.100
netsh interface ip set dns "以太網" static 192.168.50.100 primary

設置 IP、DNS 獲取方式為 DHCP#

netsh interface ip set address name="以太網" source=dhcp
netsh interface ip set dns name="以太網" source=dhcp

創建腳本#

  • 創建 bat 腳本,輸入其中內容
  • 發送到桌面快捷方式
  • 右鍵 - 屬性 - 快捷方式 - 高級 - 以系統管理員身份運行
  • 運行腳本
載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。