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

Adding a new user to an existing group


After creating a new user, you may want to add them to a group that already exists on the computer. For example, members of the Users group can do basic things such as run applications and access local and network printers. Adding your user to this group is a quick way to give them this limited access. It's pretty simple to do this using the UtilExtension namespace, as we'll see.

Getting ready

To prepare for this recipe, add a new setup project and name it NewUserExistingGroupInstaller.

How to do it...

After referencing an existing group with the Group element, add a user to it with the GroupRef element, as shown in the following steps:

  1. Add UtilExtension to the project by right-clicking on the References node in Solution Explorer and going to Add Reference... | WixUtilExtension.dll | Add | OK.

  2. Add the UtilExtension namespace to the Wix element:

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