Matthew Rohrich
Matthew Rohrich

Reputation: 123

Add user group to another user group with wix v3

I need to add group within a group e.g. COMPUTER\Users group to the "Backup Operators" group.

Wix provides a way to add a user to a group using the GroupRef Element but does not seem to provide an obvious way to add a group

Can this be done? If so how?

Upvotes: 0

Views: 1431

Answers (2)

Stein Åsmul
Stein Åsmul

Reputation: 42186

Some resources:

http://msdn.microsoft.com/en-us/library/aa370283(VS.85).aspx (Local Group Functions) http://support.microsoft.com/kb/119671 (link seems to be broken, leaving in for now)

I got some C++ code that wraps user and group creation, and as I recall adding groups to groups should be possible with relative ease. Unfortunately I no longer have access to that code-base, perhaps the Boost library has support, or a simple VBScript should suffice.

I don't like to make software recommendations, but I have found that the VbsEdit application features a large library of standard VBScript samples - perhaps you can find a ready made script in its' sample library.

Upvotes: 1

Rob Mensching
Rob Mensching

Reputation: 35976

You'd need to write a CustomAction. It probably wouldn't take too much to extend the existing User and Group CustomAction in the WiX toolset to support this. In fact, there is a feature request open for this behavior in the WiX toolset today. Maybe you could contribute the fix?

Upvotes: 4

Related Questions