Why did we name our answer file autounattend.xml instead of just unattend.xml? Because we’re going to use the Unattended Install From DVD method for installing Vista .to a system. In this method of deploying Vista, you need to have your answer file . removable media, typically either a USB flash drive or (for older systems that still support them) . a floppy disk. Let’s talk briefly about how Windows Setup uses answer files.
为什么应答文件的名字是autounattend.xml而不是unattend.xml?因为我们在这里我们用的是DVD光盘进行部署Vista,你需要把应答文件放在一个移动介质上,比如usb闪存或者移动硬盘等等。我们接下来看看Windows安装程序会如何使用应答文件。
 
Windows Setup and Answer Files
Windows安装和应答文件
 
 In the second and third articles of this series, we examined how Windows Setup works and described the three phases of Setup and the seven configuration passes associated with Setup. When you run Windows Setup (setup.exe) to install Vista, you can do it with or without an answer file. Automated deployment of Vista requires using an answer file, and Setup.exe can use answer files in two ways: explicitly or implicitly. Let’s look at these two ways of specifying an answer file.
Setup.exe可以用两种方式使用应答文件:明式或者暗式。让我们来看看这两种应答文件。
 
Explicit Answer File
显示应答文件
 
You can explicitly specify an answer file when you run Setup.exe by using the /unattend switch. For example, if you run Setup from over the network and you have your answer file . .e network share and your Vista installation files . another, you could launch Windows Setup by running the command <path_to_installation_files>setup /unattend:<path_to_answer_file>unattend.xml where unattend.xml is the name of your answer file. Of course, running a command like this from your destination computer means you need some operating system from which to install it, and long ago when Windows 95/98/2000 were used, this typically meant booting your destination computer using a network boot floppy. Or you could use setup /unattend to upgrade your existing version of Windows to a newer .e. Then when Windows XP became available, OEMs and enterprise customers got to use WinPE (Windows Preinstallation Environment), a stripped-down version of Windows that you could use to boot a bare-metal system to a command prompt, connect to a network share, and start the Setup process. We’ll look at how to use Windows PE soon in a later article of this series.
你可以使用带/unattend参数的Setup.exe来使用一个应答文件。例如你从网络上运行setup.exe,而应答文件保存在另一个共享上,你可以如下方式运行来指明应答文件的位置:<path_to_installation_files>setup /unattend:<path_to_answer_file>unattend.xml
由于有了PE,你可以在PE里直接进行这样的操作。
 
Implicit Answer File
隐式应答文件
 
Setup.exe can also use answer files implicitly however, that is, without having to explicitly specify where you answer file is located. In fact, when Setup begins, it automatically looks in several locations in order to see whether an answer file is present, and if it finds .e, it uses it to begin performing an unattended installation. Not .ly that, this implicit search for an answer file happens automatically at the start of every configuration pass that occurs during the Setup process including the windowsPE, offlineServicing, specialize, generalize, auditSystem, auditUser, and oobeSystem configuration passes. Finally, for this automatic implicit search for an answer file to work during the first two passes (windowsPE and offlineServicing) the answer file must be named autounattend.xml instead of the usual unattend.xml.
当然你也可以暗式使用应答文件。当Setup.exe运行时,他自动地在几个地点进行搜寻应答文件,如果找到就进行无人安装。不仅如此,搜寻应答文件的操作在每个配置过程开始时自动进行。如果要应答文件暗式地为头两个pass调用,就得把应答文件命名为autounattend.xml而不是常用的unattend.xml
 
