Go to the source code of this file.
Functions | |
CA_API UINT __stdcall | DirectoryGetDcName (MSIHANDLE hInstall) |
The DsGetDcName function returns the name of a domain controller in a specified domain. |
CA_API UINT __stdcall DirectoryGetDcName | ( | MSIHANDLE | hInstall | ) |
The DsGetDcName function returns the name of a domain controller in a specified domain.
The DsGetDcName function returns the name of a domain controller in a specified domain. This function accepts additional domain controller selection criteria to indicate preference for a domain controller with particular characteristics.
DS_COMPUTERNAME | Optional string that specifies the name of the server to process this function. |
DS_DOMAINNAME | Optional string that specifies the name of the domain or application partition to query. |
DS_SITENAME | Optional string that specifies the name of the site where the returned domain controller should physically exist. |
DS_FLAGS | Contains a set of flags that provide additional data used to process the request. |
See http://msdn.microsoft.com/en-us/library/ms675912(VS.85).aspx for details about flags and parameters.
<Binary Id="ActiveDirectory" SourceFile="$(var.BinDir)\ActiveDirectory.dll" /> <CustomAction Id="SetDSFlags" Property="DS_FLAGS" Value="DS_IP_REQUIRED|DS_ONLY_LDAP_NEEDED|DS_RETURN_DNS_NAME" /> <CustomAction Id="FindActiveDirectory" BinaryKey="ActiveDirectory" DllEntry="DirectoryGetDcName" Execute="immediate" Return="check" /> <CustomAction Id="SetActiveDirectoryProperty" Property="ACTIVE_DIRECTORY_SERVER_DISPLAYED" Value="[DS_DOMAINCONTROLLER_NAME]" /> <InstallUISequence> <Custom Action="SetDSFlags" After="CostInitialize">1</Custom> <Custom Action="FindActiveDirectory" After="SetDSFlags">1</Custom> <Custom Action="SetActiveDirectoryProperty" After="FindActiveDirectory">1</Custom> </InstallUISequence>
© Application Security Inc. - All Rights Reserved | http://msiext.codeplex.com |