1. 单次修改IP,批处理文件
newIP.bat
@echo =========== Changing to IP : 222.192.41.%1
netsh interface ip set address "以太网" static 222.192.41.%1 255.255.255.0 222.192.41.1
usage: newIP num ;
2. 循环修改,批处理文件
callTop.bat
@echo off
set varIP=2
:continue
echo 执行第%varIP%次.
call newIP %varIP%
set /a varIP+=1
pause
if %varIP% lss 254 goto continue
@echo 执行完毕
pause
usage: callTop ;