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 ...

Get WiX Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.