Using the firewall extension in WiX
Asked Answered
T

3

8

I'm trying to write a WiX script that uses the firewall extension to WiX, and it doesn't seem to find the extension dll (I think).

The error I'm seeing is this:

The File element contains an unhandled extension element 'fire:FirewallException'.
Please ensure that the extension for elements in the 'http://schemas.microsoft.com /wix/FirewallExtension' namespace has been provided.

and the relevant part of my WiX source is this:

<?xml version="1.0" encoding="windows-1252"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension">
 <Component Id="Firewall" Guid="7278f07d-de6f-497f-9267-d5feb5216a5c" Directory="NotUsed">
  <File KeyPath="yes" Source="C:\Program Files\Java\jdk1.6.0_32\bin\java.exe">
   <fire:FirewallException Id="FWX1" Name="My Program" Port="80" Protocol="tcp"/>

If i try to register the WixFirewallExtension.dll file with regsrv32 i get this error:

The module C:\Program Files (x86)\Windows Installer XML v3.5\bin\WixFirewallExtension.dll was loaded but the entry-point DllRegisterServer was not found.

Make sure that C:\Program Files (x86)\Windows Installer XML v3.5\bin\WixFirewallExtension.dll is a valid DLL or OCX file and then try again

The dll file is in my path, but that might not matter? Do i need to do anything else to get WiX to start using it?

Thwart answered 13/6, 2012 at 12:42 Comment(1)
Why did you try to register the WixFirewallExtension.dll?Schapira
T
11

Found the answer after some more digging:

I needed to specify the extension on the commandline of light.exe, like this:

light myfile.wxs -ext WixFirewallExtension -out myfile.wixobj
Thwart answered 13/6, 2012 at 13:6 Comment(2)
Do you know how to do this with the visual studio plugin? I can't find the .dll anywhereCavell
I found it in Program Files (x86)/Wix Toolset/binCavell
M
4

You must add the reference of "WixFirewallExtension.dll" inside your WIX Project to resolve the issue.

Militate answered 20/10, 2014 at 11:7 Comment(0)
K
0

Adding "WixFirewallExtension.dll" inside your WIX Project will resolve the issue. To do it follow the below steps:-

  • Open the project in visual studio.
  • Right click on wix project
  • Add reference to the above dll...
Kristofer answered 23/1, 2015 at 10:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.