Automating Client Installation and Upgrade

Previous Topic Next Topic

Reviewing the Answer File

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 modify 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.) By renaming the answer file, you can 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 that 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 Microsoft Windows 2000 operating system CD. The Unattend.doc file is part of the Deploy.cab file in the \Support\Tools folder. In Windows 98 or Windows 2000, use Windows Explorer to extract this document. In Windows 95 and earlier, or in MS-DOS, use the Extract command to access the file.

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 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. For more information about Winnt.exe and Winnt32.exe, see "Reviewing the Windows 2000 Setup Commands" later in this chapter.

Creating the Answer File

The answer file is a customized script that you can use to run an unattended installation of Windows 2000 Professional. There are two ways to create an answer file: You can use Setup Manager, or you can create the file manually.

Creating the Answer File with Setup Manager

To help you create or modify the answer file, the Setup Manager application is available on the Windows 2000 operating system 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.

For more information about answer file parameters and syntax, 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. In Windows 98 or Windows 2000, use Windows Explorer to extract this document. In Windows 95 and earlier, or in MS-DOS, use the Extract command to access the 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 25.3 describes some of the most common answer file specifications that are created by Setup Manager.

Table 25.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.

Creating the Answer File Manually

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 to Set Passwords

By using the answer file with Setup, you can set parameters for the following password commands:

For information about the definitions of these commands, 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. In Windows 98 or Windows 2000, use Windows Explorer to extract this document. In Windows 95 and earlier, or in MS-DOS, use the Extract command to access the file.

In addition, you can find examples of answer files that use some of these parameters in the Appendix "Sample Answer Files for Unattended Setup" in this book.


note-icon

Note

Passwords are limited to 127 characters. If you specify a password that contains more than 127 characters, you are not going to 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-icon

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.

Using the 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.

Extending Hard Disk Partitions

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 file system 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-icon

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, but leaves 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 install on a file allocation table (FAT) partition, you need to specify the FileSystem=ConvertNTFS in the [Unattended} section of your answer file to first convert the partition to NTFS. For information about using the ExtendOEMPartition for a Sysprep-based installation, see "Using Sysprep to Extend Disk Partitions" later in this chapter.

For more information about using ExtendOemPartition, see "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. In Windows 98 or Windows 2000, use Windows Explorer to extract this document. In Windows 95 and earlier, or in MS-DOS, use the Extract command to access the file.

© 1985-2000 Microsoft Corporation. All rights reserved.