Share via


Perform an unattended install of an ADAM instance

Applies To: Windows Server 2003 R2

In addition to using the Active Directory Application Mode Setup Wizard, you can install Active Directory Application Mode (ADAM) without user intervention. An unattended ADAM installation requires an answer file (Answer.txt) that contains a set of preconfigured installation options.

To perform an unattended install of an ADAM instance

  1. Using any text editor, create a new text file. (As an option, you can copy and paste the sample answer file below into your answer file.)

  2. Specify the installation parameters, as described in the table below.

  3. Save your answer file.

  4. At a command prompt (or in a batch or script file), change to the drive and directory that contains the ADAM setup files, and then type the following command:

    Adamsetup /c:"adaminstall.exe /answer:drive:\pathname\filename.txt"

    where drive:\pathname\filename.txt represents the drive, path, and file name of your answer file. (The double quotation marks in the command are required.)

Notes

  • To open a command prompt, click Start, point to All programs, point to Accessories, and then click Command prompt.

  • The following table describes the parameters that can be used in an ADAM answer file. These parameters are not case sensitive. In other words, you can specify either InstallType or installtype in your answer file. However, case is preserved on the values that you specify for the instancename and servicepassword parameters.

    Parameter Possible values Default behavior if the parameter is not present in the answer file

    InstallType

    Valid for all installations.

    Optional.

    Unique — Creates a unique instance of ADAM.

    Replica — Creates an instance of ADAM by replicating all or part of an existing ADAM instance, either over the network or from restored backup media.

    When values are also specified in the answer file for the ReplicationDataSourcePath and ReplicationLogSourcePath parameters, and when InstallType is set to Replica, ADAM setup installs an ADAM replica instance from restored backup media. If values for those parameters are not present, ADAM setup installs an ADAM replica instance over the network. For more information about installation from media, see Install an ADAM replica from media.

    Tools — Installs ADAM tools only.

    Any other value — Returns "Invalid installation type specified in InstallType" error message.

    Same behavior as Unique

    ShowOrHideProgressGUI

    Valid for all installations.

    Optional.

    Show — ADAM setup displays progress information during installation.

    Hide — ADAM setup does not display progress information during installation.

    Same behavior as Hide

    InstanceName

    Valid for all installations.

    Optional.

    An ADAM instance name must meet the following requirements:

    • It must be unique with respect to other ADAM instances running on the same computer.

    • It must be no longer than 44 characters.

    • It must use characters only from the ranges of a through z, A through Z, or 0 through 9.

    The instance will be named Instancen, where n is the lowest number greater than 0 and Instancen is unique on the local computer.

    ApplicationPartitionsToReplicate

    Valid only for replica installations.

    Optional.

    Specify the distinguished names of the application partitions to replicate from the source ADAM instance.

    The following example specifies three application partitions to replicate:

    ApplicationPartitionsToReplicate = "CN=my,O=partition" "DC=partition2" "CN=embed qu\"ote in DN"

    To replicate all application partitions from the source ADAM instance, specify "*" as the value. Any value that is specified for ApplicationPartitionsToReplicate is ignored if InstallType is not set to Replica.

    No application partitions are replicated.

    ReplicationDataSourcePath

    Valid only for replica installations.

    When a value for this parameter is present, ADAM setup attempts an installation from media. If the value for this parameter is not valid, ADAM setup writes an error to the setup log.

    Specify the directory path to a restored instance of ADAM data. Any value that is specified for ReplicationDataSourcePath is ignored if InstallType is not set to Replica or if a value is not also specified for ReplicationLogSourcePath.

    Application data is replicated over the network, rather than from a restored backup of an ADAM instance. If a value is specified for this parameter, but not for ReplicationLogSourcePath, an error occurs.

    ReplicationLogSourcePath

    Valid only for replica installations.

    When a value for this parameter is present, ADAM setup attempts an installation from media. If the value for this parameter is not valid, ADAM setup writes an error to the setup log.

    Specify the directory path to the log file for a restored instance of ADAM. Any value that is specified for ReplicationLogSourcePath is ignored if InstallType is not set to Replica or if a value is not also specified for ReplicationDataSourcePath.

    Application data is replicated over the network, rather than from a restored backup of an ADAM instance. If a value is specified for this parameter, but not for ReplicationDataSourcePath, an error occurs.

    LocalLDAPPortToListenOn

    Required for all installations.

    389 or any unused port number between 1025 and 65535, inclusive.

    Any other value — Returns "Invalid local LDAP port specified."

    Defaults to 389. Or, if 389 is not available, defaults to the first available port equal to or greater than 50000.

    LocalSSLPortToListenOn

    Required for all installations.

    636 or any unused port number between 1025 and 65535, inclusive.

    Any other value — Returns "Invalid local SSL port specified."

    Defaults to 636. Or, if 636 is not available, defaults to the first available port equal to or greater than 50000.

    SourceServer

    Required for replica installations.

    A valid DNS name or network basic input/output system (NetBIOS) name.

    Any other value — If the installation type is replica, returns "Invalid syntax for replication source server," else do nothing.

    If the installation type is replica, returns "Replication source server not specified," else do nothing.

    SourceLDAPPort

    Required for replica installations.

    Either 389 or a number between 1025 and 65535.

    Any other value — If the installation type is replica, returns "Invalid replication source port specified," else do nothing.

    If the installation type is replica, returns "Replication source port not specified," else do nothing.

    NewApplicationPartitionToCreate

    Valid for installations of new, unique ADAM instances.

    Optional.

    A valid distinguished name — Creates an application partition with the specified name.

    "" (empty string) — No new application partition will be created.

    Any other value — If the installation type is unique, returns "Invalid application partition syntax in NewApplicationPartitionToCreate," else do nothing.

    Same behavior as ""

    DataFilesPath

    Valid for all installations.

    Optional.

    A syntactically correct path name, which may include unresolved environment variables that do not contain existing ADAM files.

    Any other value — Returns "Invalid path in DataFilesPath."

    Store data files in Program Files\Microsoft ADAM\instancename\data.

    LogFilesPath

    Valid for all installations.

    Optional.

    A syntactically correct path name, which may include unresolved environment variables that do not contain existing ADAM files.

    Any other value — Returns "Invalid path in LogFilesPath."

    Stores log files in Program Files\Microsoft ADAM\instancename\data

    ServiceAccount

    Valid for all installations.

    Optional.

    A valid DNS domain name, followed by a backslash and the account or group name.

    A valid NetBIOS domain name, followed by a backslash and the account name.

    A valid user principal name (UPN).

    A valid account name only. (This is generally not recommended, because resolving an account name that is not accompanied by a domain name requires additional processing.)

    Any other value — Returns "Invalid user specified in ServiceAccount."

    This instance of ADAM will run under the Network Service account.

    AddPermissionsToServiceAccount

    Valid for all installations.

    Optional.

    Yes — ADAM setup attempts to add the Log on as a service right to the account that is specified as the service account.

    Any other value — ADAM setup does not attempt to add the Log on as a service right to the account that is specified as the service account.

    ADAM setup does not attempt to add the Log on as a service right to the account that is specified as the service account.

    ServicePassword

    Valid for all installations.

    Required, unless ServiceAccount is the Network Service account.

    Any string of characters, including the empty string.

    If ServiceAccount is the Network Service account, do nothing; otherwise, returns "No password specified in ServicePassword."

    Administrator

    Valid for all installations.

    Optional.

    A valid DNS domain name, followed by a backslash and the account name.

    Do not specify built-in groups or built-in accounts, such as DOMAIN\Administrators. Instead, if you want to specify a group, specify a domain group, such as domainname\Domain Admins, where domainname represents the name of your domain.

    A valid NetBIOS domain name, followed by a backslash and the account name.

    A valid UPN.

    A valid account name only. (This is generally not recommended, because resolving an account name that is not accompanied by a domain name requires additional processing.)

    Any other value — Returns "Invalid user specified in Administrator."

    The currently logged on user will have administrator permissions on this instance of ADAM.

    ShowInAddRemovePrograms

    Valid for all installations.

    Optional.

    Show — Lists the ADAM instance in Add or Remove Programs.

    Hide — Does not list the ADAM instance in Add or Remove Programs

    The installed ADAM instance is shown in Add or Remove Programs.

    ImportLDIFFiles

    The optional .ldf files (ms-User.ldf, ms-InetOrgPerson.ldf, ms-UserProxy.ldf, and ms-azman.ldf) that you want to import into the ADAM schema. The file names must be enclosed in double quotation marks, delimited with a space (" ").

    None of the optional .ldf files are imported.

    SourceUserName

    SourcePassword

    Valid for replica installations.

    Optional.

    The user name and password of an account that has administrative rights for an existing configuration set. Use these parameters when installing a replica that is being joined to the configuration set.

    The replica is joined to the configuration set using the credentials of the logged on user.

  • The following represents a sample answer file for use with adaminstall.

    [ADAMInstall]
    
    ; The following line specifies to install a unique ADAM instance.
    InstallType=Unique
    
    ; The following line specifies the name to be assigned to the new instance.
    InstanceName=MyFirstInstance
    
    ; The following line specifies the communications port to use for LDAP.
    LocalLDAPPortToListenOn=389
    
    ; The following line specifies an application partition to create
    NewApplicationPartitionToCreate="o=microsoft,c=us"
    
    ; The following line specifies the directory to use for ADAM data files.
    DataFilesPath=C:\Program Files\Microsoft ADAM\instance1\data
    
    ; The following line specifies the directory to use for ADAM log files.
    LogFilesPath=C:\Program Files\Microsoft ADAM\instance1\data
    
    ; The following line specifies the .ldf files to import into the ADAM schema.
    ImportLDIFFiles="ms-inetorgperson.ldf" "ms-user.ldf"
    
  • For both installs and uninstalls, ADAM uses a registry key to return error codes and messages back to the caller, for example, an .msi package. ADAM Setup creates this registry key and associated values only if errors or warnings occur. This registry key is HKLM\Software\Microsoft\Windows\CurrentVersion\ADAM_Installer_Results, and it includes the possible values in the following table.

    Key Contents

    ADAMInstallErrorCode

    The numeric error code that caused the installer to fail

    ADAMInstallErrorMessage

    A message that is associated with the install error code

    ADAMInstallWarnings

    Messages that are associated with the install warnings

    ADAMUninstallErrorCode

    The numeric error code that caused the uninstall to fail

    ADAMUninstallErrorMessage

    A message that is associated with the uninstall error code

    ADAMUninstallWarnings

    Messages that are associated with the uninstall warnings

See Also

Concepts

Starting the ADAM Setup Wizard
Install ADAM
Manually register ADAM service principal names in Active Directory
Adaminstall