Changing the permissions on a folder for a user
When you set permissions on a folder, all of the files that are created within that folder after that point will inherit those permissions. This accommodates the Windows Installer's sequence, which as luck would have it, creates folders first and then adds files to them. This means we can set permissions once and let them trickle down. In this recipe, we'll give a user named Joe full access to a folder.
Getting ready
To prepare for this recipe, perform the following steps:
- Create a new setup project and name it
FolderPermissionsInstaller
. - Add a text file named
Sample.txt
to the project. After installation, we can verify that the permissions that were set on the folder propagated to this file. Add a ...
Get WiX Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.