一个自动修改本地IP地址的BAT

set /a num1=%random%%%200+1+1  //生成随机数
set ip=192.168.1.//ip 主体
set ip1=%ip%%num1% //拼接两部分
cmd /c netsh interface ip set address name=”无线网络连接” source=static addr=%ip1% mask=255.255.255.0 gateway=192.168.1.1 gwmetric=1 //设置新IP

u3coding
A software developer

Leave a Comment

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.