windows7 热键查看_创建快捷方式图标或热键以打开或关闭Windows 7 / Vista防火墙

windows7 热键查看

windows7 热键查看

When you are troubleshooting network problems, one of the first things to do is disable the built-in Windows Firewall… but there are just way too many steps required to the firewall on and off. Can’t we make a simple shortcut icon instead?

当您对网络问题进行故障排除时,要做的第一件事就是禁用内置的Windows防火墙……但是打开和关闭防火墙所需的步骤太多了。 我们不能制作一个简单的快捷方式图标吗?

Naturally we can, using the built-in netsh utility that is usually used on the command line to perform advanced networking functions. We’ll simply create a shortcut to it with the appropriate parameters.

自然,我们可以使用命令行中常用的内置netsh实用程序执行高级联网功能。 我们将使用适当的参数简单地为其创建一个快捷方式。

Note: Always remember to turn the Firewall back on after you are done troubleshooting, especially if you use public wireless networks.

注意:完成故障排除后,请务必记住重新打开防火墙,尤其是在使用公共无线网络的情况下。

Create Shortcut Icons for Enable/Disable

创建启用/禁用的快捷方式图标

Right-click on the desktop or elsewhere, and choose New \ Shortcut from the menu.

右键单击桌面或其他位置,然后从菜单中选择“新建\快捷方式”。

image

Then in the shortcut location box, you’ll add one of two commands listed below.

然后在快捷方式位置框中,添加下面列出的两个命令之一。

image

Disable Firewall

禁用防火墙

netsh firewall set opmode disable

netsh防火墙设置opmode禁用

Enable Firewall

启用防火墙

netsh firewall set opmode enable

netsh防火墙设置opmode启用

Once you’ve added the correct command, go to the next screen and give the shortcut a helpful name like “Disable Firewall”

添加正确的命令后,转到下一个屏幕,并为快捷方式提供一个有用的名称,例如“ Disable Firewall”(禁用防火墙)

image

At this point you should have a shortcut icon, but it won’t work yet without choosing to run as administrator.

此时,您应该有一个快捷方式图标,但是如果不选择以管理员身份运行,它将无法正常工作。

image

Right-click the shortcut and choose Properties, and then choose the shortcut tab.

用鼠标右键单击快捷方式,然后选择“属性”,然后选择快捷方式选项卡。

image

In this screen you can assign a shortcut key for this shortcut by adding it into the Shortcut key box. The most important step is to click the Advanced button, so we can choose “Run as administrator” to always run the shortcut in administrator mode.

在此屏幕中,可以通过将其添加到快捷键框中为该快捷方式分配快捷键。 最重要的步骤是单击“高级”按钮,因此我们可以选择“以管理员身份运行”以始终在管理员模式下运行快捷方式。

image

You can also change the icon by using the Change Icon button. If you want the shortcuts to really match, you can change the “Look for icons in this file” to the following:

您也可以使用“更改图标”按钮来更改图标。 如果要使快捷键真正匹配,可以将“在此文件中查找图标”更改为以下内容:

%SystemRoot%\system32\imageres.dll

%SystemRoot%\ system32 \ imageres.dll

In that file you can find the red shield icon as well as the green one…

在该文件中,您可以找到红色的盾牌图标和绿色的盾牌图标。

image

So now I have two shortcuts that not only look good, but are functional.

因此,现在我有两个快捷键不仅看起来不错,而且可以使用。

image

If you want to verify that the shortcuts are working, use one of them and then open Windows Firewall through the start menu, and click on the link for “Turn Windows Firewall on or off”

如果要验证快捷方式是否有效,请使用其中一种,然后通过开始菜单打开Windows防火墙,然后单击“打开或关闭Windows防火墙”链接。

image

Then you should be able to see that the firewall is either on or off.

然后,您应该能够看到防火墙处于打开还是关闭状态。

image

The same shortcuts should also work on Windows XP or Windows 7, even though the screenshots are all for Windows Vista. You don’t need to run as administrator in XP, of course.

即使屏幕快照全部用于Windows Vista,相同的快捷方式也应在Windows XP或Windows 7上运行。 当然,您无需在XP中以管理员身份运行。

Note: Using these shortcuts will very briefly flash the command prompt window on the screen. For extra credit, you could use the hstart utility in your shortcut to hide the command prompt window.

注意:使用这些快捷方式将非常简短地刷新屏幕上的命令提示符窗口。 为了获得更多的荣誉,您可以在快捷方式中使用hstart实用程序来隐藏命令提示符窗口

Update: This has been successfully tested on Windows 7 as well.

更新:此方法也已在Windows 7上成功测试。

翻译自: https://www.howtogeek.com/howto/windows-vista/create-a-shortcut-icon-or-hotkey-to-turn-windows-vista-firewall-on-or-off/

windows7 热键查看

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值