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 file for a user


Although setting access at the folder level is good for quickly securing all of your files in one fell swoop, we can still fine-tune permissions on a file-by-file basis. This might be useful, for example, if you have a main executable that can be run by anyone but another administrative utility that should only be run by certain users.

In this recipe, we'll install a text file and update its permissions so that our user Joe has full access.

Getting ready

To prepare for this recipe, perform the following steps:

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

  2. Add a text file named Sample.txt to the project and then add a Component element to include it in the installation:

    <ComponentGroup Id="ProductComponents"
                    Directory="INSTALLFOLDER">
      <Component Id="cmpSampleTXT"
                 Guid="{FB746118-B1E5-42DC-AA76-862C4E1EABCF}">
        <File Source="Sample.txt">
        </File>
      </Component>
    &lt...