@echo off
cls
title WIFI Ad Hot Setting v1.0
:menu
cls
color 0A
mode con: cols=100 lines=50
echo.
echo =========================================
echo WIFI Ad Hot Setting professional
echo please choice and press "enter"
echo =========================================
echo.
echo 1.netsh wlan show hostednetwork
echo.
echo 2.netsh wlan set hostednetwork allow
echo.
echo 3.netsh wlan set hostednetwork ssid
echo.
echo 4.netsh wlan set hostednetwork key
echo.
echo 5.netsh wlan show hostednetwork setting=security
echo.
echo 6.netsh wlan start hostednetwork
echo.
echo 7.netsh wlan stop hostednetwork
echo.
echo 8.exit
echo.
echo.
:cho
set choice=
set /p choice= choice:
::IF NOT "%choice%"=="" SET choice=%choice:~0,1%
if /i "%choice%"=="1" goto show
if /i "%choice%"=="2" goto allow
if /i "%choice%"=="3" goto ssid
if /i "%choice%"=="4" goto key
if /i "%choice%"=="5" goto security
if /i "%choice%"=="6" goto start
if /i "%choice%"=="7" goto stop
if /i "%choice%"=="8" goto exit
echo choice invalid,please again input
echo.
goto cho
:show
echo netsh wlan show hostednetwork
netsh wlan show hostednetwork
GOTO judge
:judge
echo.
if %ERRORLEVEL% == 0 (
echo execute pass!) ELSE (echo execute fail!..)
echo.
pause
cls
goto menu
:allow
echo netsh wlan set hostednetwork allow
netsh wlan set hostednetwork allow
GOTO judge
:ssid
set "input="
set /p input=please input your ssid:
echo netsh wlan set hostednetwork ssid=%input%
netsh wlan set hostednetwork ssid=%input%
GOTO judge
:security
echo netsh wlan show hostednetwork setting=security
netsh wlan show hostednetwork setting=security
GOTO judge
:key
set "ke="
set /p ke=please input your key(8 bit above):
echo netsh wlan set hostednetwork key=%ke%
netsh wlan set hostednetwork key=%ke%
GOTO judge
:start
ECHO netsh wlan start hostednetwork
netsh wlan start hostednetwork
GOTO judge
:stop
ECHO netsh wlan stop hostednetwork
netsh wlan stop hostednetwork
GOTO judge
::echo change ssid and key?
::set /p change=please input your select Y/N:
::if "%change%"=="Y" goto Y
::if "%change%"=="N" goto N
:exit
exit
批处理命令行开启WiFi热点
最新推荐文章于 2023-01-15 10:02:04 发布