Onekey Connect

  • 2016-09-12
  • 0
  • 0
cls
@Echo off
Setlocal enabledelayedexpansion
Title Onekey Connect
cls
Title Onekey Connect:Show Windows IP Config
@Echo off
Setlocal enabledelayedexpansion
ipconfig/all
echo.
echo.
echo 以上为当前网络配置,如需进行Onekey Connect
pause
cls
Title Onekey Connect:Set Local Connection
echo.
echo.
echo Local onnections are seting
echo.
netsh interface ip set address name="本地连接" source=dhcp>nul
ping /n 3 127.1
netsh interface ip set dns name="本地连接" source=dhcp>nul
ping /n 3 127.1
netsh interface ip set address name="以太网" source=dhcp>nul
ping /n 3 127.1
netsh interface ip set dns name="以太网" source=dhcp>nul
ping /n 3 127.1
Title Onekey Connect:Obtain IP
cls
echo.
echo.
echo Obtaining ip
echo.
ipconfig /release
ping /n 3 127.1>nul
:start
cls
Title Onekey Connect:Detection Of IP State
echo.
echo.
echo detection of ip state
echo.
ping /n 4 127.1>nul
set aaa=654321
ipconfig /all | findstr "10.[45][8023]." && set aaa=123456
if %aaa% equ 123456 (
cls
echo.
echo.
echo Gets a IP success
echo.
ping /n 4 127.1>nul
exit
) else (
cls
Title Onekey Connect:Releasing IP
echo.
echo.
echo? IP error, try to get started
echo.
ipconfig /release
ping /n 3 127.1>nul
cls
Title Onekey Connect:Obtain IP Again
echo.
echo.
echo Obtain IP Again
echo.
ipconfig /renew
ping /n 3 127.1>nul
goto start
)

评论

还没有任何评论,你来说两句吧

CC共享许可协议:BY-NC-SA 4.0 - 友情链接 - Theme by Qzhai