Thiswalkthrough describes how to create a customized Windows PE image. Theprimary tool for customizing Windows PE 2.0 is PEImg, a Windows PEcommand-line tool. After creating a customized image, you can deploy theimage to a hard disk or create a bootable Windows PE RAM disk on aCD-ROM, a USB flash drive (UFD) or a hard disk.
Note |
---|
A Windows PE RAM disk boots directly into memory and is assigned the drive letter X, which does not correspond to the media (for example, a UFD or a CD-ROM) from which you booted. Ensure that you have sufficient memory to support the size of your Windows PE image plus any additional memory requirements, for example, if you plan on running any customized applications that need additional working memory. |
To complete this walkthrough, you need the following:
In this step, you create a required directory structure that supports building a Windows PE image.
copype.cmd <architecture> <destination>
copype.cmd x86 c:\winpe_x86
\winpe_x86 \winpe_x86\ISO \winpe_x86\mount
In this step, you mount the base image to a local directory so that you can add or remove packages.
imagex /mountrw c:\winpe_x86\winpe.wim 1 c:\winpe_x86\mount
By using the Peimg tool, you install Windows features by using the /installoption. Windows features are included with the base image (Winpe.wim)but are not installed. You can also import packages and add drivers andlanguage packs. For more information, see Windows PE Customization How-To Topics.
peimg /install=<pkg> c:\winpe_x86\mount\Windows
peimg /install=WinPE-HTA-Package c:\winpe_x86\mount\Windows
peimg /install=*HTA* c:\winpe_x86\mount\Windows
Package Name | Description |
---|---|
WinPE-FONTSupport-<region>-Packages | Additional font support for ja-jp, ko-kr, zh-cn, zh-hk, and zh-tw. |
WinPE-HTA-Package | HTML application support |
WinPE-MDAC-Package | Microsoft Data Access Component support |
WinPE-Scripting-Package | Windows Script Host support |
WinPE-SRT-Package | Windows Recovery Environment component (available only on the Windows OPK) |
WinPE-WMI-Packages | Windows Management Instrumentation (WMI) support |
WinPE-XML-Package | Microsoft XML (MSXML) parser support |
peimg /list c:\winpe_x86\mount\Windows
Thisstep is optional but recommended. You can add applications and scriptsto your Windows PE image that you might need while working inWindows PE. The following is a list of common tools to include in yourWindows PE image.
copy “c:\program files\<version>\Tools\x86\imagex.exe” c:\winpe_x86\iso\
xcopy “c:\program files\<version>\Tools\<architecture>\Servicing” c:\winpe_x86\iso\Servicing /s
copy %windir%\system32\msxml6*.dll c:\winpe_x86\iso\Servicing
c:\winpe_x86\mount\Windows
Important |
---|
Adding files to the \Windows directory will increase the size of your Windows PE RAM image. Ensure that your computer has sufficient memory to boot Windows PE and to run various applications. |
In this step, you prepare the image by using the peimg /prepcommand. This operation removes any non-installed packages from thefinal image. This operation reduces the overall image size. For example,
peimg /prep c:\winpe_x86\mount\Windows
The /prep option cannot be reverted, and after the /prep option is run, the /install , /uninstall , /import , and /list options will not function, while the /lang and /infoptions will continue to function. The Peimg tool prompts you toconfirm the command. To suppress this prompt for scripting, add the /f option.
In this step, you commit the changes to the original image file (Winpe.wim) by using the ImageX /unmount option with the /commit option. For example,
imagex /unmount c:\winpe_x86\mount /commit
Inthis step, you replace the default Boot.wim in the \ISO directory withyour new customized image. The image must be called Boot.wim. Forexample,
copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim
You now have a customized Windows PE RAM disk image that you can place on bootable media, like a CD-ROM or a UFD.
oscdimg -n -bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso
diskpart select disk 1 clean create partition primary size=<size of device> select partition 1 active format fs=fat32 assign exit
disk 1
is equal to UFD
.xcopy c:\winpe_x86\iso\*.* /s /e /f f:\
Youcan further customize your Windows PE image by adding language packs,customized scripts, and drivers. For more information, see Windows PE Customization How-To Topics.
聯(lián)系客服