@rem 这是windows中创建承载网络的相关命令
title wifi热点
@echo off
set ssid=abcde
set key=123456789
:begin
cls
echo --------------------------------------------------------
echo 默认ssid:%ssid% 默认key:%key%
echo --------------------------------------------------------
echo 1.配置 2.启动 3.停止 4.禁用 5.状态 6.测试 0.退出
choice /C 1234560
if errorlevel 7 goto exit
if errorlevel 6 goto drivers
if errorlevel 5 goto status
if errorlevel 4 goto disallow
if errorlevel 3 goto stop
if errorlevel 2 goto start
if errorlevel 1 goto allow
:allow
netsh wlan set hostednetwork mode=allow ssid=%ssid% key=%key%
goto end
:start
netsh wlan start hostednetwork
goto end
:stop
netsh wlan stop hostednetwork
goto end
:disallow
netsh wlan set hostednetwork mode=disallow
goto end
:status
netsh wlan show hostednetwork
goto end
:drivers
netsh wlan show drivers
goto end
:end
pause
goto begin
:exit
pause