Last active
January 31, 2016 13:37
-
-
Save arieljannai/ff5c1bf26483f4179920 to your computer and use it in GitHub Desktop.
Set the WiFi interface on or off
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
@rem save the script wherever you'd like to | |
@rem create a shortcut named "wifi" and put it in a place that's in your path (shortcuts folder, system32, whatever..) | |
@rem set the shortcut to run as administrator! IMPORTANT! | |
@rem run "wifi on" or "wifi off" and enjoy your life. | |
@rem the default wifi interface name is "Wireless Network Connection" just cause that's the way it's on my computer. | |
@rem you can run "wifi-set-on-off.bat" script without any parameters to see what's your wifi interface name (I've added "Wi" filter assuming it will be WiFi or wireles..) | |
@ECHO OFF | |
if "%1"=="on" goto yes | |
if "%1"=="off" goto no | |
:show | |
netsh interface show interface | find "Wi" | |
pause | |
goto done | |
:yes | |
netsh interface set interface "Wireless Network Connection" enabled | |
goto done | |
:no | |
netsh interface set interface "Wireless Network Connection" disabled | |
goto done | |
:done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment