快速批处理更换IP windows下通过批处理快速批量更换IP方法

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

快速批处理更换IP windows下通过批处理快速批量更换IP方法

  2021-03-20 我要评论
想了解windows下通过批处理快速批量更换IP方法的相关内容吗,在本文为您仔细讲解快速批处理更换IP的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:批处理,更换IP,下面大家一起来学习吧。
复制代码 代码如下:

@echo off
rem eth //eth 为网卡名称,可在网络连接中查询,如”本地链接”
set eth=”无线网络连接”
rem ip //ip 为你想更改的IP
set ip=192.168.1.8
rem gw //gw 为网关地址
set gw=192.168.1.1
rem netmasks //netmasks 为子网掩码
set netmasks=255.255.255.0
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

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们