I have not used the WixFirewallExtension to open a port, rather I use it to register my application with the Windows Firewall, which then allows the application to receive anonymous input when it is launched. (I understand this is prefered to opening a port in general.) <Component Id="my.exe" > <File Id="my.exe" KeyPath="yes" Source="!(bindpath.mysource)\eis.exe" > <fw:FirewallException Id="my.exe" Name="Company Application Name" Profile="all" Scope="localSubnet" IgnoreFailure="yes" /> </File> </Component>
To use the above fw:FirewallException I also add a namespace to the header of the wxs file: <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:fw="http://schemas.microsoft.com/wix/FirewallExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" > And add a 'reference" to the WixFirewallextension in SolutionExplorer. The WixFirewallExtension supports the parameters of the Windows Firewall (and not the Windows Advanced Firewall on vista or later) so it is not possible using this extension to set 'groups', 'port ranges' or other Windows Advanced Firewall parameters. But I have seen threads in this forum where folks use preprocessor macros to enter the FirewallException many times changing the port parameter to create the effect of defining a range of ports. Regarding the question about how to pass in a parameter, yes the process is similar: 1) Define a Variable in your bundle. Value is a default value. I use Persisted and I also implement the Remember Property pattern in the MSI in case the MSI is launched 'on-demand'. The key is to set Overridable so that your BA can modify it. <Variable Name='myPort' Value='4664' Type='string' Persisted='yes' bal:Overridable='yes'/> 2) Use MsiProperty to pass it down to the MSI as a public property. <MsiProperty Name='MYPORT' Value='[myPort]' /> 3) The above fw:FirewallException would include something like port=[MYPORT]. See the schema in the chm file. In your BA use Engine.StringVariables as you indicated, prior to calling Engine.Apply typically in PlanComplete. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/allowing-user-to-set-firewall-exception-port-number-tp7600419p7600457.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users