I’m using the msbuild heat wrapper to generate the component list for my website installer, and trying to figure out how to define permissions on a folder deep in that tree.
In my generated wxs file I’ve got
<Directory Id="dirC092054A3A348CC48B696FD466A89A2F" Name="ExportFiles">
<Component Id="cmp699347B0054EDD7DD7B0935D39A66FAE" Guid="{5037..}">
<File Id="..." KeyPath="yes" Source="SourceDir\Reports\ExportFiles\donotdelete.txt" />
</Component>
</Directory>
And I realise I could use a CreateFolder and Permission element here, but this file is regenerated on the prebuild so I’d loose my changes each time. Is there a was of setting the permission on the ExportFiles folder from within my main Product.wxs file?
Create a custom action and then set the permission on the folder. Use this code
This code will make the folder shared to everyone.