How to Automate Windows 2000 Setup and Domain Controller Setup

This article was previously published under Q224390
This article has been archived. It is offered "as is" and will no longer be updated.
In Microsoft Windows NT, you can automate the installation of a domain controller using unattended Setup, or while performing a normal, attended installation. In Windows 2000, domain controllers are created after setup, even if you are upgrading to Windows 2000. You can also use a script to run the domain controller promotion (Dcpromo.exe) process. It may be useful to combine Dcpromo.exe with unattended Setup to automate the installation of Windows 2000 and the creation of a domain controller. This article describes how to automate the installation of Windows 2000 and the creation of a domain controller.
More information
To add this task to your unattended Setup file, use either of the following methods:

Method 1

Add the appropriate information to the unattended Setup file [DCInstall] and [GUIRunOnce] sections.

Method 2

Create a separate answer file for the Dcpromo process, using the unattended Setup file [GUIRunOnce] section to start the promotion process.

The Dcpromo process can be scripted by using the dcpromo /answer:%path_to_answer_file% command. In the following example, the [DCInstall] section and parameters are added directly to the unattended answer file. To obtain the parameters for the [DCInstall] section, refer to the unattended Setup documentation.

NOTE: Because this process occurs after setup, the answer file created is named $winnt$.inf and is copied to the \system32 folder. Because the parameters are in this file, you must add the following text to the [GUIRunOnce] section of the unattended Setup answer file:
[GUIRunOnce]"DCpromo /answer:%systemroot%\system32\$winnt$.inf"				
The Dcpromo.exe tool cannot properly interpret system environmental variables such as %windir% and %systemroot%, so they can be used in case the install folder is different in other computers. If the parameters in the [DCInstall] section need to be unique, you can use Unique Database Files (UDF) to change these parameters.

Also, when the Dcpromo process completes, password information is removed from this section of the $winnt$.inf file. To make this process easier because the Run-once command does not execute until someone logs on to the computer, you can add the following text to the unattended answer file:
[GUIUnattended]Autologon = yes ; automatically logs on the administrator accountAutoLogoncount = n ; number of times to perform auto-admin logon				
If you want to create a separate answer file for Dcpromo, the [GUIRunOnce] section and autologon can still be used if you make sure you can obtain access to the file after setup.
Unattended Setup

Article ID: 224390 - Last Review: 10/26/2013 05:33:00 - Revision: 3.0

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • kbnosurvey kbarchive kbhowto kbnetwork kbsbk kbsetup KB224390