Sign in to follow this  
Followers 0
orbs

how to display local group properties dialog?

4 posts in this topic

manually: right-click "Computer" (in Start Menu or in Windows Explorer), choose "Manage". in "System Tools", expand "Local Users and Groups", and select "Groups". pick a group from the list and double-click it. you get the "Properties" dialog for the selected group.

how to display the same dialog by a command?

i looked into mmc.exe and control.exe, but i find their command-line switches too general to be adequate.

background: i've written an installer for an in-house tool, which - among other things - creates a local group of users authorized to operate the said tool. after installation, an administrator is supposed to manually add at least one other user to that group. (this must be a local group and cannot be an AD group, although members can be local or AD users).

to encourage the admin (who is performing the installation) not to skip that, i want the installer to display the properties of the local group, so its easy to see who are the existing members, and add users if required.

sure, i can script that with WMI - enumerate group members, display an input box for user name, add to group. but the built-in Windows GUI is already there, and has search features, so it's kind of senseless to reinvent the wheel.

any ideas are welcome.

Share this post


Link to post
Share on other sites



lusrmgr.mmc ?

 

Share this post


Link to post
Share on other sites

thanks, that seems to be the closest i can get (B.T.W its lusrmgr.msc, not lusrmgr.mmc). i'll work with that and with ControlListView().

Share this post


Link to post
Share on other sites

I'd recommend creating an AD group with the users in it and "hard code" that group into the script.  One less thing for the "admin" to miss or mess up.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0