List Active Directory Domains / DCs
Does anyone have a method created for displaying Active Directory Domains and Domain Controllers in an Installer project? Could you provide a high level way of doing this? I'm familiar with VBscript and ADSI but not The IS Install Script.
Basically VBScript and InstallScript are very similar when using ADSI to perform LDAP queries. They both use CreateObject and GetObject along with standard COM calling conventions, and they both keep datatypes simple ( VBScipt = VARIANT where InstallScript is NUMBER or STRING ).
The key difference is InstallScript lacks native collection enumeration. There is an example over on www.InstallSite.org that uses a C++ DLL and InstallScript wrapper function to provide collection enumeration so that won't be too big of a deal. There have been posts in this forum explaining how to use it.
Here is an old thread where I show examples of ADSI WINNT Provider using both InstallScript and VBScript:
Here is a link to InstallSite Collection Enumeration ( GetObject ForEach )
So basically once you know how to write LDAP queries and enumerate the results in InstallScript it's just a matter of figuring out what your query is.
for contact information