@echo off
title WLAN PMMS IP ADDRESS SET
color a4
set /p flag=PMMS网络连接类型:DHCP[d],固定IP[s]?
set "adapter=无线网络连接"
rem set "adapter=本地连接"
if /i not "%flag%"=="s" goto label_static
rem 将网络设置为固定IP
set "ipaddr=192.168.1.112"
set "netmask=255.255.255.0"
set "gateway=192.168.1.1"
set "dns=192.168.1.1"
@echo IP地址设置为: ip[%ipaddr%] gateway[%gateway%] dns[%dns%]
netsh interface ip set address name="%adapter%" source=static addr=%ipaddr% mask=%netmask% gateway=%gateway%
netsh interface ip set dnsservers "%adapter%" static %dns% primary
goto end
:label_static
echo 将网络设置为dhcp
netsh interface ip set address "%adapter%" dhcp
netsh interface ip set dnsservers "%adapter%" dhcp
:end
echo IP设置完成!
@pause
[dos]IP地址设置
最新推荐文章于 2023-05-11 18:46:21 发布