Book Image

WiX Cookbook

By : Nicholas Matthew Ramirez
1 (1)
Book Image

WiX Cookbook

1 (1)
By: Nicholas Matthew Ramirez

Overview of this book

Table of Contents (20 chapters)
WiX Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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:

  1. Create a new setup project and name it FolderPermissionsInstaller.

  2. 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 Component element to include it in the installation:

    <ComponentGroup Id="ProductComponents"  
                    Directory="INSTALLFOLDER">
      <Component Id="cmpSampleTXT" 
                 Guid="{79972677-2109-471C-A8FE-58A255CE43E3}">
        <File...