Skip to content

Instantly share code, notes, and snippets.

Created July 11, 2016 02:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/63abce9804a466a362d1c43bda26fe4a to your computer and use it in GitHub Desktop.
Save anonymous/63abce9804a466a362d1c43bda26fe4a to your computer and use it in GitHub Desktop.
Batch File TO Set Up a Wi-Fi Hotspot in Windows
@echo off
CLS
:MENU
ECHO.
ECHO…………………………………………
ECHO.
ECHO Press 1, 2, or 3 to select your task, or 4 to Exit.
ECHO…………………………………………
ECHO.
ECHO 1 – Set Wifi Sharing Attributes
ECHO 2 – Start WiFi Sharing
ECHO 3 – Stop WiFi Sharing
ECHO 4 – Exit
ECHO.
SET /P M=Type 1, 2, 3, or 4, then press ENTER:
IF %M%==1 GOTO SET
IF %M%==2 GOTO START
IF %M%==3 GOTO STOP
IF %M%==4 GOTO EOF
:SET
netsh wlan set hostednetwork mode=allow ssid=wingiz key=1234 keyusage=persistent
GOTO MENU
:START
netsh wlan start hostednetwork
GOTO MENU
:STOP
netsh wlan stop hostednetwork
GOTO MENU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment