| 复制代码 代码如下:@echo off
 rem # ----------------------------------
 rem # 接口 IP 配置nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 rem # ----------------------------------
 
 echo "=========IP 控制管理=========="
 echo "=gt; d: 自动获取IP"
 echo "=gt; h: 寝室 IP地址:66.168.1.8"
 echo "=gt; r: 公司网络 IP地址:192.168.250.173"
 echo "请输入对应的序号d,h,r,按回车键结束: "
 set /p ch=
 if %ch%==""nbsp; echo "You input null"goto :EOF
 set case=d,h,t,wgt;nul
 echo %case%|findstr "lt;%ch%gt;"gt;nulif errorlevel 1nbsp; goto :err
 goto %ch%
 goto err
 
 :h
 :: "寝室"
 echo "configure home ip address gateway,please wait 30 second ..."
 @netsh int ip set address "本地连接" static 66.168.1.8 255.255.255.0 66.168.1.1 1 gt;nul
 @netsh int ip set dnsnbsp; "本地连接"nbsp; staticnbsp; 66.168.1.1nbsp; PRIMARY gt;nul
 echo home ip configure is done
 goto :EOF
 
 :r
 :: "公司网络"
 echo "configure transport ip address gateway,please wait 30 second ..."
 @netsh int ip set address "本地连接" static 192.168.250.173 255.255.255.0 192.168.250.1 1 gt;nul
 echo transport ip configure is done
 goto :EOF
 
 :d
 :DHCP "自动获取IP地址"
 echo "configure transport ip address gateway,please wait 30 second ..."
 @netsh int ip set address "本地连接"nbsp; dhcp gt;nul
 @netsh int ip set dnsnbsp; "本地连接"nbsp; dhcpnbsp;nbsp; gt;nul
 
 :err
 :: "error"
 echo your input "%ch%" ,no this argument ! please input h or w!nbsp; game over
 rem # 接口 IP 配置结束
 
 (编辑:宣城站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |