避免 Windows 防火墙弹出窗口 [英] Avoiding a Windows Firewall popup

查看:29
本文介绍了避免 Windows 防火墙弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的组织生产了一套使用网络的 Windows 应用程序,因此当用户第一次运行我们的软件时,Windows 防火墙(如果正在运行)会弹出一个窗口,通知用户我们的应用正在尝试使用网络,提示用户允许或拒绝访问.

My organisation produces a suite of Windows applications that make use of networking, and so when users run our software for the first time, the Windows Firewall (if it is running) brings up a pop-up, informing the user that our app(s) are trying to use the network, prompting the user to allow or deny access.

许多其他应用程序(例如 Spotify)都会出现这种情况,但我们希望阻止这些弹出窗口的发生,因为它们可能会给我们的用户带来一些问题.某些应用程序(MSN Messenger、GoogeTalk)运行时不会导致防火墙提醒用户,我们也希望这样做.

This occurs with plenty of other apps (Spotify, to give one example), but ee'd like to prevent these popups from happening, as they can be a bit problematic for our users. Some Applications (MSN Messenger, GoogeTalk) operate without ever causing the Firewall to alert the user, and we'd like to do the same.

通过让我们的安装程序在以下位置写入适当的注册表项,我们已在 Windows XP 上成功完成此操作:

We've successfully done this on Windows XP by having our installer write appropriate registry keys at:

HKLMSYSTEMControlSet001ServicesSharedAccessParametersFirewallPolicyStandardProfileAuthorizedApplicationsList

HKLMSYSTEMControlSet001ServicesSharedAccessParametersFirewallPolicyStandardProfileAuthorizedApplicationsList

但是,这在 Windows 7 上没有相同的效果 - 防火墙弹出窗口仍然存在.

However, this does not have the same effect on Windows 7 - the Firewall popups still take place.

任何想法我们可以如何做到这一点?(我们的安装程序和软件都经过数字签名.)

Any ideas how we can do this? (Our installers and software are all digitally signed.)

谢谢汤姆戴维斯

推荐答案

您可以向 Windows 防火墙添加例外,方法是使用 Windows 内置的实用程序 netsh,但该实用程序在 Windows 上的工作方式不同XP 和 Windows 7.以下是我使用的命令:

You can add exceptions to Windows Firewall by shelling out to netsh, a utility built into Windows, but the utility works differently on Windows XP and Windows 7. Here are the commands I used:

添加:netsh firewall add allowedprogram mode=ENABLE profile=ALL name=[exception name] program=[program path]

删除:netsh firewall delete allowedprogram profile=ALL program=[程序路径]

添加:netsh advfirewall firewall add rule action=allow profile=any protocol=any enable=yes direction=[in|out] name=[exception name] program=[program path]

删除:advfirewall 防火墙删除规则配置文件=任何名称=[异常名称]

这篇关于避免 Windows 防火墙弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