Custom Dialog to list users in a domain.
I am a newbie to Install Shield. I have to do the following things.
1. Diaplay a custom dialog with 2 combo boxes and 1 text box.
2. Fill one combo box with all the domains available.
3. Fill the other combo box with the users available in the domain that was selected in the first combobox.
4. Using these values i need to register a NT service and set its RunAs to the selected user.
To list the users and domains ASDI is a good option, but how do we program for ASDI from IS. I have a VB code which does, can in use this in any way to populate these combo boxes.
Where can i find sample codes for the above......
thanks in advance
For an MSI project.
In addition to the two combo boxes, you will need a push button to attach an event to.
1. Before your dialog is loaded (early on in the UI sequence) run your code to list all domains. Your VB code is fine, you can call it from a VBS custom action - returning the result as CSV or similar.
2. For each domain in the list run add a temporary row to the combobox table for the "domain" property. Plenty of posts in this forum on populating a combobox at runtime.
3. The Domain combo box is now populated. Attach a custom action to a pushbutton on your dialog which calls your list users VB code for the selected domain(value of domain combobox property) returning CSV or similar. The CA takes the csv, and adds a temporary row to the user combobox for each user.
The push button is required, as there isn't an easy way to fire an action on change of a combobox value.
Hope this helps a little.
Thanks a lot for your reply. Ive used the wizard to create a standard project. How do I get about with doing the same in
a standard project, is it different from doing it in a MSI project.
Wat is CSV and how do i use it.
I have no idea how "standard" projects work.
CSV - Comma seperated values. essentially a list.