@echo off
Color 2
Title Start-Stop wireless WiFi
echo Start wifi======= "Press the 1 button
echo off wifi======= "Press 2 button
echo Create wifi======= "press the 3 button
echo Delete wifi======= "Press the 4 button
set/p n=
if/i "%n%" equ "1" goto start
if/i "%n%" equ "2" goto stop
if/i "%n%" equ "3" goto Create
if/i "%n%" equ "4" goto Delete
: Start
Netsh wlan start hostednetwork
Echo opens successfully!
Goto END
: Stop
Netsh wlan stop hostednetwork
Echo stops succeeding!
Goto END
: Create
Netsh wlan set hostednetwork mode=allow Ssid=sun key=12345678
Echo has created Ssid=sun key=12345678 wireless WiFi
Goto END
:d elete
Netsh wlan set hostednetwork mode=disallow
echo Delete succeeded!
Goto END
@echo offColor2Title Start-Stop wireless WiFiEchoStart wifi======="Press the 1 keyEchoClose wifi======="Press the 2 keyEchoCreate wifi======="Press the 3 keyEchoDelete wifi======="Press the 4 keySet/P n=if/i "%n%" equ "1"Goto Startif/i "%n%" equ "2"GotoStopif/i "%n%" equ "3"GotoCreateif/i "%n%" equ "4"GotoDelete: StartNetsh wlanStarthostednetworkEchoOpen Success! Goto End: Stopnetsh wlan stop hostednetworkEchoStop the Success! Goto End: CreateNetsh wlanSetHostednetworkMode=allow Ssid=sun key=12345678EchoSsid=sun key= has been created12345678 of wireless WiFiGoto End:d eleteNetsh wlanSetHostednetworkMode=DisallowEchoDelete Success! Goto End
Turn on the Stop WiFi hotspot bat script