This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Need to Validate Domain and Group
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 12, 2012
09:26 AM
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.
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.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 12, 2012
02:54 PM
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.
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.