Jump to content

How to Turn Wi-Fi On or Off With a Keyboard or Desktop Shortcut in Windows


Batu69

Recommended Posts

ximg_57fbf138c6e79.jpg.pagespeed.gp+jp+j

 

Some laptops come with “Wi-Fi” function keys or switches that can quickly enable or disable your Wi-Fi. If your PC doesn’t have one of these, though, you can make one with the tools built into Windows.

 

You’ll need to start by creating a desktop or start menu shortcut. Once you’ve done that, you can invoke it with a keyboard shortcut, if you like.

Step One: Find the Name of Your Wi-Fi Connection

First, you’ll need to check the name of your Wi-Fi connection. You’ll need this to write the commands that enable and disable the Wi-Fi connection.

Head to Control Panel > Network and Internet > Network and Sharing Center > Change Adapter Settings.

 

Note the name of the Wi-Fi connection you want to disable. In the screenshot below, the name of the connection is “Wi-Fi”.

 

ximg_57fbe8798a054.png.pagespeed.gp+jp+j

Step Two: Create the Desktop Shortcuts

Now that you know the name of the connection, you can create the desktop shortcuts you need. Right-click the Windows desktop and select New > Shortcut to create a shortcut.

 

ximg_57fbe9f5511de.png.pagespeed.gp+jp+j

 

Copy and paste the following line into the the “Type the location of the item” box:

netsh interface set interface name="Wi-Fi" admin = disabled

Replace Wi-Fi in the command with the name of your Wi-Fi connection.

 

ximg_57fbea946365c.png.pagespeed.gp+jp+j

 

Name the shortcut “Disable Wi-Fi” or something similar and click “Finish”.

 

ximg_57fbeab9dde67.png.pagespeed.gp+jp+j

 

Now, we’ll create an Enable Wi-FI shortcut. Right-click the desktop and select New > Shortcut to create a new shortcut.

Copy and paste the following command into the “Type the location of the item” box, replacing Wi-Fi with the name of your Wi-Fi connection.

netsh interface set interface name="Wi-Fi" admin = enabled

ximg_57fbeb4c011a8.png.pagespeed.gp+jp+j

 

Name the shortcut “Enable Wi-Fi” or something similar and click “Finish”.

 

ximg_57fbeb7531105.png.pagespeed.gp+jp+j

Step Three: Make the Desktop Shortcuts Run as Administrator

The netsh command we’re using needs Administrator access to make this change to your system. We’ll need to make these shortcuts run as Administrator.

To do so, right-click one of the shortcuts and select “Properties”.

 

ximg_57fbebca3ecfb.png.pagespeed.gp+jp+j

 

Click the “Advanced” button on the Shortcut tab, enable the “Run as Administrator” option, and click “OK” twice.

Repeat this process for the second shortcut to make both shortcuts run as Administrator.

 

ximg_57fbec2283c40.png.pagespeed.gp+jp+j

Step Four (Optional): Assign Keyboard Shortcuts

You can now assign a keyboard shortcut, if you like. Right-click one of the shortcuts and select “Properties”.

On the Shortcut tab, click the “Shortcut Key” box and press the key or combination of keys you want to assign to the shortcut. Click “OK” afterwards.

For example, if you want to assign the Ctrl+Alt+F1 keyboard shortcut, click the “Shortcut Key” box and then press Ctrl+Alt+F1.

 

ximg_57fbec914f923.png.pagespeed.gp+jp+j

 

Repeat this process for the second shortcut, assigning whichever keyboard shortcut you want to it. For example, you could assign Ctrl+Alt+F1 to disable your Wi-Fi and Ctrl+Alt+F2 to enable your Wi-Fi.

 

ximg_57fbed1524174.png.pagespeed.gp+jp+j

 

Note that these keyboard shortcuts will only work if the application shortcuts are stored on your desktop or in your Start menu. If you place them in any other folder, the shortcuts you assign won’t do anything when you press them on your keyboard.

 

You can add the shortcuts to your Start menu, if you like, by copy-pasting the following line into File Explorer’s location bar:

%appdata%\Microsoft\Windows\Start Menu\Programs

Copy-paste the shortcuts into the folder that appears. They’ll appear in your Start menu, where you can click them, and the keyboard shortcuts will also function. You can remove them from your desktop, if you like.

 

ximg_57ffb7f4a392a.png.pagespeed.gp+jp+j

How to Use the Shortcuts

You can now disable or enable your Wi-Fi by either double-clicking the shortcuts on your desktop, or by pressing whichever shortcut keys you assigned to the shortcut.

The one “catch” with this method is that you’ll see a User Account Control popup every time you run the shortcut, asking whether you want to perform the action. You just have to click “Yes” and your change will take effect immediately. While there are ways to run commands as administrator without prompting you, there are potential security concerns with these methods, so we don’t recommend them.

 

ximg_57fbedd68cc66.png.pagespeed.gp+jp+j

Other Ways to Quickly Disable Your Wi-Fi

There are other ways to quickly enable and disable your Wi-Fi, too. On Windows 10, you can use Airplane Mode, which will disable Wi-Fi, Bluetooth, and any other wireless radios. Just click the notification icon at the right side of your taskbar, to the right of the clock, and click the “Airplane Mode” tile at the bottom of the action center. Click this tile again to disable Airplane Mode and re-enable Wi-Fi.

 

ximg_57fbef7774035.png.pagespeed.gp+jp+j

 

You can also head to Settings > Network & Internet > Airplane Mode and you’ll find a toggle for quickly enabling and disabling Wi-Fi.

 

ximg_57fbef60b83c1.png.pagespeed.gp+jp+j

 

Of course, striking a few keys on the keyboard is faster and more convenient than either of these. But it’s good to know they’re there.

 

Credit to

Link to comment
Share on other sites


  • Replies 1
  • Views 1.2k
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...