I want to turn wifi on/off with a desktop shortcut

Divergent Droid

Reputable
Feb 11, 2016
19
0
4,510
Hi. I'm looking to turn the wifi itself on & off via a software switch in Windows 10. I'd like the fastest access to the function as possible, so i'd like to pin a shortcut for the switch in my taskbar.

It doesn't have to be a built in function of Windows, a 3rd part program will suffice, except I can't seem to find one. Can anyone help me ? Thanks!
 
Solution
Sure.

First, discover the interface name.
From an admin command prompt, type netsh interface show interface

Then, create two batch files. WiFiOn.bat and WiFiOff.bat

("Wireless Network Connection" = whatever your interface is called)

To Disable:
netsh interface set interface "Wireless Network Connection" Disable

To Enable:
netsh interface set interface "Wireless Network Connection" Enable

save those bat files on your desktop, and click as needed
This should do it:
netsh interface set interface name="Local Area Connection" admin=disabled
Subsitute the actual network connection name if it isn't Local Area Connection.

you will then want to create a reverse and create a batch file that will run this. rather simple

this will disable the adapter
 

USAFRet

Titan
Moderator
Sure.

First, discover the interface name.
From an admin command prompt, type netsh interface show interface

Then, create two batch files. WiFiOn.bat and WiFiOff.bat

("Wireless Network Connection" = whatever your interface is called)

To Disable:
netsh interface set interface "Wireless Network Connection" Disable

To Enable:
netsh interface set interface "Wireless Network Connection" Enable

save those bat files on your desktop, and click as needed
 
Solution
creating a batch file is simple,

open up notepad

create the first as wifi on

first liune will be

@echo off

netsh interface set interface "Wireless Network Connection" Disable

exit

save the file.

do the same for on.

next make sure under the explorer then the organize tap then folder options section, then view, uncheck hide extensions of known file types. you should then see .txt at the end. simple remove .txt and replace with .bat and hit ok.

you now have your batch files