Skip to content

Instantly share code, notes, and snippets.

@ineeee
Created December 26, 2018 03:08
Show Gist options
  • Save ineeee/d87b8e517577045737b3ff516bfe9bda to your computer and use it in GitHub Desktop.
Save ineeee/d87b8e517577045737b3ff516bfe9bda to your computer and use it in GitHub Desktop.
utility to configure windows 7, 8 and 8.1 as a hotspot
@echo off
if "%~1"=="" (
goto :help
)
if "%~1"=="help" (
goto :help
)
if "%~1"=="start" (
netsh wlan set hostednetwork mode=allow
netsh wlan start hostednetwork
)
if "%~1"=="stop" (
netsh wlan stop hostednetwork
rem netsh wlan set hostednetwork mode=disallow
)
if "%~1"=="name" (
netsh wlan set hostednetwork "ssid=%~2"
echo New name: %~2
)
if "%~1"=="pass" (
netsh wlan set hostednetwork "key=%~2"
echo New pass: %~2
)
exit /B
:help
echo why does windows not have a way to make a hotspot through a gui when it
echo has a bunch of features that make it look like a tablet: the script
echo.
echo Usage:
echo hotspot start
echo hotspot stop
echo hotspot name [new ssid]
echo hotspot pass [new password]
echo.
echo Make sure to turn on "Allow other network users to connect through
echo this computer's Internet connection" on your internet connection
echo (control panel, network, ethernet, properties, sharing).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment