批处理命令行开启WiFi热点

@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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值