Automating Server Installation and Upgrade |
The answer file is a customized script that answers the Setup questions without requiring user input. The Windows 2000 Server CD contains a sample answer file that you can edit and use. The answer file is usually named Unattend.txt, but you can rename it. (For example, Comp1.txt, Install.txt, and Setup.txt are all valid names for an answer file, as long as those names are correctly specified in the setup command.) This allows you to build and use multiple answer files if you need to maintain different scripted installations for different parts of your organization. Note that answer files are also used by other programs such as Sysprep, which uses the optional Sysprep.inf file.
The answer file tells Setup how to interact with the distribution folders and files you have created. For example, in the [Unattend] section of the answer file there is an "OEMPreinstall" entry that tells Setup to copy the $OEM$ subfolders from the distribution folders to the target computer.
The answer file contains multiple optional sections that you can modify to supply information about your installation requirements. The answer file supplies Setup with answers to all the questions that you are asked during a standard interactive installation of Windows 2000. The Unattend.doc file has detailed information about answer file keys and values. For more information about answer file sections and their associated parameters, see the "Microsoft Windows 2000 Guide to Unattended Setup" (Unattend.doc) on the Windows 2000 operating system CD. The Unattend.doc file is part of the Deploy.cab file in the \Support\Tools folder. On Windows 98 or Windows 2000, use Windows Explorer to extract this document. In Windows 95 and earlier, or from
To perform an unattended installation of Windows 2000 Server, you must create an answer file and specify that file when Setup begins, either by using the bootable CD method, or by running Winnt.exe or Winnt32.exe. The following is an example of a setup command using Winnt.exe:
Winnt /S:Z:\I386 /U:Z:\unattend.txt
Note the use of the /U: command-line switch, which indicates an unattended installation when used with the Winnt command (/unattend is the parameter used with the Winnt32 command to tell Setup to run in unattended mode). For more information about Winnt.exe and Winnt32.exe, see "Reviewing the Windows 2000 Setup Commands" later in this chapter.
The answer file is a customized script that you can use to run an unattended installation of Windows 2000 Server. There are two ways to create an answer file: You can use Setup Manager, or you can create the file manually.
To help you create or modify the answer file, the Setup Manager application is available on the Microsoft® Windows® 2000 Server Resource Kit companion CD in the Deploy.cab file of the \Support\Tools folder. By using Setup Manager, you can add consistency to the process of creating or updating the answer file.
You can use Setup Manager to perform the following tasks; it then generates the results as answer file parameters:
Setup Manager cannot perform the following functions.
Table 13.3 describes some of the most common answer file specifications that are created by Setup Manager.
Table 13.3 Answer File Specifications Created by Setup Manager
Parameter | Purpose |
---|---|
Installation path | Specifies the desired path on the target computer in which to install Windows 2000 Server. |
Upgrade option | Specifies whether to upgrade from Windows 95 or Windows 98, Windows NT, or Windows 2000. |
Target computer name | Specifies the user name, organization name, and computer name to apply to the target computer. |
Product ID | Specifies the product identification number obtained from the product documentation. |
Workgroup or domain | Specifies the name of the workgroup or domain to which the computer belongs. |
Time zone | Specifies the time zone for the computer. |
Network configuration information | Specifies the network adapter type and configuration with network protocols. |
Note
When installing Windows 2000 Server, you are not initially required to create domain controllers. You can create member servers and then promote them to domain controllers later using the Active Directory Installation Wizard (dcpromo.exe).
To create the answer file manually, you can use a text editor such as Notepad. In general, an answer file consists of section headers, parameters, and values for those parameters. Although most section headers are predefined, you can also define additional section headers. Note that you do not have to specify all possible parameters in the answer file if the installation does not require them.
Invalid parameter values generate errors or result in incorrect behavior after Setup.
The answer file format is as follows:
[section1]
;
; Section contains keys and the corresponding
; values for those keys/parameters.
; Keys and values are separated by ' = ' signs.
; Values that have spaces in them usually require double quotes
; "" around them.
;
key = value
.
.
[section2]
key = value
.
.
Using the answer file with Setup allows you to set parameters for the following password commands:
For definitions of these commands, see the "Microsoft Windows 2000 Guide to Unattended Setup" (Unattend.doc) on the Windows 2000 operating system CD. The Unattend.doc file is part of the Deploy.cab file in the \Support\Tools folder. On Windows 98 or Windows 2000, use Windows Explorer to extract this document. In Windows 95 and earlier, or in
Note
Passwords are limited to 127 characters. If you specify a password that contains more than 127 characters, you will not be able to log on to the system because the password will be invalid.
After the installation is completed, an answer file with all the settings used to configure the computer remains on the computer; however, all password information is removed from the local copy of the answer file so that security is not compromised.
Caution
During the Setup process, however, the answer file is available on the hard disk. If you are concerned about the security implications, do not add password information to the answer file that you created for the unattended installation.
This local answer file allows you to automatically set up optional components by running commands that contain the parameters you already provided in the original answer file that was used with Setup. These components can include configuring the server as a domain controller, as a cluster server, or enabling Message Queuing.
You can start an install on a small partition (about 1 gigabyte [GB] on a larger disk) and cause that partition to be extended during the Windows 2000 setup process by using the ExtendOEMPartition parameter in the answer file. The ExtendOEMPartition parameter works only on NTFS partitions and can be used in both a regular answer file and one used for a Sysprep-based installation.
For more information about Sysprep and the Sysprep.inf file, see "Using Sysprep to Duplicate Disks" later in this chapter.
Note
ExtendOEMPartition acts only on the active system partition. It does not work on other partitions on the same hard disk or other hard disks in the computer. In addition, when ExtendOemPartition=1 is used, it extends to all remaining space on the hard disk, leaving the last cylinder blank. This is by design, so that you have the option of enabling dynamic volumes.
If you are using ExtendOEMPartition during an unattended installation on a File Allocation Table (FAT) partition, you need to specify File System=ConvertNTFS in the [Unattended] section of your answer file to first convert the partition to NTFS. If you are using the ExtendOEMPartition for a Sysprep-based installation, see "Using Sysprep to Duplicate Disks" later in this chapter.
For more information about using ExtendOemPartition, see the "Microsoft Windows 2000 Guide to Unattended Setup" (Unattend.doc) on the Microsoft Windows 2000 operating system CD. The Unattend.doc file is part of the Deploy.cab file in the \Support\Tools folder. On Windows 98 or Windows 2000, use Windows Explorer to extract this document. In Windows 95 and earlier, or in
After installing Windows 2000 Server, you can automate the process of creating a domain controller by using the Active Directory Installation Wizard. There are two ways to do this:
dcpromo.exe
dcpromo.exe /answer:answer_file_name
For more information about the Active Directory Installation Wizard, see "Determining Domain Migration Strategies" in this book.