Script the Installation with Answer Files - Page 2
In the days of old, answer files used the TXT file extension.
You can still use TXT, but better choices are available. The following list describes the common file extensions for answer files and when to use each:
- TXTUnattend.txt is still a common file extension. Because it does not differentiate an answer file from a plain old text file, don't use it.
- SIFSIF is the acronym for Setup Information File. This is the best file extension to use for most answer files. Note that this is the only file extension that Remote Installation Service supports.
- INFSysprep, a tool you'll learn about in this article series, uses the Sysprep.inf extension. Also, every time the setup program installs Windows 2000, it copies the answer file it used to %SystemRoot%\System32\$Winnt$.inf.
You need to know what happens when you create an answer file using Notepad or virtually any other editor that uses the common dialog boxes. If, after choosing File|Save As, you type "Winnt.sif" and press Enter, you end up with a file called Winnt.sif.txt. The common dialog boxes append the file extension shown in the Save As Type list to the end of the filewhether you used file extension or not. The moral? Make sure you enclose your file names in quotes, like Winnt.sif or, at the very least, change the Save As Type to All Files.
Listing 1 is a sample answer file. It's a templatea good starting point for any Windows 2000 deployment. During this article series, we'll extend this answer file with often-overlooked but extremely useful settings. For now, let's content ourselves with the basic sections:
- [Unattended]The setup program uses settings in this section during the text-mode phase of the setup process. Text-mode is the part that happens before the first reboot. Typical settings include those shown in the Listing 1. FileSystem specifies whether to use FAT or NTFS. OemSkipEula=Yes causes the setup program to skip the license agreement. And UnattendMode controls the setup program's user-interface level. You'll learn about more advanced settings, like DriverSigningPolicy, OemPnPDriversPath, and OemPreinstall, in the future.
- [GuiUnattended]The next section, [GuiUnattended], has settings that the setup program uses during the graphical phase of the setup process. The listing contains a typical example. The local administrator password is left blank. The remaining settings cause the setup program to skip the first few screens.
- [UserData]This section is usually the thinnest section in an answer file because, by their nature, answer files are generic and not user specific. The example shown in Listing 1 is typical. You can optionally set UserName to something like Valued Company Employee to avoid any prompts.
- [Identification]Use this section to join a computer to a workgroup or domain using the mutually exclusive properties JoinWorkgroup and JoinDomain. You can also specify the administrator credentials necessary for joining the computer to a domain. Better methods are available for this requirement, though, and you'll learn about those in this series.
- [Networking]The [Networking] section specifies the computer's client, server, service, and protocol configurations. For computers connected to Microsoft networks that use DHCP, InstallDefaultComponents=Yes is all you need in this section. The networking configuration for other networks is less straightforward but well documented in the resource kit's Unattend.doc file.
Listing 1: Sample Answer File
[Unattended] FileSystem=ConvertNTFS OemSkipEula=Yes UnattendMode=ReadOnly [GuiUnattended] AdminPassword=* OEMSkipRegional=1 OEMSkipWelcome=1 TimeZone=020 [UserData] OrgName="Jerry Honeycutt" ProductID=YOUR-PRODUCT-KEY-HERE [Identification] JoinDomain=HONEYCUTT [Networking] InstallDefaultComponents=Yes
Again, this is not an answer file that you will deploy. This is a template that you'll copy and edit in lieu of creating answer files with Setup Manager. This and a copy of Unattend.doc are all you need to knock out Windows 2000 answer files.