我要做一个批处理文件用来改IP

来源:百度知道 编辑:UC知道 时间:2024/06/11 05:39:38
那个命令我不记得了,只需要更改IP地址和默认网关

求命令~
要最简单的,两行命令就搞定

@echo off
netsh interface IP Set Address "本地连接" Static 172.19.5.118 255.255.255.0 172.19.5.199 1
rem 上面是改IP下面改DNS
netsh interface ip set dns name="本地连接" source=static addr=202.118.80.2
netsh interface ip add dns "本地连接" 202.96.64.68 index=2
pause