cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tsnelson1
Level 3

Need to Validate Domain and Group

I have a project that I am working on that requires Group Authorization for an IIS Web Site. During Installation, I ask the user for Domain Name and Group Name to assign Group Rights to.

I have found nice dialog examples from LogonInfoCreateUser Dialog for getting Domain and Group Lists, and how to select them from a ComboBox, but I have no idea how to validate the Domain and Group are Valid.

I have been trying to find some VBScript that I could convert to a Custom Action, and know how to get a Group from a local computer's Domain, but am struggling to find out how to get ANY Domain name into a "DC" format for LDAP queries. Does anyone know if I can do this, or if there is an easier way to validate a Group?

Any help would be appreciated.
Labels (1)
0 Kudos
(1) Reply
tsnelson1
Level 3

Ok, I found a solution that works for me.

Because I need both a Domain and Group, I can run ISNetGetGroups to validate the Domain, and then I can use VBScript Custom Action to Validate the Group through the Session Database:

strGroup = Session.Property("IS_NET_API_GROUP")
' open and execute a view to the ListBox table
Set oView = Session.Database.OpenView("SELECT * FROM `ListBox`")
oView.Execute
Do
Set rec=oView.Fetch
If rec Is Nothing Then Exit Do
if rec.StringData(3) = strGroup then
Session.Property("IS_NET_API_VALID_GROUP") = "1"
End if
Loop
oView.Close

Finally I will Change the Dialog if the IS_NET_API_VALID_GROUP = "1".

I hope someone in the future will find this helpful.
0 Kudos