Skip to content

Instantly share code, notes, and snippets.

@abhimanyu003
Last active January 25, 2019 07:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save abhimanyu003/d349a7c21a0d689e83d2 to your computer and use it in GitHub Desktop.
Save abhimanyu003/d349a7c21a0d689e83d2 to your computer and use it in GitHub Desktop.
Turns your Laptop/PC into a WiFi hotspot. Make sure to "Run as Admin"
@echo off
title Wifi Hotspot
echo What You What To Do ?
echo 1 to create wifi
echo 2 to stop wifi
echo 3 show details
set /p input=
if %input%==1 goto 1
if %input%==2 goto 2
if %input%==3 goto 3
:1
cls
setlocal
set ssid=%RANDOM%
netsh wlan set hostednetwork mode=allow ssid=%ssid% key=am12345678 >null
netsh wlan start hostednetwork
echo Wifi is started with name "%ssid%" and password am12345678
pause >null
exit;
:2
cls
netsh wlan stop hostednetwork >null
netsh wlan set hostednetwork mode=disallow
pause >null
exit;
:3
cls
netsh wlan show hostednetwork
pause >null
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment