0

I'm trying to grant full access to all users to a folder that my MSI creates within ProgramData and all the subfolders and contents within it. I'm basing my code on Wix: How to set permissions for folder and all sub folders and so my directory structure is like :

     <Directory Id="CommonAppDataFolder" Name="ProgramData">
       <Directory Id="COMPANYFOLDER_PROGDATA" Name="ACME Limited">
         <Directory Id="ACMEFOLDER_PROGDATA" Name="ACME">
           <Component Id="ACMEFOLDER_PROGDATA_Permission"  Guid="{59DDCF9A-E5B2-4733-99C1-964BBB1A8D9C}">
             <CreateFolder>
               <util:PermissionEx User="Users" GenericAll="yes"/>
             </CreateFolder>
           </Component>

I'm using WiX v3.9.1006.0 and Visual Studio 2013 Update 4; I have xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" at the top of my wix file and in the Tool Settings for the project in the Linker section, I have:

-ext "C:\Program Files (x86)\WiX Toolset v3.9\bin\WixNetFxExtension.dll"
-ext "C:\Program Files (x86)\WiX Toolset v3.9\bin\WixUIExtension.dll"
-ext "C:\Program Files (x86)\WiX Toolset v3.9\bin\WixUtilExtension.dll"

At the moment, I don't have a reference to the WixUtilExtension.dll file in Visual Studio and if I try and compile it, I get:

Error   1   The CreateFolder element contains an unhandled extension element 'util:PermissionEx'.  Please ensure that the extension for elements in the 'http://schemas.microsoft.com/wix/UtilExtension' namespace has been provided

If I add a reference to the dll - two strange things happen; firstly when I add the dll from the wix bin folder, when it appears within Visual Studio and I click on the reference, it says the version is 0.0 ?!?

If I ignore that and try and compile the project, I now get:

The extension 'Microsoft.Tools.WindowsInstallerXml.Extensions.UtilExtension' contains a defintion for table 'EventManifest' that collides with a previously loaded table definition.  Please remove one of the conflicting extensions or rename one of the tables to avoid the collision.

I have been pulling my hair out on this all afternoon and I didn't start with much hair, so I can't afford to lose anymore - so if anyone has any idea of what is going on here, it would be gratefully appreciated !!

Thanks,

Chris.

Community
  • 1
  • 1
Tall Tyke
  • 171
  • 1
  • 3
  • 14

1 Answers1

1

Well what a difference a day makes eh ?! This morning I powered up my dev PC and was determined to get to the bottom of this today - but when I opened up Visual Studio - I noticed something strange - strange but correct (!) - the version number for the referenced WixUtilExtension dll was now 3.0.0.0 - it was 0.0 when I went to bed last night !! I tried compiling the solution and it chuffing works now - so I have no idea what was going on yesterday, but to be honest I'm just happy it's all working now. Sorry for wasting the time of the 9 people who read my thread.

Tall Tyke
  • 171
  • 1
  • 3
  • 14