一键关闭wi-fi蓝牙捷径_如何在Windows中使用键盘或桌面快捷方式打开或关闭Wi-Fi...

一键关闭wi-fi蓝牙捷径

一键关闭wi-fi蓝牙捷径

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.

有些笔记本电脑带有“ Wi-Fi”功能键或开关,可以快速启用或禁用Wi-Fi。 但是,如果您的PC没有其中之一,则可以使用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.

您需要先创建一个桌面或开始菜单快捷方式。 完成此操作后,您可以根据需要使用键盘快捷键来调用它。

第一步:找到您的Wi-Fi连接的名称 (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.

首先,您需要检查Wi-Fi连接的名称。 您需要用它来编写启用和禁用Wi-Fi连接的命令。

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

转到控制面板>网络和Internet>网络和共享中心>更改适配器设置。

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

记下您要禁用的Wi-Fi连接的名称。 在下面的屏幕截图中,连接的名称为“ Wi-Fi”。

第二步:创建桌面快捷方式 (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.

知道连接的名称后,您就可以创建所需的桌面快捷方式了。 右键单击Windows桌面,然后选择“新建”>“快捷方式”以创建快捷方式。

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.

更换Wi-Fi与你的Wi-Fi连接的名称的命令。

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

将快捷方式命名为“禁用Wi-Fi”或类似名称,然后单击“完成”。

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

现在,我们将创建一个Enable Wi-Fi快捷方式。 右键单击桌面,然后选择“新建”>“快捷方式”以创建新的快捷方式。

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.

将以下命令复制并粘贴到“键入项目的位置”框中,将Wi-Fi替换为Wi-Fi的名称。

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

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

将快捷方式命名为“启用Wi-Fi”或类似名称,然后单击“完成”。

第三步:以管理员身份运行桌面快捷方式 (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.

我们使用的netsh命令需要管理员权限才能对您的系统进行更改。 我们需要使这些快捷方式以管理员身份运行。

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

为此,右键单击快捷方式之一,然后选择“属性”。

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.

对第二个快捷方式重复此过程,以使两个快捷方式均以管理员身份运行。

第四步(可选):分配键盘快捷键 (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.

例如,如果要分配Ctrl + Alt + F1键盘快捷键,请单击“快捷键”框,然后按Ctrl + Alt + F1。

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.

对第二个快捷方式重复此过程,为您分配任意键盘快捷方式。 例如,您可以分配Ctrl + Alt + F1禁用Wi-Fi,并分配Ctrl + Alt + F2启用Wi-Fi。

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.

将快捷方式复制粘贴到出现的文件夹中。 它们将出现在“开始”菜单中,您可以在其中单击它们,键盘快捷键也将起作用。 您可以根据需要将其从桌面上删除。

如何使用捷径 (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.

现在,您可以通过双击桌面上的快捷方式或按分配给该快捷方式的任何快捷键来禁用或启用Wi-Fi。

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.

使用此方法的一个“陷阱”是,每次运行快捷方式时,您都会看到一个“用户帐户控制”弹出窗口,询问您是否要执行该操作。 您只需单击“是”,您的更改将立即生效。 尽管有一些方法可以在不提示您的情况下以管理员身份运行命令,但是这些方法存在潜在的安全隐患,因此我们建议您不要使用它们。

其他快速禁用Wi-Fi的方法 (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.

还有其他方法可以快速启用和禁用Wi-Fi。 在Windows 10上,您可以使用飞行模式,该模式将禁用Wi-Fi,蓝牙和任何其他无线电。 只需单击时钟右侧的任务栏右侧的通知图标,然后单击操作中心底部的“飞机模式”图块。 再次单击此图块可禁用飞行模式并重新启用Wi-Fi。

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

您还可以转到“设置”>“网络和Internet”>“飞行模式”,并找到一个用于快速启用和禁用Wi-Fi的开关。

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.

当然,敲击键盘上的几个键比这两个键都更快,更方便。 但是很高兴知道他们在那里。

翻译自: https://www.howtogeek.com/275715/how-to-turn-wi-fi-on-or-off-with-a-keyboard-or-desktop-shortcut-in-windows/

一键关闭wi-fi蓝牙捷径

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值