- setlocal enabledelayedexpansion
- for /f "skip=3 tokens=3 delims=用" %%a in ('netsh interface show interface') do (
- for /f "tokens=*" %%b in ("%%a") do (
- set /a m+=1
- echo;!m!、%%~nxb
- set name!m!=%%~nxb
- )
- )
- set m=& set A=& set B=
- set /p A=选择虚拟AP:
- set /p B=选择外网源:
- if "%A%"=="" set f=1
- if "%B%"=="" set f=1
- if defined f (cls & set a=& goto :ch)
- cscript /nologo ics.vbs "!name%A%!" "!name%B%!" "on"
- pause & exit /b
复制代码 运行效果如图:
如何使1/2/3以外的按键,可以回到此选择界面上?谢谢! |