积极答复者
请教用pe2.0安装系统

问题
答案
-
创建xpe光盘发布版
为何要创建光盘发布
1. EWF 方式要大约预留8M空间(EWF_REG方式不需要),而在做GHOST时候如不加-ID参数是会丢失这块未划分的空间的。因而在GHOST完毕之后EWF功能模式可能不正常。
2. 系统能正常引导需要FAT 或者NTFS格式,而FAT格式需要做启动盘来运行BOOTPREP来给修改磁盘0磁道来引导系统,(注:这种方式十分麻烦,太耽误时间)
而用NTFS分区则需要用XP 或2000系统盘来进行分区格式化,(注:用系统的分区工具即使格式化成NTFS分区也不能启动)。这样的话,我们在大规模部署XPE时候就需要先把CF或者硬盘的系统给预处理下。这样比较耽误时间
解决办法
用windows PE 即windows预案装环境来引导系统,这样可以解决以上问题,因为用winpe里面的DISKPART、FORMAT命令可以成功分区并且预留8M未分配空间 这和用系统盘来分区格式化是一样的。分区完毕之后可以直接把系统拷贝进去,就可以做到一次引导全部自动完成。
实现办法
工具:winiso、 windows pe 、easyuha.、VMware
下载地址 WINISO http://www.xdowns.com/soft/softdown.asp?softid=29508
WINPE http://www.crsky.com/soft/6890.html
ESAYUHA ftp://222.185.232.99/download/EasyUHA16_gnatix.rar
第一步创建可自解压的xpe系统压缩包
把测试通过的xpe所有文件复制出来,用EASYHUA 先把他压缩成UHA格式
如下图
点创建压缩档案
完成后生成一个.UHA的文件,这个文件是类似于RAR的文件,但是只能在windows下解压,所以我们需要把它转换成dos下可用的EXE文件。这里需要做第二步
这里选择DOS模式 转换完成之后可以生成一个可执行的EXE文件,建议名字为afterFBA.Exe
(注:选择这个软件是因为它的高压缩率,winpe裁减完之后大约有260 M,如果xpe系统做的太大,就无法放到一张CD里,我这里430的系统居然可以压缩到98M超级强)
第二步、把完整的WINPE系统进行裁减
先用winRAR把xpsp2_2180_chs_x86fre_opk.iso 解压出来进行分析,看看那些文件可以删除
我这里把根目录下DOC、SAMPLES、TOOLS、WIZARD目录 和AUTORUN.INF、OPK.MSI、README.TXT、SETUP.EXE全部删除
即使这样系统仍有300多M,还是比较大,那就在打开I386下的看看还有什么比较大
有三个大目录FONTS、IME、SYSTEM32。现在先不要懂SYSTEM32里面的文件,至于FONTS,这个可以仔细研究,鉴于时间我就没在动,还有一个IME,打开看看这个貌似是输入法,我们这里只要能写几个E文字母和数字就可以了,所以把他删除。这样系统就能字啊一个可以忍受的范围了。大约260M,如果还行减掉一下可以在字体里动动,不过需要测试,希望有人有时间可以尝试下。注意:删除时需要用WINISO来进行删除
切记:每次有动作之前都需要用VMware进行测试,看能不能引导。
每次成功后都备份一份文件,以免万一出错前功尽弃
第三步、把系统整合
前两步分别完成了xpe系统的压缩和WINPE的裁减。如果上面两步都很顺利,哪么恭喜你可以进入最后一步了。
打开winpe目录下的i386目录 找到system32 找到STARTNET.CMD这个文件这个文件
是在系统启动首先要找到的文件,所以我们这里把它修改下。改成call ..\..\xpeinst\xpeinst.cmd
这样的目地就是系统起来之后,直接找根目录下的xpeinst 目录下的xpeinst.cmd 这个命令 所以这个时候要在根目录下添加xpeinst 这个目录 同时要创建最关键的xpeinst.cmd这个命令。
我把我写的这个命令添加上来以供大家参考
@echo off
set _targetboard=PCM-9375
set _xpe_ver=v1.0
title windows XP Embedded Installer [%_targetboard% %_xpe_ver%]
echo windows XP Embedded Installer [%_targetboard% %_xpe_ver%]
echo Copyright (c) Advantech. All rights reserved.
cls
echo ***************************************************************************
echo *** windows XP Embedded Installer [%_targetboard% %_xpe_ver%]
echo ***************************************************************************
setlocal
%~d0
cd "%~dp0"
for %%i in (_source _target) do set %%i=
:_arg
for %%i in (-h -H -?) do if "%%i" == "%1" goto _usage
if "%1" == "-1" goto _1
if "%1" == "-2" goto _2
if "%1" == "-3" goto _3
if "%_source%" == "" if not "%1" == "" goto _s
if "%_target%" == "" if not "%1" == "" goto _t
goto _start
:_1
set _go=_adv_format
goto _next
:_2
set _partition=1
set _go=_adv_fresh
goto _next
:_3
set _partition=2
set _go=_adv_fresh
goto _next
:_s
set _source=%1
goto _next
:_t
set _target=%1
goto _next
:_next
shift
if "%1" == "" goto _start
goto _arg
:_usage
echo.
echo Usage: %~n0 [Options] [SourcePath] [TargetPath]
echo.
echo SourcePath: the path where XP Embedded can be found. By default the drive where
echo %~n0 is located is used.
echo TargetPath: is the path to where XP Embedded will be installed.By default drive
echo C: is used.
echo Options:
echo -1 Format the partition, and install XP Embedded (choice 1)
echo -2 Create a primary XP Embedded partition, and install
echo XP Embedded (choice 2)
echo -3 Create a primary XP Embedded partition(2GB) and a logic
echo partition(rest of the disk0), and install XP Embedded (choice 3)
echo -h Help
goto _quit
:_start
if "%_source%" == "" set _source=%~d0
if "%_target%" == "" set _target=c:
echo XPEINST: Source="%_source%" Target="%_target%"
:_main
if not "%_go%" == "" goto %_go%
echo.
echo 1) Install XP Embedded to %_target%.
echo This will:
echo - Format %_target% for XP Embedded. »á¸ñʽ»¯µôÏÖÔÚµÄϵͳÅÌ
echo - Install XP Embedded from %_source% to %_target%\.
echo 2) Install XP Embedded to %_target%.
echo This will:
echo - Create one primary partition in harddisk 0.»á½¨Á¢Ò»¸öÖ÷·ÖÇø
echo - Format %_target% for XP Embedded.²¢¸ñʽ»¯ ÊʺÏCF¿¨
echo - Install XP Embedded from %_source% to %_target%\.
echo 3) Install XP Embedded to %_target%.
echo This will:
echo - Create a primary XP Embedded partition(2GB) and a logic partition.»á½¨Á¢Ò»¸ö´óСΪ2GµÄÖ÷·ÖÇø²¢¸ñʽ»¯ ÊʺϴóÓ²ÅÌ
echo - Format %_target% for XP Embedded.
echo - Install XP Embedded from %_source% to %_target%\.
echo Q) Quit.
echo.
:_mainch
set _ok=2
set _partition=
set /p _ok=Enter your choice [1/2/3/Q, [2]] :
if "%_ok%" == "1" goto _adv_format
if "%_ok%" == "2" set _partition=1
if "%_ok%" == "2" goto _adv_fresh
if "%_ok%" == "3" set _partition=2
if "%_ok%" == "3" goto _adv_fresh
if "%_ok%" == "q" goto _quit
if "%_ok%" == "Q" goto _quit
goto :_mainch
:_adv_fresh
@cls
echo Listing disk(s) and disk 0 details...
diskpart.exe /s "pelist.txt"
if errorlevel 1 goto _abort
echo.
echo Do you want to install XP Embedded from drive %_source% to disk 0?
echo -- THIS WILL TOTALLY ERASE ALL DATA ON YOUR DISK! --
echo.
set _ok=
set /p _ok=To continue type "YES" (uppercase without quotes) :
if "%_ok%" == "YES" goto _adv_diskpart
goto _main
:_adv_diskpart
@cls
echo XPEINST: Creating new partition(s) on disk 0
if "%_partition%" == "1" diskpart.exe /s "%_source%\XPEInst\pepart1.txt"
if "%_partition%" == "2" diskpart.exe /s "%_source%\XPEInst\pepart2.txt"
if errorlevel 1 goto _adv_check_diskpart
goto _adv_format
:_adv_check_diskpart
set _ok=Y
set /p _ok=Fail to create partition(s), try it again? ("Y" or "N", [Y]) :
if "%_ok%" == "y" goto _adv_diskpart
if "%_ok%" == "Y" goto _adv_diskpart
if "%_ok%" == "n" goto _abort
if "%_ok%" == "N" goto _abort
goto _adv_check_diskpart
:_adv_format
@cls
set _fstype=N
set /p _fstype= File sytem type? (NTFS[N] or FAT32[F], [N]) :
if "%_fstype%" == "n" goto _adv_format_ntfs
if "%_fstype%" == "N" goto _adv_format_ntfs
if "%_fstype%" == "f" goto _adv_format_fat32
if "%_fstype%" == "F" goto _adv_format_fat32
goto _adv_format
:_adv_format_ntfs
set _fstype=ntfs
goto _adv_perform_format
:_adv_format_fat32
set _fstype=fat32
goto _adv_perform_format
:_adv_perform_format
@cls
set _ok=N
set /p _ok= Perform format? (Normal[N], Quick[Q] or Abort[A], [N]) :
if "%_ok%" == "n" goto _normal_format
if "%_ok%" == "N" goto _normal_format
if "%_ok%" == "q" goto _quick_format
if "%_ok%" == "Q" goto _quick_format
if "%_ok%" == "a" goto _main
if "%_ok%" == "A" goto _main
goto _adv_perform_format
:_normal_format
echo XPEINST: Formating %_target%
format %_target% /fs:%_fstype% /v:%_targetboard% /force
if errorlevel 1 goto _format_again
goto _adv_insthd
:_quick_format
echo XPEINST: Formating %_target%
format %_target% /fs:%_fstype% /v:%_targetboard% /q /force
if errorlevel 1 goto _format_again
goto _adv_insthd
:_format_again
set _ok=Y
set /p _ok=Fail to format partition, try it again? ("Y" or "N", [Y]) :
if "%_ok%" == "y" goto _adv_perform_format
if "%_ok%" == "Y" goto _adv_perform_format
if "%_ok%" == "n" goto _abort
if "%_ok%" == "N" goto _abort
goto _format_again
:_adv_insthd
@cls
echo XPEINST: Installing XP Embedded files from drive %_source% to %_target%\
cd %_target%
%_target%
%_source%\%_targetboard%\AfterFBA.EXE
if errorlevel 1 goto _abort
goto _end
:_abort
echo.
echo XPEINST: Aborted...
:_abortquit
set _ok=N
set /p _ok= Quit XP Embedded Installer? ("Y" or "N", [N]) :
if "%_ok%" == "n" goto _main
if "%_ok%" == "N" goto _main
if "%_ok%" == "y" goto _quit
if "%_ok%" == "Y" goto _quit
goto _abortquit
:_end
endlocal
echo.
echo XPEINST: Done
echo XP Embedded installed successfully!
set /p _DoReboot=Press ENTER key to reboot ...
@exit
echo.
echo XPEINST: Done
:_quit
endlocal
把上面的文档复制另保存为xpeinst.cmd即可,当然有些参数要说明下
_targetboard=PCM-9375 这个是板子的型号可以根据不同型号的主板来设置
set _xpe_ver=v1.0 这个是xpe的版本号根据需要来调整
细心的朋友可能看到了这段
:_adv_insthd
@cls
echo XPEINST: Installing XP Embedded files from drive %_source% to %_target%\
cd %_target%
%_target%
%_source%\%_targetboard%\AfterFBA.EXE
if errorlevel 1 goto _abort
goto _end
意思是把xpe从源文件安装到目标盘,也就是说我们还得在winpe下面再添加一个目录里面放入afterFBA.Exe(即:开始我们压缩好的系统),至于这个目录的名字决定于_targetboard=PCM-9375 我这里写的是PCM-9375,所以我要在根目录下建一个PCM-9375的目录同时把afterFBA.Exe 放入进去。
另外在xpeinst.cmd里 还有三句需要注意
echo Listing disk(s) and disk 0 details...
diskpart.exe /s "pelist.txt"
echo XPEINST: Creating new partition(s) on disk 0
if "%_partition%" == "1" diskpart.exe /s "%_source%\XPEInst\pepart1.txt"
if "%_partition%" == "2" diskpart.exe /s "%_source%\XPEInst\pepart2.txt"
这里就是需要在xpeinst目录下还有添加三个txt文件 文件名分别为pelist.txt、pepart1.txt、pepart2.txt
我把下面的三个txt的内容贴出来
pelist.txt为以下内容
list disk
select disk 0
detail disk
pepart1.txt
select disk 0
clean
create partition primary
active
assign letter=c
exit
pepart2.txt
select disk 0
clean
create partition primary size=2000
active
assign letter=c
create partition extended
create partition logic
select partition 3
assign
exit把这三个文件分别保存到相应目录下
这样就整合完毕。
以后每次发布新的xpe 只需要把
Xpeinst.cmd里的
_targetboard= 板子名称
set _xpe_ver=版本号
修改
并在根目下建立和板子名称相同的文件夹,并把相对应的XPE系统压缩文件afterFBA.Exe放入 从新用winiso更改即可。
以上文档是抛砖引玉,请大家多多提出意见
- 已标记为答案 KeFang Chen 2009年2月16日 5:48
全部回复
-
创建xpe光盘发布版
为何要创建光盘发布
1. EWF 方式要大约预留8M空间(EWF_REG方式不需要),而在做GHOST时候如不加-ID参数是会丢失这块未划分的空间的。因而在GHOST完毕之后EWF功能模式可能不正常。
2. 系统能正常引导需要FAT 或者NTFS格式,而FAT格式需要做启动盘来运行BOOTPREP来给修改磁盘0磁道来引导系统,(注:这种方式十分麻烦,太耽误时间)
而用NTFS分区则需要用XP 或2000系统盘来进行分区格式化,(注:用系统的分区工具即使格式化成NTFS分区也不能启动)。这样的话,我们在大规模部署XPE时候就需要先把CF或者硬盘的系统给预处理下。这样比较耽误时间
解决办法
用windows PE 即windows预案装环境来引导系统,这样可以解决以上问题,因为用winpe里面的DISKPART、FORMAT命令可以成功分区并且预留8M未分配空间 这和用系统盘来分区格式化是一样的。分区完毕之后可以直接把系统拷贝进去,就可以做到一次引导全部自动完成。
实现办法
工具:winiso、 windows pe 、easyuha.、VMware
下载地址 WINISO http://www.xdowns.com/soft/softdown.asp?softid=29508
WINPE http://www.crsky.com/soft/6890.html
ESAYUHA ftp://222.185.232.99/download/EasyUHA16_gnatix.rar
第一步创建可自解压的xpe系统压缩包
把测试通过的xpe所有文件复制出来,用EASYHUA 先把他压缩成UHA格式
如下图
点创建压缩档案
完成后生成一个.UHA的文件,这个文件是类似于RAR的文件,但是只能在windows下解压,所以我们需要把它转换成dos下可用的EXE文件。这里需要做第二步
这里选择DOS模式 转换完成之后可以生成一个可执行的EXE文件,建议名字为afterFBA.Exe
(注:选择这个软件是因为它的高压缩率,winpe裁减完之后大约有260 M,如果xpe系统做的太大,就无法放到一张CD里,我这里430的系统居然可以压缩到98M超级强)
第二步、把完整的WINPE系统进行裁减
先用winRAR把xpsp2_2180_chs_x86fre_opk.iso 解压出来进行分析,看看那些文件可以删除
我这里把根目录下DOC、SAMPLES、TOOLS、WIZARD目录 和AUTORUN.INF、OPK.MSI、README.TXT、SETUP.EXE全部删除
即使这样系统仍有300多M,还是比较大,那就在打开I386下的看看还有什么比较大
有三个大目录FONTS、IME、SYSTEM32。现在先不要懂SYSTEM32里面的文件,至于FONTS,这个可以仔细研究,鉴于时间我就没在动,还有一个IME,打开看看这个貌似是输入法,我们这里只要能写几个E文字母和数字就可以了,所以把他删除。这样系统就能字啊一个可以忍受的范围了。大约260M,如果还行减掉一下可以在字体里动动,不过需要测试,希望有人有时间可以尝试下。注意:删除时需要用WINISO来进行删除
切记:每次有动作之前都需要用VMware进行测试,看能不能引导。
每次成功后都备份一份文件,以免万一出错前功尽弃
第三步、把系统整合
前两步分别完成了xpe系统的压缩和WINPE的裁减。如果上面两步都很顺利,哪么恭喜你可以进入最后一步了。
打开winpe目录下的i386目录 找到system32 找到STARTNET.CMD这个文件这个文件
是在系统启动首先要找到的文件,所以我们这里把它修改下。改成call ..\..\xpeinst\xpeinst.cmd
这样的目地就是系统起来之后,直接找根目录下的xpeinst 目录下的xpeinst.cmd 这个命令 所以这个时候要在根目录下添加xpeinst 这个目录 同时要创建最关键的xpeinst.cmd这个命令。
我把我写的这个命令添加上来以供大家参考
@echo off
set _targetboard=PCM-9375
set _xpe_ver=v1.0
title windows XP Embedded Installer [%_targetboard% %_xpe_ver%]
echo windows XP Embedded Installer [%_targetboard% %_xpe_ver%]
echo Copyright (c) Advantech. All rights reserved.
cls
echo ***************************************************************************
echo *** windows XP Embedded Installer [%_targetboard% %_xpe_ver%]
echo ***************************************************************************
setlocal
%~d0
cd "%~dp0"
for %%i in (_source _target) do set %%i=
:_arg
for %%i in (-h -H -?) do if "%%i" == "%1" goto _usage
if "%1" == "-1" goto _1
if "%1" == "-2" goto _2
if "%1" == "-3" goto _3
if "%_source%" == "" if not "%1" == "" goto _s
if "%_target%" == "" if not "%1" == "" goto _t
goto _start
:_1
set _go=_adv_format
goto _next
:_2
set _partition=1
set _go=_adv_fresh
goto _next
:_3
set _partition=2
set _go=_adv_fresh
goto _next
:_s
set _source=%1
goto _next
:_t
set _target=%1
goto _next
:_next
shift
if "%1" == "" goto _start
goto _arg
:_usage
echo.
echo Usage: %~n0 [Options] [SourcePath] [TargetPath]
echo.
echo SourcePath: the path where XP Embedded can be found. By default the drive where
echo %~n0 is located is used.
echo TargetPath: is the path to where XP Embedded will be installed.By default drive
echo C: is used.
echo Options:
echo -1 Format the partition, and install XP Embedded (choice 1)
echo -2 Create a primary XP Embedded partition, and install
echo XP Embedded (choice 2)
echo -3 Create a primary XP Embedded partition(2GB) and a logic
echo partition(rest of the disk0), and install XP Embedded (choice 3)
echo -h Help
goto _quit
:_start
if "%_source%" == "" set _source=%~d0
if "%_target%" == "" set _target=c:
echo XPEINST: Source="%_source%" Target="%_target%"
:_main
if not "%_go%" == "" goto %_go%
echo.
echo 1) Install XP Embedded to %_target%.
echo This will:
echo - Format %_target% for XP Embedded. »á¸ñʽ»¯µôÏÖÔÚµÄϵͳÅÌ
echo - Install XP Embedded from %_source% to %_target%\.
echo 2) Install XP Embedded to %_target%.
echo This will:
echo - Create one primary partition in harddisk 0.»á½¨Á¢Ò»¸öÖ÷·ÖÇø
echo - Format %_target% for XP Embedded.²¢¸ñʽ»¯ ÊʺÏCF¿¨
echo - Install XP Embedded from %_source% to %_target%\.
echo 3) Install XP Embedded to %_target%.
echo This will:
echo - Create a primary XP Embedded partition(2GB) and a logic partition.»á½¨Á¢Ò»¸ö´óСΪ2GµÄÖ÷·ÖÇø²¢¸ñʽ»¯ ÊʺϴóÓ²ÅÌ
echo - Format %_target% for XP Embedded.
echo - Install XP Embedded from %_source% to %_target%\.
echo Q) Quit.
echo.
:_mainch
set _ok=2
set _partition=
set /p _ok=Enter your choice [1/2/3/Q, [2]] :
if "%_ok%" == "1" goto _adv_format
if "%_ok%" == "2" set _partition=1
if "%_ok%" == "2" goto _adv_fresh
if "%_ok%" == "3" set _partition=2
if "%_ok%" == "3" goto _adv_fresh
if "%_ok%" == "q" goto _quit
if "%_ok%" == "Q" goto _quit
goto :_mainch
:_adv_fresh
@cls
echo Listing disk(s) and disk 0 details...
diskpart.exe /s "pelist.txt"
if errorlevel 1 goto _abort
echo.
echo Do you want to install XP Embedded from drive %_source% to disk 0?
echo -- THIS WILL TOTALLY ERASE ALL DATA ON YOUR DISK! --
echo.
set _ok=
set /p _ok=To continue type "YES" (uppercase without quotes) :
if "%_ok%" == "YES" goto _adv_diskpart
goto _main
:_adv_diskpart
@cls
echo XPEINST: Creating new partition(s) on disk 0
if "%_partition%" == "1" diskpart.exe /s "%_source%\XPEInst\pepart1.txt"
if "%_partition%" == "2" diskpart.exe /s "%_source%\XPEInst\pepart2.txt"
if errorlevel 1 goto _adv_check_diskpart
goto _adv_format
:_adv_check_diskpart
set _ok=Y
set /p _ok=Fail to create partition(s), try it again? ("Y" or "N", [Y]) :
if "%_ok%" == "y" goto _adv_diskpart
if "%_ok%" == "Y" goto _adv_diskpart
if "%_ok%" == "n" goto _abort
if "%_ok%" == "N" goto _abort
goto _adv_check_diskpart
:_adv_format
@cls
set _fstype=N
set /p _fstype= File sytem type? (NTFS[N] or FAT32[F], [N]) :
if "%_fstype%" == "n" goto _adv_format_ntfs
if "%_fstype%" == "N" goto _adv_format_ntfs
if "%_fstype%" == "f" goto _adv_format_fat32
if "%_fstype%" == "F" goto _adv_format_fat32
goto _adv_format
:_adv_format_ntfs
set _fstype=ntfs
goto _adv_perform_format
:_adv_format_fat32
set _fstype=fat32
goto _adv_perform_format
:_adv_perform_format
@cls
set _ok=N
set /p _ok= Perform format? (Normal[N], Quick[Q] or Abort[A], [N]) :
if "%_ok%" == "n" goto _normal_format
if "%_ok%" == "N" goto _normal_format
if "%_ok%" == "q" goto _quick_format
if "%_ok%" == "Q" goto _quick_format
if "%_ok%" == "a" goto _main
if "%_ok%" == "A" goto _main
goto _adv_perform_format
:_normal_format
echo XPEINST: Formating %_target%
format %_target% /fs:%_fstype% /v:%_targetboard% /force
if errorlevel 1 goto _format_again
goto _adv_insthd
:_quick_format
echo XPEINST: Formating %_target%
format %_target% /fs:%_fstype% /v:%_targetboard% /q /force
if errorlevel 1 goto _format_again
goto _adv_insthd
:_format_again
set _ok=Y
set /p _ok=Fail to format partition, try it again? ("Y" or "N", [Y]) :
if "%_ok%" == "y" goto _adv_perform_format
if "%_ok%" == "Y" goto _adv_perform_format
if "%_ok%" == "n" goto _abort
if "%_ok%" == "N" goto _abort
goto _format_again
:_adv_insthd
@cls
echo XPEINST: Installing XP Embedded files from drive %_source% to %_target%\
cd %_target%
%_target%
%_source%\%_targetboard%\AfterFBA.EXE
if errorlevel 1 goto _abort
goto _end
:_abort
echo.
echo XPEINST: Aborted...
:_abortquit
set _ok=N
set /p _ok= Quit XP Embedded Installer? ("Y" or "N", [N]) :
if "%_ok%" == "n" goto _main
if "%_ok%" == "N" goto _main
if "%_ok%" == "y" goto _quit
if "%_ok%" == "Y" goto _quit
goto _abortquit
:_end
endlocal
echo.
echo XPEINST: Done
echo XP Embedded installed successfully!
set /p _DoReboot=Press ENTER key to reboot ...
@exit
echo.
echo XPEINST: Done
:_quit
endlocal
把上面的文档复制另保存为xpeinst.cmd即可,当然有些参数要说明下
_targetboard=PCM-9375 这个是板子的型号可以根据不同型号的主板来设置
set _xpe_ver=v1.0 这个是xpe的版本号根据需要来调整
细心的朋友可能看到了这段
:_adv_insthd
@cls
echo XPEINST: Installing XP Embedded files from drive %_source% to %_target%\
cd %_target%
%_target%
%_source%\%_targetboard%\AfterFBA.EXE
if errorlevel 1 goto _abort
goto _end
意思是把xpe从源文件安装到目标盘,也就是说我们还得在winpe下面再添加一个目录里面放入afterFBA.Exe(即:开始我们压缩好的系统),至于这个目录的名字决定于_targetboard=PCM-9375 我这里写的是PCM-9375,所以我要在根目录下建一个PCM-9375的目录同时把afterFBA.Exe 放入进去。
另外在xpeinst.cmd里 还有三句需要注意
echo Listing disk(s) and disk 0 details...
diskpart.exe /s "pelist.txt"
echo XPEINST: Creating new partition(s) on disk 0
if "%_partition%" == "1" diskpart.exe /s "%_source%\XPEInst\pepart1.txt"
if "%_partition%" == "2" diskpart.exe /s "%_source%\XPEInst\pepart2.txt"
这里就是需要在xpeinst目录下还有添加三个txt文件 文件名分别为pelist.txt、pepart1.txt、pepart2.txt
我把下面的三个txt的内容贴出来
pelist.txt为以下内容
list disk
select disk 0
detail disk
pepart1.txt
select disk 0
clean
create partition primary
active
assign letter=c
exit
pepart2.txt
select disk 0
clean
create partition primary size=2000
active
assign letter=c
create partition extended
create partition logic
select partition 3
assign
exit把这三个文件分别保存到相应目录下
这样就整合完毕。
以后每次发布新的xpe 只需要把
Xpeinst.cmd里的
_targetboard= 板子名称
set _xpe_ver=版本号
修改
并在根目下建立和板子名称相同的文件夹,并把相对应的XPE系统压缩文件afterFBA.Exe放入 从新用winiso更改即可。
以上文档是抛砖引玉,请大家多多提出意见
- 已标记为答案 KeFang Chen 2009年2月16日 5:48