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:
Add
UtilExtension
to the project by right-clicking on the References node in Solution Explorer and going to Add Reference... | WixUtilExtension.dll | Add | OK.Add the
UtilExtension
namespace to theWix
element:<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension...