创建两个.bat文件,分别命名为static.bat和dhcp.bat

static.bat文件写入

netsh interface ip set address "Wi-Fi" static 192.168.1.22 255.255.255.0 192.168.1.1

其中的IP address, mask和gateway自己根据需求修改,此处我修改的是Wi-Fi,请使用ipconfig指令查询自己需要配置网络的名字。

dhcp.bat文件写入

netsh interface ip set address "Wi-Fi" dhcp

使用管理员权限与运行即可

相关文章:

  • 2022-12-23
  • 2021-07-18
  • 2021-10-12
  • 2021-12-23
  • 2021-04-14
  • 2022-12-23
猜你喜欢
  • 2021-05-29
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2021-07-19
相关资源
相似解决方案