Skip to content

Instantly share code, notes, and snippets.

@esnho
Last active May 25, 2019 10:46
Show Gist options
  • Save esnho/8c27df20eb88cb031d5f8ebfb8d78d5a to your computer and use it in GitHub Desktop.
Save esnho/8c27df20eb88cb031d5f8ebfb8d78d5a to your computer and use it in GitHub Desktop.
Windows easy virtual router, hosted network. VirtualRouter START / VirtualRouter STOP / VirtualRouter STATUS - by Fabrizio Benedetti
@ECHO OFF
IF "%~1"=="START" GOTO START
IF "%~1"=="STOP" GOTO STOP
IF "%~1"=="STATUS" GOTO STATUS
ECHO Wrong argument
GOTO END
:START
ECHO Starting Virtual Router...
netsh wlan set hostednetwork mode=allow ssid=<YOUR-SSID> key=<YOUR-PASSWORD>
netsh wlan start hostednetwork
TIMEOUT 3
GOTO END
:STOP
ECHO Stopping Virtual Router...
netsh wlan stop hostednetwork
TIMEOUT 3
GOTO END
:STATUS
netsh wlan show hostednetwork
TIMEOUT 20
GOTO END
:END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment