回复 3# jiay2796 - @echo off
- for /f "tokens=4" %%a in ('route print^|findstr 0.0.0.0.*0.0.0.0') do (
- set IP=%%a
- )
- echo %IP% | findstr "^192.168" >nul
- if errorlevel 1 (
- start "" /max "c:\Program Files\Internet Explorer\IEXPLORE.EXE" "http://1.1.1.1"
- ) else (
- start "" /max "c:\Program Files\Internet Explorer\IEXPLORE.EXE" "http://192.168.0.22"
- )
复制代码
|