Re: [WiX-users] allowing user to set firewall exception port number
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.) lt;Component Id=my.exe lt;File Id=my.exe KeyPath=yes Source=!(bindpath.mysource)\eis.exe lt;fw:FirewallException Id=my.exe Name=Company Application Name Profile=all Scope=localSubnet IgnoreFailure=yes / lt;/File lt;/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
Re: [WiX-users] allowing user to set firewall exception port number
Hi All Does anyone have any suggestions regarding this? I read the following post on stackoverflow which shows how to change the installation location: http://stackoverflow.com/questions/15019135/wix-how-to-access-change-installation-directory-in-managed-bootstrapper can I do something similar to achieve what I want? I.e. user inputs port number for firewall exceptions defined in components.wxs. Thanks. -Original Message- From: Gareth Price [mailto:gar...@genpoint.co.za] Sent: Tuesday, May 26, 2015 12:21 To: wix-users@lists.sourceforge.net Subject: [WiX-users] allowing user to set firewall exception port number Hi I am still new to wix and am having trouble working out how I can do this, if anyone could point me in the right direction I would be very grateful! I am building a custom installer using wix wpf and would like my users to enter in a firewall port, creating the UI has not been a problem and I have found that I can use a string variable to set the required port number as follows: BootStrapper.Engine.StringVariables[port] = 3000; BootStrapper.Engine.Plan(Wix.LaunchAction.Install); From here im not sure how to set my firewall exception in my components.wxs file, do I set an MsiProperty in my bundle.wxs file? If so then how do I access that property from components.wxs ? Thanks Gareth -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users