WiX 安装程序:如何添加防火墙例外规则? [英] WiX Installer: how to add Firewall exception rule?
问题描述
我使用 WiX 安装程序安装我的 Windows 服务.它添加了防火墙例外:
I install my windows service using WiX installer. It adds Firewall exception:
<File Id="file_1000_" Checksum="yes" Vital="yes" KeyPath="yes" Source="$(var.SourceFiles)\MyService.exe">
<fwrules:FirewallException Id="FirewallDomainMySvcTCP"
Name="My Service Domain TCP"
Protocol="tcp"
Port="[PORTNUMBER]"
Scope="any"
IgnoreFailure="yes"
Profile="domain" />
我的服务是一些 WCF 服务的 Windows 主机.
My service is a windows host for a few WCF services.
然后我从其他工作站向该服务运行查询,它无法连接.我转到控制面板-> 防火墙-> 高级-> 入站规则并看到规则存在但在程序和服务"上它有一个这个节目:"当我标记满足指定条件的所有程序"时,我的客户端连接到该服务并且工作正常.
Then I run a query from other workstation to the service, it cannot connect. I go to Control Panel->Firewall->Advanced->Inbound Rules and see the rule exists but on "Program and services" it has a "This program: " When I mark "All programs that meet the specified conditions" my client connects to the service and works fine.
如何在我的安装程序中添加防火墙例外规则满足指定条件的所有程序"但不是一个exe?
How I can add in my Installer the Firewall exception rule which is for "All programs that meet the specified conditions" but not for one exe?
推荐答案
已解决:记住:你应该把这个组件的 ComponentRef 添加到 Fragment(!!!)
Solved: Remember: you should add ComponentRef to this component into the Fragment(!!!)
元素
应该在 Component 下,而不是 File 下.我将它们移到上一层.像这样:(检查第一条消息:组件"而不是文件")
should be under Component but not under File. I moved them on one level upper. Like this: (check the 1st message: "Component" instead of "File")
......
...
这篇关于WiX 安装程序:如何添加防火墙例外规则?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!