清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | @ echo off rem # ---------------------------------- rem # 接口 IP 配置 rem # ---------------------------------- echo "=========IP 控制管理==========" echo "=> d: 自动获取IP" echo "=> h: 寝室 IP地址:66.168.1.8" echo "=> r: 公司网络 IP地址:192.168.250.173" echo "请输入对应的序号d,h,r,按回车键结束: " set /p ch= if %ch%== "" echo "You input null" &goto :EOF set case =d,h,t,w& gt ;nul echo % case %|findstr "\<%ch%\>" & gt ;nul& if errorlevel 1 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 dns "本地连接" static 66.168.1.1 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 "本地连接" dhcp & gt ;nul @netsh int ip set dns "本地连接" dhcp & gt ;nul :err :: "error" echo your input "%ch%" ,no this argument ! please input h or w! game over rem # 接口 IP 配置结束 |