See Update Below
I have been reading about creating custom dialogs for a .NET setup project at Code Project (http://www.codeproject.com/KB/install/vsSetupCustomDialogs.aspx) and I 开发者_StackOverflow社区have the Orca tool installed and understand how to customize the dialogs.
One thing, however, I can't seem to figure out. Is it possible to have a dialog that displays a list of the users on the machine with a checkbox for each user (dynamic list of checkboxes)? How can I pass my user list to the dialog or have some custom code for the dialog besides just editing property tables.
I am installing a proxy and what to give the admin the option of which users will use the proxy. The proxy is used to monitor Internet usage.
UPDATE: I am only concerned about the list of local users on the machine not domain users.
UPDATE OK, I guess I can sum up my question in a more basic way. Is there a way to have an install dialog that has a dynamic list of checkboxes that is determined by a condition/method that is evaluated when the dialog is shown?
Getting a list of users on a machine is, really, not possible. In a domain joined situation there could (and almost certainly will) be users that are able to logon to a given machine but who have never previously done so. An immediate example is "Domain Admins", who are granted the right to logon to a PC by virtue of being members of the "Domain Admins" group, rather than by their specific user being added to any local group on the machine.
If you want to give the admin the option of providing exceptions, your best bet would be to use the Active Directory Object Selection dialog (more up-to-date samples/versions almost certainly exist!) and let the administrator choose exceptions rather than inclusions.
精彩评论