Skip to content

Instantly share code, notes, and snippets.

@zigorou
Created April 27, 2010 17:25
Show Gist options
  • Save zigorou/381027 to your computer and use it in GitHub Desktop.
Save zigorou/381027 to your computer and use it in GitHub Desktop.
@echo off
rem ------------------------------------------------------------
rem wifictl.bat (zigorou@cpan.org)
rem prerequire
rem http://code.mincus.com/31/windows-wireless-api/
rem ------------------------------------------------------------
set PROGRAM_NAME=%0
set COMMAND=%1
set WZC_SERVICE="WZCSVC"
set SOL1_GATE_SERVICE="Sol1XSvc"
if %COMMAND%==enable goto ENABLE
if %COMMAND%==disable goto DISABLE
if %COMMAND%==status goto STATUS
if %COMMAND%==help goto HELP
rem "NO COMMAND"
:HELP
echo usage: %PROGRAM_NAME% (enable^|disable^|status^|help)
echo:
echo enable enable 1XGate service
echo disable disable 1XGate service
echo status display service status
echo help this message
goto END
rem "ENABLE"
:ENABLE
net stop %WZC_SERVICE%
net start %SOL1_GATE_SERVICE%
goto END
rem "DISABLE"
:DISABLE
net stop %SOL1_GATE_SERVICE%
net start %WZC_SERVICE%
wifi_config -enable
goto END
rem "STATUS"
:STATUS
sc query %SOL1_GATE_SERVICE%
sc query %WZC_SERVICE%
goto END
:END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment