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

查看:134
本文介绍了避免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:

HKLM \ SYSTEM \ ControlSet001 \ Services \ SharedAccess \ Parameters \ FirewallPolicy \ StandardProfile \ AuthorizedApplications \ List

HKLM\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List

但是,这在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 Shell内建的实用程序 netsh 脱壳,来向Windows防火墙添加例外,但是该实用程序在Windows上的工作方式有所不同XP和Windows7.这是我使用的命令:

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=[program path]

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

删除: advfirewall firewall delete rule profile=any name=[exception name]

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

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