@echo off
rem eth //eth 为网卡名称,可在网络连接中查询,如"本地链接"
set eth="本地链接"
rem ip //ip 为你想更改的IP
set ip=192.168.4.23
rem gw //gw 为网关地址
set gw=192.168.4.1
rem netmasks //netmasks 为子网掩码
set netmasks=255.255.255.192
echo 正在将本机IP更改到: %ip%
rem
if %gw%==none netsh interface ip set address %eth% static %ip% %netmasks% %gw% > nul
if not %gw%==none netsh interface ip set address %eth% static %ip% %netmasks% %gw% 1 > nul
echo.........................
echo 检查当前本机IP:
ipconfig
echo.........................
echo 成功将本机IP更改为%ip%!
pause
close 作者: sendsky 时间: 2016-4-1 12:16
提示: 作者被禁止或删除 内容自动屏蔽作者: shuir 时间: 2016-4-1 15:40
提示: 作者被禁止或删除 内容自动屏蔽作者: 骚猪 时间: 2016-9-5 21:20