win 2000不能运行批处理改IP问题
@echo off
set ip=10.1.110.4
set NetMask=255.255.255.0
set NetWay=10.1.110.254
set DNS1=10.1.5.101
set DNS2=***.**.***.*
Rem ******************************修改IP和DNS部分***********************************
:SetIP
Rem 修改本机地址
cmd /c netsh interface ip set address name="本地连接" source=static addr=%ip% mask=%NetMask%
cmd /c netsh interface ip set address name="本地连接" gateway=%NetWay% gwmetric=1
Rem 修改本机dns
cmd /c netsh interface ip set dns name="本地连接" source=static addr=%DNS1%
Rem 增加备用dns
cmd /c netsh interface ip add dns name="本地连接" addr=%DNS2% index=2
结果如下图:
但是在XP、其他的win2000下能运行。该怎么办啊。