
如今计算机的普及率已经非常的高了,安装系统也很方便,网上有很多的安装系统的工具软件,但是这些工具都有一个通病,就是植入了过多的流氓软件,而且有些还无法卸载。所以下面的教程是帮助大家创建干净的winPE的方法。
一、创建WinPE系统文件
1、下载并安装中文Microsoft Windows AIK部署工具。
下载地址:http://www.microsoft.com/zh-cn/download/details.aspx?id=5753
2、单击"开始",依次指向"所有程序"、"microsoft Windows AIK",然后单击"部署工具命令提示符"。

菜单快捷方式将打开"命令提示符"窗口,然后自动设置环境变量以指向所有需要的工具。默认情况下,所有工具都安装在C:/Program Files/Windows AIK/Tools 下 。
在命令提示符下运行如下命令:
copype.cmd x86 d:/winpe_x86(D:是我的电脑的D盘路径)

此脚本会创建以下目录结构并复制该体系结构的所有必要文件。例如,
/winpe_x86
/winpe_x86/ISO
/winpe_x86/mount

3、运行如下命令,建创建的winpe.wim镜像文件复制到d:winpe_x86ISOsources目录下,并改名为boot.wim
copy d:winpe_x86winpe.wim d:winpe_x86ISOsourcesboot.wim

二、给PE系统添加桌面、资源管理器和第三方工具如ghost等
完成前面的操作后,PE工具系统启动后的操作界面为命令的窗口模式。对于一些用户来讲,命令的窗口操作模式并不是很方便。如果需要将PE的命令窗口模式改为图形界面的操作方式,需要借助一些工具,给PE工具系统加个壳。下面开始打造PE工具盘的桌面和菜单壳。
1、首先下载BsExplorer和wimtools这两个工具软件(可以到网上搜索下载)。下面介绍用到的一些绿色工具软件可以上网搜索下载。
2、以管理员的身份运行wimtool工具软件。如下:选择挂载或解开的wim文件,同时设置挂载或解开的
目标文件夹。完成后,点击【解开映象】,将wim文件解开到指定的D:winpetemp文件夹下面

3、添加第三方的桌面软件BsExplorer到PE工具盘中。进入上面解开wim的临时文件夹中。将
BsExplorer软件和一些绿色软件拷贝到Program Files文件夹下。

4、进入D:winpetempWindowsSystem32文件目录下面,新建一个Winpeshl.ini文件,如果已有该文件,可以略过。使用记事本打开该文件,加入下面的内容。
[LaunchApp]
AppPath=%systemdrive%Program FilesBsExplorerExplorer.exe
winpeshl.ini配置文件是PE启动后自动加载的程序
5、进行进入PE系统的一些配置,进入BsExplorer文件夹,修改相关的配置文件来设置
BsExplorer桌面由如下的配置文件决定。
5.1、用记事本打开 bs_desktop.ini 输入如下代码配置PE的资源管理器,桌面图标如大小、位置、快捷方式。
<-ItemBegin->
ItemX=20
ItemY=20
Caption=资源管理器
ExeName=%SystemDrive%toolsA43A43.exe
IconName=%SystemDrive%toolsA43A43.exe
IconNumber=0
ExeDir=%SystemDrive%toolsA43
CmdParam=
ShowState=NORMAL
<-ItemEnd->
5.2、用记事本打开bs_shell.ini:输入如下代码,配置桌面外观如颜色,提示文件等
[BsLogonSettings]
CADApplication=x:windowssystem32taskmgr.exe
CSEApplication=x:windowssystem32taskmgr.exe
LessLogonMode=1
EnableRebootButton=1
ShowOskButton=1
ShowKbdButton=1
[BsDesktopShell]
OnBottom=1
NoResize=1
NoUpdateAfterScrSet=0
DesktopBkgndText=VistaPE v.12
CheckExplorerRuning=0
DesktopTextBkColor=$FFFFFFFF
DesktopTextColor=$00FFFFFF
NoCheckFiles=1
CdRootDir=I386
FlatTray=1
[BsCommonSettings]
UseAutorun=1
UseRegRun=1
IsStyled=1
PreCheckEjectBox=0
SkinFolder=SKINv
[ShellList]
BSExplorer=%SystemDrive%Program FilesBsExplorerexplorer.exe
Console window=%windir%system32cmd.exe
NU2 Menu=%SystemDrive%ProgramsNu2MenuNu2Menu.exe
5.3 用记事本打开 bs_start.ini:输入如下代码,配置开始菜单,每个程序一行代码
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=root
Caption=Programs
MenuId=Programs
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=root
Caption=System
MenuId=System
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=System
Caption=Screen Resolution
MenuId=Resolution
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Resolution
Caption=Color 8bit
MenuId=Res8
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res8
Caption=640x480
ExeName=@ScreenRes
IconNumber=105
CmdParam=640;480; 8;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res8
Caption=800x600
ExeName=@ScreenRes
IconNumber=105
CmdParam=800;600;8;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res8
Caption=1024x768
ExeName=@ScreenRes
IconNumber=105
CmdParam=1024;768;8;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res8
Caption=1280x1024
ExeName=@ScreenRes
IconNumber=105
CmdParam=1280;1024;8;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Resolution
Caption=Color 16bit
MenuId=Res16
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res16
Caption=640x480
ExeName=@ScreenRes
IconNumber=105
CmdParam=640;480;16;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res16
Caption=800x600
ExeName=@ScreenRes
IconNumber=105
CmdParam=800;600;16;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res16
Caption=1024x768
ExeName=@ScreenRes
IconNumber=105
CmdParam=1024;768;16;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res16
Caption=1280x1024
ExeName=@ScreenRes
IconNumber=105
CmdParam=1280;1024;16;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Resolution
Caption=Color 24bit
MenuId=Res24
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res24
Caption=640x480
ExeName=@ScreenRes
IconNumber=105
CmdParam=640;480;24;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res24
Caption=800x600
ExeName=@ScreenRes
IconNumber=105
CmdParam=800;600;24;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res24
Caption=1024x768
ExeName=@ScreenRes
IconNumber=105
CmdParam=1024;768;24;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res24
Caption=1280x1024
ExeName=@ScreenRes
IconNumber=105
CmdParam=1280;1024;24;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Resolution
Caption=Color 32bit
MenuId=Res32
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res32
Caption=640x480
ExeName=@ScreenRes
IconNumber=105
CmdParam=640;480;32;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res32
Caption=800x600
ExeName=@ScreenRes
IconNumber=105
CmdParam=800;600;32;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res32
Caption=1024x768
ExeName=@ScreenRes
IconNumber=105
CmdParam=1024;768;32;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Res32
Caption=1280x1024
ExeName=@ScreenRes
IconNumber=105
CmdParam=1280;1024;32;0
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=System
Caption=Registry Editor
ExeName=%windir%regedit.exe
IconNumber=116
ExeDir=%windir%
ShowState=NORMAL
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=System
Caption=Notepad
ExeName=%windir%system32notepad.exe
IconName=%windir%system32notepad.exe
ExeDir=%windir%system32
ShowState=NORMAL
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=root
Caption=Setting
MenuId=Setting
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Setting
Caption=Edit start menu file
ExeName=@EditMenu
IconNumber=133
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Setting
Caption=Edit Qlaunch bar file
ExeName=@EditQLaunch
IconNumber=133
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Setting
Caption=Edit desctop file
ExeName=@EditDesktop
IconNumber=133
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Setting
Caption=Edit explorer settings file
ExeName=@EditExplorerIni
IconNumber=133
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Setting
Caption=Refresh start menu
ExeName=@RefreshMenu
IconNumber=134
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Setting
Caption=Refresh Qlaunch bar
ExeName=@RefreshQLaunch
IconNumber=134
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Setting
Caption=Refresh desctop
ExeName=@RefreshDesktop
IconNumber=134
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=Setting
Caption=Reload explorer
ExeName=@ExplorerReload
IconNumber=134
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=root
Caption=-
<-ItemEnd->
<-ItemBegin->
ParentItem=root
ShowInAutorun=YES
EnableInAutorun=YES
Caption=Task Manager
ExeName=%systemdrive%windowssystem32taskmgr.exe
IconName=%systemdrive%windowssystem32taskmgr.exe
ExeDir=%systemdrive%windowssystem32
ShowState=NORMAL
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=root
Caption=CMD line
MenuId=CMD line
ExeName=@CMDline
IconNumber=136
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=root
Caption=Run...
MenuId=Run...
ExeName=@Run
IconNumber=137
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=root
Caption=-
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=YES
EnableInAutorun=YES
ParentItem=root
Caption=Exit
MenuId=Exit
ExeName=@Exit
IconNumber=139
<-ItemEnd->
<-ItemBegin->
ShowInAutorun=NO
EnableInAutorun=NO
ParentItem=root
Caption=Shutdown
MenuId=Shitdown
ExeName=@Shutdown
IconNumber=138
<-ItemEnd->
6、 完成上面这些相关的配置后保存,使用wimtool工具,追加映象。将其刚才修改的内容重新封装到boot.wim镜像文件当中。

7、将配置好的软件和参数追加到boot.wim完成后,在部署工具命令提示符中输入如下命令,重新生成ISO文件。
oscdimg -n -bd:/winpe_x86/http://etfsboot.com d:/winpe_x86/ISO d:/winpe_x86/winpe_x86.iso

8、用UltraISO(软碟通)软件把生成的WINPE_X86.ISO文件写入U盘(U盘会格式化,注意提前备份资料),到这里winPE工具就做出来了,可以用它来启动电脑和安装系统了。

9、winpe启动后的效果
