views:

350

answers:

1

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 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?

+1  A: 

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.

Rob
Thanks for the advice. This application is not for this type of situation. It is intended for local users of the machine. This might be installed on a server (2003, 2008) or on a PC (XP, Vista, 7).I can get a list of local users no problem but is there a way to do this in a install dialog?
modernzombie
@modernzombie: "I can get a list of local users no problem but is there a way to do this in a install dialog" - Yes, it is. Unfortunately, there's no way to do it by using Orca as your only tool. You need to create so called *custom action*, which will be invoked at the appropriate time, get a list of users (or whatever list you want, actually), which can be used to populate you listbox.
Igor Korkhov