title: Questions about add firewall exception in wix installer by firewall extension
body: <p>I am new to <strong>Wix installer</strong>. I am trying to add <strong>firewall exception</strong> for my program. </p>
  
  <h2>My code is as follow:</h2>
  
  <pre><code>&lt;Component Id="_VIEW.EXE" Guid="*" Transitive="yes"&gt;
       &lt;File Id="view.exe"
             Name="view.exe"
             KeyPath="yes"
             Source="$(var.INSTALLSOURCE)\view.exe"&gt;
         &lt;fire:FirewallException Id="view_firewall_domain_tcp"
                                 Name="View"
                                 Protocol="tcp"
                                 Scope="any"
                                 IgnoreFailure="yes"
                                 Profile="domain" /&gt;
         &lt;fire:FirewallException Id="view_firewall_domain_udp"
                                 Name="View"
                                 Protocol="udp"
                                 Scope="any"
                                 IgnoreFailure="yes"
                                 Profile="domain" /&gt;
         &lt;fire:FirewallException Id="view_firewall_private_tcp"
                                 Name="View"
                                 Protocol="tcp"
                                 Scope="any"
                                 IgnoreFailure="yes"
                                 Profile="private" /&gt;
         &lt;fire:FirewallException Id="view_firewall_private_udp"
                                 Name="View"
                                 Protocol="udp"
                                 Scope="any"
                                 IgnoreFailure="yes"
                                 Profile="private" /&gt;
       &lt;/File&gt;
    &lt;/Component&gt;
  </code></pre>
  
  <p>In my code, I add <strong>4 firewall exception</strong> and each exception has different value for "<strong>Profile</strong>" and "<strong>Protocol</strong>" attributes. My expected result is 4 exceptions created:</p>
  
  <pre><code>NAME  GROUP   Profile   Enabled  Action  Override  Program           Local Address   Remote Address   Protocol   Local Port   Remote Port   Allowed Users  Allowed Computers
  view          Domain     Yes     Allow    No       c:\test\view.exe    Any               Any            TCP         Any         Any             Any            Any
  view          Domain     Yes     Allow    No       c:\test\view.exe    Any               Any            UDP         Any         Any             Any            Any
  view          Private    Yes     Allow    No       c:\test\view.exe    Any               Any            TCP         Any         Any             Any            Any
  view          Private    Yes     Allow    No       c:\test\view.exe    Any               Any            UDP         Any         Any             Any            Any
  </code></pre>
  
  <p>But the actual result is only one exception is created and the value of "Protocol" attribute is "any" instead of "<strong>TCP</strong>" or "<strong>UDP</strong>":</p>
  
  <pre><code>NAME  GROUP   Profile   Enabled  Action  Override  Program           Local Address   Remote Address   Protocol   Local Port   Remote Port   Allowed Users  Allowed Computers
  view          Domain     Yes     Allow    No       c:\test\view.exe    Any               Any            Any         Any         Any             Any            Any
  </code></pre>
  
  <h2>So, I have two questions:</h2>
  
  <ol>
  <li>Why is only one exception created? Must the name of the exception be unique?</li>
  <li>Why does the value of the "Protocol" attribute not take effect?</li>
  </ol>
  
  <p>I refer an official document about firewall extension:
  <a href="http://wixtoolset.org/documentation/manual/v3/xsd/firewall/firewallexception.html" rel="nofollow">http://wixtoolset.org/documentation/manual/v3/xsd/firewall/firewallexception.html</a>
  In the document, I saw some description about "File" attribute:</p>
  
  <blockquote>
    <p>Identifier of a file to be granted access to all incoming ports and protocols. If you use File, you cannot also use Program.
    If you use File and also Port or Protocol in the same FirewallException element, the exception will fail to install on Windows XP and Windows Server 2003. IgnoreFailure="yes" can be used to ignore the resulting failure, but the exception will not be added.</p>
  </blockquote>
  
  <p>Does it mean that if I set firewall rule for a program, the "Protocol" and "Port" attributes will be "Any" automatically even I set "Protocol"?</p>