Here are the details: when Setup begins a configuration pass, it automatically looks for an answer file in the locations indicated in the following order:
默认的搜索应答文件的顺序是:(懒得翻译了
  1. In the registry in the location HKLM\System\Setup!UnattendFile
  2. In the %WINDIR%\Panther\Unattend folder (but .ly if Setup is being launched from a previous version of Windows)
  3. In the %WINDIR%\Panther folder, which is the location where Setup caches answer files. When Setup finds an answer file at the beginning of a configuration pass, it caches it in this directory so it can use this cached answer file for the remaining configuration passes provided no other answer files are found in a location of higher precedence in this search procedure.
  4. In the root directory of removable media that are writable. Setup searches the root directory of each writable flash drive or floppy, in order of drive letter, until it finds an answer file.
  5. In the root directory of removable media that are read-only. Setup searches the root directory of each read-only removable media, in order of drive letter, until it finds an answer file.
  6. In the \Sources folder where your Vista installation files are found (windowsPE and offlineServicing passes .ly) and in the %WINDIR%\System32\Sysprep folder (all other passes). For the windowsPE and offlineServicing passes, your answer file must be named autounattend.xml. For all other passes, it must be named unattend.xml.
  7. In %SYSTEMDRIVE% (the root of your system drive)
Performing an Unattended Install from DVD
DVD实施无人职守安装
 
Let’s try using the basic answer file we created in the previous article of this series and see whether it works or not. You need three things to perform your install:
Your Windows Vista with SP1 Enterprise Edition product DVD
Your autounattend.xml answer file saved in the root directory of a USB flash drive
A destination computer that has no operating system installed . it
Follow these steps to install Vista using the Unattended Install From DVD method:
准备你的东西:Vista SP1企业版DVD光盘、把应答文件存储在根目录的USB闪存、一台没有安装操作系统的计算机,使用下面的步骤执行无人职守安装:
  1. Turn . your destination computer, insert your Vista product DVD into your DVD-ROM drive, and plug your flash drive into a USB port . the computer.
打开计算机,插入你的VistaDVD光盘和USB闪存
  1. Press CTRL+ALT+DEL to reboot your system.
重启
  1. Sit back and watch as the windowPE configuration pass launches and uses its implicit answer file search algorithm to find the autounattend.xml file in the root of your flash drive. Setup.exe then caches this answer file and uses it to automatically install Vista . your computer. During Setup, your computer will reboot twice and then you are eventually presented with the following screen (Figure 1):
可以看到windowsPE配置过程启动,暗式调用闪存里的应答文件开始安装,你会看到自动安装并自动重启两次,结束后则出现下图

This is the first screen of the machine out-of-box-experience (OOBE), which is also called Windows Welcome, and it’s the start of a wizard that walks the user through the final steps of configuring his computer before he can log . and start using it. The screens presented by this Set Up Windows wizard require the user to perform the following tasks in the order indicated:
上图是OOBE的第一个画面,称为Windows欢迎,也是用户在登陆前为自己的计算机进行基本配置的向导。一般情况下,你需要配置下面这些选项:
  1. The user chooses a user name and picture. The user types a user name, a password, and a password hint. Typing a password hint is now required as of Service Pack 1 for Vista.
选择用户名和图像,包括用户名、密码和提示。
  1. The user types a computer name and chooses a desktop background to use.
输入用户名和选择桌面背景
  1. The user chooses an option . the Help Protect Windows Automatically page of the wizard. Typically you would select Use Recommended Settings here.
选择一个选项来自动保护windows
  1. The user can review and modify his time and date settings including setting the time zone.
选择时区和时间设置
  1. The user selects his computer’s current location, which can be home, work or public.
选择计算机的场景。
On the Thank You page, the user clicks Start. A message appears saying “Please wait while Windows checks your computer’s performance.” .ce that is done, the logon screen appears, and the user types his password and logs . to his computer and can begin working.
在感谢页面里,用户点击Start后,一条消息显示“Please wait while Windows checks your computer’s performance.”结束后,登陆界面出现,输入用户名密码开始使用。
 
What’s the point of having this machine OOBE as part of Setup? The main purpose is for OEMs who preinstall Vista . computers and then deliver these computers to customers. As a customer, you  want your new computer to come with the username BoB configured when your name is Jane, or with the timezone set to Central when you live in the Pacific zone. So in a scenario where computers are being prepared for customers, some final customization steps must be left to the customer herself to perform.
OOBE对谁而言是重要的?OOBE通常是为OEM厂商准备的,用户提供给最终用户。作为一个客户,你希望在拿到电脑后进行一些基本的设置,所以就有了OOBE
 
But what if you’re an administrator in an enterprise however and you need to prepare a computer for a user . your network? You know the user’s name and the time zone your network is in—is there any way to automate this Windows Welcome process so that the user can just turn the computer ., log ., and get to work? Yes there is, and that’s what the next article in this series will talk about.
但如果你是一个企业管理员,你肯定不会希望使用OOBE,你知道你的用户名和时区设置。我们更希望用户仅仅需要打开电脑登陆就能直接工作——这是我们下一篇将会讲到的。