Prerequisites for Performing the Walkthrough
前提条件
To perform this walkthrough yourself, you’ll need two desktop computers:
One to use as your reference computer . which you’ll install Vista, customize, sysprep, and capture your base image from.
One to use as your destination computer - this .e should have no operating system installed . it. Note that the disk drive . your destination computer should be the same size or larger than the .e . your reference computer.
You’ll also need a DHCP server and a file server, which can both be the same computer if desired. And, of course, a network connecting your two desktop computers and server(s) together.
Finally, you’ll need the custom, bootable Windows PE CD you created in Part 11 of this series.
在开始之前,你需要准备两台桌面计算机;
一台作为参考机,你会安装
Vista
、定制、
Sysprep
并抓取镜像;
一台作为目标机,不安装操作系统。你的目标机的硬盘最好和参考机的一样大。
你还需要一台
DHCP
服务器和一台文件服务器,当然可以用同一台机器来实现。当然,这些机器要用一个网络连接在一起。
最后,你需要之前创建的自定义的可引导的
Windows PE
。
Step 1: Install the Reference Computer
第一步:在参考机安装
Vista
Begin by installing Vista . a reference computer. You can use either manual or unattended installation to do this - see Part 8 of this series for how to perform an unattended install using your Vista DVD together with an answer file.
你既可以手动安装,也可以用应答文件自动安装
Vista
。
Step 2: Customize the Reference Computer
步骤
2
:自定义参考机
Log . to your reference computer and customize it as desired. We’ll perform .e absolutely essential customization―installing games! Well, maybe not every administrator will agree, but that’s OK. Anyways, to enable the Games feature . Vista, open Control Panel, click Programs, click Turn Windows Features . Or Off, and select the checkbox labeled Games (Figure 1):
登陆你的参考机并按照需要进行自定义。这里我们把游戏装上了:打开控制面板,找到程序和功能,选择功能,把游戏前的复选框打开即可。
<!--[if !vml]--><!--[endif]-->
If desired, you could also install applications, customize the desktop, configure services, install device drivers, and perform other customizations your users will need . their computers. We’ll just stick with enabling Games to keep things simple at this point.
如果需要你还可以安装其他的程序、配置桌面、配置服务、安装驱动、做一些其他的自定义操作。这里我们仅以安装游戏作为例子。
Step 3: Sysprep the Reference Computer
步骤
3
:
Sysprep
参考机
Open a command prompt . your reference computer, type cd sysprep to change the current directory to C:\Windows\System32\Sysprep, and type sysprep /oobe /generalize /shutdown to sysprep (or better, generalize) your reference computer by removing all machine-specific information from it such as security identifiers (SIDs), the contents of the event logs, system restore points, installed Plug and Play drivers, and so .. You can also do generalize your system by pressing WINDOWS KEY + R to open the Run box, typing sysprep and clicking OK which opens the C:\Windows\System32\Sysprep folder in Windows Explorer. Then double-click the Sysprep application in this folder to open the System Preparation Tool dialog and select the options shown in Figure 2:
在参考机上打开一个命令行,进入
C:\Windows\System32\Sysprep
,执行
sysprep /oobe /generalize /shutdown
命令,开始
Sysprep
。或者你也可以在图形界面下执行
sysprep
,用下图的配置惊醒
sysprep
。
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->
Step 4: Boot the Reference Computer Using Windows PE
步骤
4
:用
Windows PE
引导参考机
Now take the bootable Windows PE 2.1 CD you created in Part 11 of this series and boot your reference computer using it. After a short time, the Windows PE command prompt will be displayed.
按照上一章的做法,用
Windows PE 2.1
的光盘引导参考机,过几分钟后,出现命令行。
Step 5: Capture a Base Image from the Reference Computer
步骤
5
:抓取参考机的镜像
When the Windows PE command prompt appears, type the following command:
在命令行里输入如下命令:
D:\imagex /compress fast /capture C: C:\baseimage.wim “Base Image” /verify
This command capture an image of the entire C: drive of your reference computer and save this image as a WIM file named baseimage.wim in the root folder of C: drive. This captured image will be the base image you will deploy later .to your destination computers. Figure 3 shows the image capture process (which takes some time to complete) underway:
这个命令用于抓取整个
C
盘并保存为
baseimage.wim
于
C
盘。抓取的镜像会作为基本镜像部署到其他电脑上。
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->
Step 6: Copy the Base Image to a Network Share
步骤
6
:把基本映像拷贝到网络共享上
Once your base image has been captured - you’ll see a message saying “Successfully imaged C:\” when ImageX is done capturing the image - you now need to get your image file off of your reference computer and save it somewhere so that you can deploy it later .to your destination computers. The simplest way to do this is to use the net use command at the Windows PE command prompt to map a network drive to a shared folder . your file server.
一旦抓取好你的基本映像,你会看到一条信息“
Successfully imaged c:\
”表示映像已经抓取成功。你现在需要把你的映像拷贝到其他地方,最简单的办法就是使用命令把文件拷贝到网络共享上。
For example, first create a shared folder named C:\Images . your file server and share this folder as IMAGES with Full Control permission for Everyone (both shared folder and NTFS permission). Then at the Windows PE command prompt . your reference computer, type net use Y: \\<name>\IMAGES where <name> is either the NetBIOS name or IP address of your file server. If a “password is invalid” message appears when you do this, type a username and password valid . your file server. Be sure to type the username in the form <computer_name>\<user_name> or <domain_name>\<user_name> depending . whether your file server belongs to a workgroup or a domain. If the net use command fails, it might be that your DHCP server isn’t working―check the leases in the scope and make sure Windows PE has leased an address from your server.
例如,先在文件服务器上创建共享目录
images
,把完全控制权限赋予
everyone
组,因为仅是临时性质,你可以把完全控制权限同时赋予共享权限和
NTFS
权限。接下来,在
PE
的命令行里输入
net use Y:\\<name>\Images,<name>
里填写你的文件服务器名称。当输入用户名密码时,记得使用格式:域名
\
用户名。
Once you’ve mapped the drive, type copy C:\baseimage.wim Y: to copy your captured base image file to the network share. .ce this is completed (check the C:\Images folder . your file server to make sure the baseimage.wim file is actually there) you can now remove the Windows PE CD from your reference computer and power the computer off.
当你映射好盘符,输入
copy C:\baseimage.wim Y:,
把你的映像文件拷贝到网络共享上。完成这个后,你可以关闭参考机了。
Step 7: Deploying the Base Image .to a Destination Computer
步骤
7
:部署基本映像到目标机器上
Now you’re finally ready to deploy your captured image .to .e or more destination computers. Start by booting your destination computer using your Windows PE CD, and .ce the command prompt appears, use the following Diskpart commands to create a new primary partition, set the new partition as the active partition, and format the new partition as an NTFS volume:
diskpart
select disk 0
clean
create partition primary
select partition 1
active
format
assign letter=C:
exit
Figure 4 shows each of these commands at work:
Tip: You could also create a batch file of Diskpart commands and save your file as part of your Windows PE build before you burn this .to a CD. Then you could simply run the batch file at the Windows PE command prompt in order to partition and format the disk of a destination computer in .e step. We’ll look at this and other Windows PE customizations in a later article of this series, but for now we’re just covering the basics of how to perform image-based deployment
建议:创建一个批处理文件来执行
Diskpart
操作要快得多
Once the disk drive of your destination computer has been suitably prepared, type the following command two commands at the Windows PE command prompt to connect to your network share and copy the base image from there .to the hard drive of your destination computer:
当目标机的分区创建好后,用如下命令登陆你的网络共享,并拷贝
wim
文件到硬盘上。
net use Y: \\<name>\IMAGES
copy Y:\baseimage.wim C:
Once again, <names> is either the NetBIOS name or IP address of your file server, and you may be prompted to supply credentials valid . your file server. And the copy operation may take some time to complete as the image file is typically couple of gigabytes in size. .ce the copy operation is complete, you’ll see a message saying “1 file(s) copied.”
Now you’re ready to apply the captured image .to the hard drive of your destination computer. To do this, type the following command at your Windows PE command prompt:
现在你可以用
ImageX
命令把镜像应用到分区上
D:\imagex /apply C:\baseimage.wim 1 C:
This will again take some time to complete (almost as long as capturing an image) and when it’s done you’ll see a message saying “Successfully applied image.”
当看到
“Successfully applied image.”
旧版表示成功了
You’re done. Remove the Windows PE CD from your destination computer, power the computer off, then power it . again. As the computer boots up, new SIDs will be generated for it and you’ll be presented with the machine out-of-box-experience (machine OOBE) as shown in Figure 5:
这样你就完成部署了,把
PE
的光盘取出,重新引导你的目标机,你将会进入
Vista
的
OOBE
界面:
This OOBE allows each user to customize their computer by giving it a name, creating a local user account, selecting a desktop background, and so .. For example, if you were an OEM and you were going to deliver the computers to customers, the customer would walk through OOBE the first time they turned the computer .. In an enterprise you would want to use an answer file to automate this portion of deployment―we’ll examine this issue in a future article in this series.
Finally, .ce you’ve completed the OOBE, you can log . and play FreeCell . your destination computer (Figure 6):
如之前介绍的那样,进行基本的配置后你就可以使用
Vista
了,你会发现游戏已经安装好了。