@rem This is the command for creating a hosted network in Windows
Title WiFi hotspot
@echo off
Set SSID=ABCDE
Set key=123456789
: Begin
Cls
Echo--------------------------------------------------------
echo Default ssid:%ssid% default key:%key%
Echo--------------------------------------------------------
echo 1. Configuration 2. Start 3. Stop 4. Disable 5. Status 0. exit
CHOICE/C 123450
if errorlevel 6 goto exit
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
:d Isallow
Netsh wlan set hostednetwork mode=disallow
Goto END
: status
Netsh wlan show hostednetwork
Goto END
: End
Pause
Goto BEGIN
: Exit
Pause
Windows configuration A batch program that hosts the network