Reader small image

You're reading from  WiX Cookbook

Product typeBook
Published inJan 2015
Reading LevelBeginner
Publisher
ISBN-139781784393212
Edition1st Edition
Languages
Right arrow
Author (1)
Nicholas Matthew Ramirez
Nicholas Matthew Ramirez
author image
Nicholas Matthew Ramirez

Nick Ramirez is a software developer living in Columbus, Ohio. As a believer that deployment shouldn't be terrifying, he has become a big fan of technologies such as WiX. His other related interests include build automation, software architecture, and playing Minecraft. Nick lives with his wife and two cats.
Read more about Nicholas Matthew Ramirez

Right arrow

Adding an existing user to a new group


If you'd like to give an existing user access to your software, you'll need a way to reference their account and then add it to the group you're creating. For example, user Alice already exists on the system and you'd like to add her to a new group called Supervisors. As a side note, you would typically ask for that username through a UI wizard. Then, save the username to a WiX property. Properties can be accessed in other elements by using a square bracket notation, as follows:

<util:User Id="myNewUser" Name="[USERNAME]" />

The UtilExtension namespace doesn't include an element to create a new group. So, we'll return to Community MSI Extensions. In this recipe, we'll locate an existing user account and add it to our Supervisors group.

Getting ready

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

How to do it...

Use the elements from UserPrivilegesExtension to find an existing user and add it to a...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
WiX Cookbook
Published in: Jan 2015Publisher: ISBN-13: 9781784393212

Author (1)

author image
Nicholas Matthew Ramirez

Nick Ramirez is a software developer living in Columbus, Ohio. As a believer that deployment shouldn't be terrifying, he has become a big fan of technologies such as WiX. His other related interests include build automation, software architecture, and playing Minecraft. Nick lives with his wife and two cats.
Read more about Nicholas Matthew Ramirez