Setting file permissions
WiX allows you to set the permissions that Windows users and groups have to the files that you install. You can see these permissions by right-clicking on a file and selecting the Security tab. On Windows XP, you may have to configure your system so that this tab is visible. In Windows Explorer, open the folder that you want to configure and go to Tools | Folder Options | View. Then, uncheck the box that says Use simple file sharing. The following is an example of the Security tab on a file:
To set the permissions for a file that you're installing, nest a PermissionEx
element inside the corresponding File
element. This element, which is available from WixUtilExtension
, has various attributes that can be used to define file permissions. Before you can use it, you'll need to add a reference to WixUtilExtension.dll
in your project. Go to Add Reference in Solution Explorer and select the WiXUtilExtension
assembly. Next, add the following namespace to your Wix
element...