Jump to content

how to display local group properties dialog?


orbs
 Share

Recommended Posts

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.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
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().

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...