Last active
August 24, 2016 16:27
-
-
Save abdulhadad/aa21c82154edfce2710e31930ffd32b6 to your computer and use it in GitHub Desktop.
Start and stop windows 10 hotspot feature
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set _show_wlan=netsh wlan show drivers | |
rem see if device support hotspot | |
for /f "tokens=2 delims=:" %%a in ('%_show_wlan% ^|find "Hosted network supported"') do @set _hn_support=%%a | |
if "%_hn_support%"==" Yes" ( | |
setlocal EnableDelayedExpansion | |
set _ssid=Windows10Hotspot | |
set _password=Windows10 | |
netsh wlan set hostednetwork mode=allow ssid=!_ssid! key=!_password! > nul | |
netsh wlan start hostednetwork > nul | |
echo Started hotspot with ssid=!_ssid! and password !_password! | |
echo Enter to stop hotspot | |
pause | |
netsh wlan stop hostednetwork | |
) else ( | |
echo Cannot start hotspot | |
pause | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment