设置静态IP命令:
@echo off
netsh interface ip set address name="本地连接" source=static addr=192.168.1.110 mask=255.255.255.0 gateway=192.168.1.1
netsh interface ip set dns name="本地连接" source=static addr=114.114.114.114
2. 设置自动获取IP命令:
@echo off
netsh interface ip set address name="本地连接" source=dhcp
netsh interface ip set dns name="本地连接" source=dhcp
注:复制粘贴到记事本 ,保存为“静态IP / 自动获取IP.bat" ,后缀为bat,这个不能弄错,前面的名字可以随意起。