@echo off
set /p option=请输入选项(1: 手动设置IP地址 2: 自动获取IP地址):
set option=1
set ip=192.168.0.105
set subnet=255.255.255.0
set gateway=192.168.0.100
if %option%==1 (
netsh interface ipv4 set address "以太网" static %ip% %subnet% %gateway% 1
) else if %option%==2 (
netsh interface ipv4 set address "以太网" dhcp
) else (
echo 选项无效!
)
start control.exe /name Microsoft.NetworkAndSharingCenter
pause windows自动设置IP
本原创文章未经允许不得转载 | 当前页面:爱笔记 » windows自动设置IP
爱笔记