您的位置:首页 > 职场人生

部署Vista(7)——创建一个最基本的应答文件

2009-02-01 10:34 211 查看
Specifying Regional and Language Options
地区和语言选项

Start by selecting and opening the Install.wim file of the version of Vista you want to deploy by following the procedure outlined in the previous article of this series. In this walkthrough, I’ll be using the 32-bit US English version of Windows Vista SP1 Enterprise Edition. .ce the image file is open, create a new answer file by selecting New Answer File from the File menu.
我将会使用US英语版本的Vista SP1 企业版作为案例进行讲解。现在我们已经打开了镜像文件并创建了一个新的应答文件。

Now we’re ready to begin adding components to our answer file. In the Windows Image pane, expand the Components node and select the Microsoft-Windows-International-Core-WinPE node beneath it. Then right-click . the Microsoft-Windows-International-Core-WinPE node and select Add Setting to Pass 1 windowsPE to add this component to the windowPE pass for your answer file. Now in the Properties pane, type values for the various settings of this component as indicated by the following table:
我们已经做好准备,开始往应答文件里加入组件。在Windows Image面板里,展开组件的节点并选择Microsoft-Windows-International-Core-WinPE节点。右击并添加Pass 1 windowsPE到应答文件中。在Properties面板里,输入如下表格中的数值:

[align=left]Setting[/align][align=left]Value[/align]
[align=left]InputLocale[/align][align=left]en-us[/align]
[align=left]Layered Driver[/align]
[align=left]SystemLocale[/align][align=left]en-us[/align]
[align=left]UILanguage[/align][align=left]en-us[/align]
[align=left]UILanguageFallback[/align][align=left]en-us[/align]
[align=left]UserLocale[/align][align=left]en-us[/align]




What we’ve done up to this point is to specify answer file settings for the default language and locale for Windows Setup. The following table describes the settings we’ve just configured in more detail:
下面则是我们刚刚配置内容的详细介绍:
[align=left]Setting[/align][align=left]De.ion[/align]
[align=left]InputLocale[/align][align=left]Keyboard layout and system input locale键盘种类[/align]
[align=left]Layered Driver[/align][align=left]Optional—used .ly for Japanese and Korean keyboards可选,仅用于日本和韩国键盘[/align]
[align=left]SystemLocale[/align][align=left]Default language for Windows Setup[/align]
[align=left]Windows安装程序的语言[/align]
[align=left]UILanguage[/align][align=left]Default system user interface language默认系统用户界面语言[/align]
[align=left]UILanguageFallback[/align][align=left]Fallback language if UILanguage is not fully localized[/align]
[align=left]UserLocale[/align][align=left]Locale to use for dates, times, currency and numbers时间、数据、金钱和数字使用的地区[/align]
We’re not quite through however as there’s another answer file component we need to specify to finish configuring user locale and language settings. Here’s what to do next: in the Answer File pane, expand the Microsoft-Windows-International-Core-WinPE node and select the SetupUILanguage node beneath it. Then in the Properties pane, click in the box to the right of the UILanguage setting and type en-us as the value for this setting (see Figure 2):
还有一个不应当遗忘的关于语言和地区选项在Microsoft-Windows-International-Core-WinPE节点的SetupUILanguage子节点。



I’m not sure why you need to specify UILanguage in two places like this, but you need to.
我不知道为什么需要在两个地方确定UILanguae,但你需要这么做。

Accepting the EULA

Next we’re going to specify the answer file setting that will automatically accept the EULA. In the Windows Image pane, under Components, find the Microsoft-Windows-Setup node and expand it to display the UserData node beneath it. Then right-click . the UserData node and select Add Setting to Pass 1 windowsPE to add this component to the windowPE pass for your answer file. Click the box to the right of the AcceptEula setting to display a drop-down arrow, then click the arrow and select True. The result should look like this (Figure 3):
下面我们在应答文件里填写自动接受EULA。在Windows Image面板中,在Components下找到Microsoft-Windows-Setup节点并展开,找到UserData节点并右击添加Pass 1 windowsPE。在右边的选项框里找到AcceptEula选项,下拉选择True。





Tip: If you’re deploying a retail version of Windows Vista (such as Windows Vista Business edition) instead of the volume-licensed Enterprise edition, you’ll also need to specify your product key at this point. To do that, expand the Microsoft-Windows-Setup\UserData node in the Answer File pane to display the ProductKey node beneath it, and they type your 29 character product key (you must include the dashes) in the box beside the Key setting in the Properties pane.
小建议如果你正在部署零售版的Vista而不是批量许可的企业版,你需要在这里填入序列号。在UserData节点里找到ProductKey节点,填入序列号(包括横线)。

