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

Creating a file share


Sometimes, an application needs to allow others on the network to access its files. For example, it may produce log files that should be available to anyone who wants to see them without having to first log onto the computer where the application is installed. By putting those files into a file share, others on the network can access them. In this recipe, we'll see how to convert a normal directory into a file share and set the permissions on it.

Getting ready

To prepare for this recipe, create a new setup project and call it FileShareInstaller.

How to do it…

To create a file share, use the FileShare element of UtilExtension and then configure its permissions with the FileSharePermission element:

  1. Reference UtilExtension by right-clicking on the References node in Solution Explorer, going to Add Reference… | Browse, and then adding WixUtilExtension.dll.

  2. Add the UtilExtension namespace to the Wix element in Product.wxs:

    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi...