---
title: "制作U盘版windowsPE3.0（windows7）"
author: "Cash"
date: "2010-04-27T00:31:55Z"
tags: ["C", "C#", "C++", "Microsoft", "Windows"]
categories: ["操作系统"]
slug: "u-windowspe3-0-windows7"
draft: false
lastmod: "2010-04-27T00:31:55Z"
id: 653769
url: "https://cash.iteye.com/blog/653769"
---

制作U盘版windowsPE3.0（windows7） （看附件pdf带图像）

Sytimes.com

 

本文讲述如何手动制作U盘pe3.0（win7），以及如何在盘内集成ghost8支持便于恢复系统。

1）准备工作

A：Microsoft windows AIK（Automated Installation Kit）通过微软官方网站获取 文件名为：KB3AIK\_EN.iso ，支持windows7英文版，大小为1.66G。

B：UltraISO V9.3.6这个版本支持\[写入硬盘镜像]功能，可以把做好的winpe.iso文件以HDD、ZIP引导可模式写入u盘。 C：Windows7的系统镜像文件我选择了32bit的英文企业版windows7这个版本文件名为：SW\_DVD5\_SA\_Win\_Ent\_7\_32BIT\_English\_Full\_MLF\_X15-70745.ISO

D：msxml6.msi Microsoft windows AIK的工具会用到此xml软件。

E：外壳程序，就是u盘引导后看到的外观。（从windows7中制作的pe是无界面的，只有cmd窗口）我选用了bsexplorer1.6版本，可以通过配置其ini文件的方式修改菜单。

F：U盘一个

2）开始制作windowspe3.0的iso（从windows7镜像文件中提取），可引导的ISO。

1]安装Microsoft windows AIK工具到机器上。解压KB3AIK\_EN.iso文件后，会得到StartCD.exe文件，运行这个文件，选择\[windows AIK Setup]开始安装软件。此软件会在C:\\Program Files\\Windows AIK\\Tools\\x86\\目录中生成imagex.exe文件，这个imagex.exe是我们将用用来打包和修改boot.wim的利器。

2]（按下述方式将得到这个pe3.0只包含“命令提示符”窗口）注意运行以下命令时不要开目录，否则引起操作失败。

1、建立几个目录，d:\\1\\ 和 d:\\11\\ 还有 d:\\111\\ （文件名便于集中在一起）

2、将windows7光盘（或光盘镜像）里的\\sources\\boot.wim（137m大小）文件复制到d:\\1\\目录

3、打开cmd窗口，并切换到C:\\Program Files\\Windows AIK\\Tools\\x86\\ 提示符下

4、输入 imagex /mountrw d:\\1\\boot.wim 2 d:\\11 （将boot.wim镜像映射到\\1\\目录），等待命令顺利执行完毕。 5、删除d:\\11\\根目录下的setup.exe文件。

6、删除d:\\11\\根目录下的sources文件夹。

6、输入 imagex /unmount /commit d:\\11 （合并修改的映像文件并卸载），等待命令顺利执行完毕。

7、输入 imagex /compress maximum /export "d:\\1\\boot.wim" 2 "d:\\111\\boot.wim",把boot.wim分离并重新压缩，等待命令顺利执行完毕。

8、运行结束后在d:\\111\\boot.wim得到修改后的boot.wim。

2']（按下述方式将得到这个未经处理的pe3.0包含“图形”窗口）注意运行以下命令时不要开资源管理器，否则引起操作失败。

1、建立几个目录，d:\\1\\ 和 d:\\11\\ 还有 d:\\111\\ （文件名便于集中在一起）

2、将windows7光盘（或光盘镜像）里的\\sources\\boot.wim（137m大小）文件复制到d:\\1\\目录

3、打开cmd窗口，并切换到C:\\Program Files\\Windows AIK\\Tools\\x86\\ 提示符下

4、输入 imagex /mountrw d:\\1\\boot.wim 2 d:\\11 （将boot.wim镜像映射到\\1\\目录），等待命令顺利执行完毕。 5、删除d:\\11\\根目录下的setup.exe文件。

6、删除d:\\11\\根目录下的sources文件夹。

7、解压缩bsexplorer，将得到的bsexplorer目录（包含bs\_explorer.ini等配置文件）复制到d:\\11\\Program Files\\目录下。（注：在此步骤中可以集成Ghost,参看最后的Ghost集成说明）

8、新建文件Winpeshl.ini放置到d:\\11\\Windows\\System32\\目录下，其内容为： \[LaunchApp] AppPath=%systemdrive%\\Program Files\\bsexplorer\\explorer.exe \[LaunchApps]

9、输入 imagex /unmount /commit d:\\11 （合并修改的映像文件并卸载），等待命令顺利执行完毕。

10、输入 imagex /compress maximum /export "d:\\1\\boot.wim" 2 "d:\\111\\boot.wim",把boot.wim分离并重新压缩，等待命令顺利执行完毕。

11、运行结束后在d:\\111\\boot.wim得到修改后的boot.wim。

3）准备windowsPE的相关打包文件目录

1、新建d:\\winpe\\pe\\

2、新建d:\\winpe\\pe\\sources\\

3、复制windows7光盘中的\\boot整个目录到d:\\winpe\\pe\\中

复制windows7光盘中的\\efi整个目录到d:\\winpe\\pe\\中

复制windows7光盘中的bootmgr文件到d:\\winpe\\pe\\

复制修改后的boot.wim文件到d:\\winpe\\pe\\sources\\中

4）制作PE光盘镜像

1、用UltraISO提取windows7光盘引导文件，保存为windows7.bif

2、用UltraISO将d:\\winpe\\pe下的目录和文件添加到光盘镜像，加载windows7.bif，保存镜像为PE 3.0.iso。

5）将PE 3.0.iso写入U盘

1、使用UltraISO加载 PE3.0.iso的镜像文件。

2、在\[启动]菜单中选择\[写入硬盘映像]，写入方式选择\[usb-hdd+]，单击\[写入]开始写入U盘。

等待写入完成 到此一切结束，可以去试试了。^\_^

 

 

以下为其他补充说明：

\---------------------------------

A：一些故障：打包解包过程中出现错误： The user attempted to mount to a directory that already contained a mounted image. This is not supported. 把相应的1，11，111，文件夹删除掉，起个其他的名字再试。如8，88，888三个文件夹。在修改过程中，几个目录的作用，如果出错就得新建目录。（这个比较烦） 1到11 解压集成 11到1 修改后再集成 1到111重新压缩

\------------------------------

 

B：制作过程的输入与输出：

=============================================== C:\\Program Files\\Windows AIK\\Tools\\x86&gt;imagex /mountrw g:\\8\\boot.wim 2 g:\\88 ImageX Tool for Windows Copyright (C) Microsoft Corp. All rights reserved. Version: 6.1.7600.16385 Mounting: \[g:\\8\\boot.wim, 2] -&gt; \[g:\\88]... \[ 100% ] Mounting progress Successfully mounted image. Total elapsed time: 30 sec ================================================= C:\\Program Files\\Windows AIK\\Tools\\x86&gt;imagex /unmount /commit g:\\88 ImageX Tool for Windows Copyright (C) Microsoft Corp. All rights reserved. Version: 6.1.7600.16385 Committing: \[g:\\88]... \[ 100% ] Committing Image progress Successfully committed image. Unmounting: \[g:\\88]... \[ 100% ] Mount cleanup progress Successfully unmounted image. Total elapsed time: 18 sec ==================================================== C:\\Program Files\\Windows AIK\\Tools\\x86&gt;imagex /compress maximum /export "g:\\8\\b oot.wim" 2 "g:\\888\\boot.wim" ImageX Tool for Windows Copyright (C) Microsoft Corp. All rights reserved. Version: 6.1.7600.16385 Exporting: \[g:\\8\\boot.wim, 2] -&gt; \[g:\\888\\boot.wim] \[ 100% ] Exporting progress Successfully exported image #2. Total elapsed time: 6 sec C:\\Program Files\\Windows AIK\\Tools\\x86&gt; =================================================

 

\------------------------------

C：如何集成Ghost： 1、复制ghost目录到已被映射好的 d:\\11\\Program Files\\ 目录下， 2、修改BS\_START.INI文件添加如下内容： &lt;-ItemBegin-&gt; ShowInAutorun=YES EnableInAutorun=YES ParentItem=root Caption=Ghost8 MenuId=Ghost8 &lt;-ItemEnd-&gt; &lt;-ItemBegin-&gt; ShowInAutorun=YES EnableInAutorun=NO ParentItem=Ghost8 Caption=Ghost32 ExeName=%systemdrive%\\Program Files\\Ghost\\Ghost32.exe IconNumber=37 ExeDir=%systemdrive%\\Program Files\\Ghost\\ ShowState=NORMAL &lt;-ItemEnd-&gt; &lt;-ItemBegin-&gt; ShowInAutorun=YES EnableInAutorun=NO ParentItem=Ghost8 Caption=Ghost ExeName=%systemdrive%\\Program Files\\Ghost\\Ghost.exe IconNumber=37 ExeDir=%systemdrive%\\Program Files\\Ghost\\ ShowState=NORMAL &lt;-ItemEnd-&gt; 3、开始菜单中将会出现\[Ghost8]的菜单。单击子项目\[Ghost32]并运行，结果如下。