首页 > 代码库 > bat批处理设置静态、动态、ping、查看网络配置
bat批处理设置静态、动态、ping、查看网络配置
@echo off :startIP set /p source=S or D or C or P or E: echo source:%source% if /i "%source%" == "S" ( goto staticIP ) if /i "%source%" == "D" ( goto dhcpIP ) if /i "%source%" == "C" ( goto ipconfig ) if /i "%source%" == "P" ( goto ping ) if /i "%source%" == "e" ( goto exitSet ) :staticIP set /p IP=IP: netsh interface ip set address name="本地连接" source=static addr=%IP% mask=255.255.255.0 gateway=192.168.10.1 goto startIP :dhcpIP netsh interface ip set address name="本地连接" source=dhcp goto startIP :ipconfig ipconfig goto startIP :ping set /p TARGET=TARGET: ping %target% goto startIP :exitSet exit @Rem @netsh interface ip set dns name="本地连接" source=static addr=192.168.10.1
啦啦啦
bat批处理设置静态、动态、ping、查看网络配置
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。