Wix boostrapper 设置以防止防火墙阻止应用程序 [英] Wix boostrapper settings to prevent the firewall from blocking the application

查看:27
本文介绍了Wix boostrapper 设置以防止防火墙阻止应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到任何地方如何在 wix 引导程序中设置参数,以便防火墙和防病毒软件不会将其视为威胁.我在其他设备上的引导程序显示它是威胁的信息.或者它在没有任何信息的情况下不会启动.

I can't find anywhere how to set parameters in the wix bootstrapper so that firewalls and anti-viruses do not treat it as a threat. My bootstrapper on other devices displays information that it is a threat. Or it doesn't start without any information.

我创建了这样的东西:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:fw="http://schemas.microsoft.com/wix/FirewallExtension">
<Bundle Name="Bootstrapper13" Version="1.0.0.0" Manufacturer="" UpgradeCode="86064926-b150-448f-aba9-fb0c8f4a83b5">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />       
    <Chain>
        <PackageGroupRef Id='Netfx4Full' />
  <MsiPackage Id="MainPackage" SourceFile="..\SetupProject1.msi" DisplayInternalUI="yes" Compressed="yes" Vital="yes" />
    </Chain>
</Bundle>
<Fragment>
...
<PackageGroup Id="Netfx4Full">
  ...
</PackageGroup>
</Fragment>
<Fragment>
<Directory Id="FirewallDirectory" Name="SourceDir">
  <Component Id="cmpFirewallException" Guid="87617436-AE1C-4C87-BB2D-1CA3531DBC46" KeyPath="yes">
    <fw:FirewallException Id="MyFirewallException"
            Program="..\BootstrapperSetup.exe"
            Description="Lets requests through"
            Name="InstallerWix"
            Scope="any"
            Protocol="tcp" />
  </Component>
</Directory>
</Fragment>
</Wix>

代码正在编译,但目录似乎从未启动.没有添加新规则.

The code is compiling but it looks like Directory has never started. No new rule is added.

推荐答案

如果要为客户端上安装的程序添加防火墙例外,则必须为客户端上运行的程序添加规则.从您显示的代码中,我可以理解的是您已将 Bootstrapper exe 添加为异常程序.(如有错误请指正)

If you want to add a firewall exception to the program installed on client, then you must add a rule for the program that runs on the client. From the code you shown, what I could understand is that you have added the Bootstrapper exe as exception program. (Correct me if its wrong)

以下是我最近在我的一个项目中使用的代码片段,用于为 udp 数据包添加入站异常规则(即防火墙中的一个例外,允许侦听来自网络的 UDP 数据包).这实际上是在 Msi 项目中编写的(在您的情况下为 SetupProject1)

Following is a code snippet which I used recently for one of my project to add inbound exception rule for udp packets (ie an exception in Firewall to allow listening for UDP packets from network). This is actually written in the Msi project (in your case SetupProject1)

<Component Id="ChangeFirewall" Guid="YOUR-GUID"  KeyPath="yes">
      <fw:FirewallException Id="FirewallExceptionUDP"
                  Name="AppName for UDP"
                  Scope="any"
                  Protocol="udp"
                  IgnoreFailure="yes"
                  Program="[#App_Name.exe]"
                  Profile="all" />  
</Component>

对于程序,它是安装在客户端机器上的 exe 的文件 ID.

For the program, it is the file id of the exe that gets installed on client machine.

<Component Id="App_Name.exe" Guid="YOUR-GUID">
    <File Id="App_Name.exe" Name="App_Name.exe" Source="$(var.Project_TargetDir)App_Name.exe">
    </File>
</Component>

这篇关于Wix boostrapper 设置以防止防火墙阻止应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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