Creating a New Primary Partition

Next, we need to prepare the hard disk . our computer so it will be ready to install Vista .to it. We’re assuming in this article that we’re deploying Vista .to bare-metal, that is, .to a hard drive that is unpartitioned and therefore has no existing volumes . it. We’re also assuming that our target system has .ly .e hard drive in it. This means we have to configure our answer file to create a new primary partition, set it as the active partition, and format it using NTFS. Here’s how we do this:
接下来我们需要开始准备硬盘以进行安装。本文里假设要在裸设备上进行安装,也就是说要给硬盘先分区。假设计算机上只有一个硬盘,我们会创建一个主分区,设置为活动分区,用ntfs进行格式化。

First, add the Microsoft-Windows-Setup\DiskConfiguration\Disk component to the windowsPE configuration pass of your answer file, and in the Properties pane, set the value of DiskID to the number 0 (see Figure 4):
首先,添加Microsoft-Windows-Setup\DiskConfiguration\Disk为windowsPE配置过程。在Properties面板里,设置DiskID为0




Next, add the Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition node to the windowsPE configuration pass of your answer file, and in the Properties pane, configure the settings shown in the figure below to create a new primary partition of size 50 GB (see Figure 5):
[align=left]接下来,添加add the Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition节点到windowsPE配置过程,在Properties面板里,设置主分区大小为50G[/align]




Tip: If you want your new partition to fill up your entire hard drive, set the Extend setting to True and don’t specify a value for the Size setting.
小建议:如果你想让分区占用整个硬盘,则选择Extend setting为真,不要输入大小。

[align=left]Now we have to mark our new partition (partition 1) as active and format it using NTFS. To do this, add the Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition node to the windowsPE configuration pass of your answer file, and in the Properties pane, configure the settings shown in Figure 6 below:[/align]
现在我们要把创建的新分区标记为活动分区并用NTFS格式化。添加Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition节点到pass WindowsPE,如下图进行修改:




Note that we also had to specify the Order setting in the above figure—this is required.
注意,我们必须设置Order!

Specifying the Target Partition

Now we’re ready to tell Windows Setup which disk partition we want to install Vista .to. To specify where you want to install the image, add the Microsoft-Windows-Setup\DiskConfiguration\ImageInstall\OSImage\InstallTo node to the windowsPE configuration pass of your answer file, and in the Properties pane, configure the settings shown in Figure 7 below:
现在我们已经准备好了,接下来则是告诉安装程序在哪里安装,把Microsoft-Windows-Setup\DiskConfiguration\ImageInstall\OSImage\InstallTo节点添加到Pass windowsPE,如下图进行配置:




Validating and Saving the Answer File

At this point let’s select Validate Answer File from the Tools menu and check for any error or warning events that are displayed in the Messages pane (only informational events should be displayed, and those you can safely ignore). Now save your answer file using the filename autounattend.xml in the root folder of a USB flash drive. Why name it autounattend.xml? And why save it .to a flash drive? You’ll find out in the next article of this series!
现在让我们开始检查应答文件是否有错误或者警告,选择菜单栏的Tools/Validate。然后保存文件名autounattend.xml到USB闪存的根目录下。

Examining and Commenting the Answer File
Let’s conclude by taking a quick look at the answer file we just created. If you open autounattend.xml using Notepad it should look something like this:
下面就是我们刚刚创建的autounattend.xml文件:
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-us</UILanguage>
</SetupUILanguage>
<InputLocale>en-us</InputLocale>
<SystemLocale>en-us</SystemLocale>
<UILanguage>en-us</UILanguage>
<UILanguageFallback>en-us</UILanguageFallback>
<UserLocale>en-us</UserLocale>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserData>
<AcceptEula>true</AcceptEula>
</UserData>
<DiskConfiguration>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Size>50000</Size>
<Type>Primary</Type>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Format>NTFS</Format>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:w:/sources/vista%20enterprise%20sp1/install.wim#Windows Vista ENTERPRISE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>


Here’s a tip: What if you need to create several different answer files and they all need to be named autounattend.xml? In that case, just add comments to your answer files using standard HTML comment syntax as follows:
小技巧:如果你需要创建多个版本的应答文件,只需要在应答文件里添加标准的Html comment syntax:(类似于注释的东西,其实等于没说…)
<?xml version="1.0" encoding="utf-8"?>
<!-- ############################################# -->
<!-- Answer file created in Deploying Vista Part 7 -->
<!-- ############################################# -->
<unattend xmlns="urn:schemas-microsoft-com:unattend">
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  vista 职场 休闲
相关文章推荐