|
===第二章 第二节A 添加原生系统文件===
StartIsBack本身并没有依赖,这里简单说下(请参照explorer, ime的main.bat)。
WimBuilder2提供了一个AddFiles宏命令(lib\macros\AddFiles.cmd, AddFiles.vbs),
可以根据一个main.bat中的文件列表进行从install.wim提取文件。
格式:
call AddFiles %0 :end_files
goto :end_files
;install.wim中的文件/文件夹路径列表,例如
\windows\explorer.exe
\Windows\System32\notepad.exe
\windows\IME
:end_files
同时,WimBuilder2的AddFiles针对提取install.wim文件做了些特别处理,使得文件列表变得简洁。
a. @前导符 + 路径: 后续文件可省略文件路径
b. +mui: 提取文件的同时,提取\zh-CN\*.mui之类的对应的mui文件
c. +ver > xxxxx: 后续文件仅在指定的版本条件下才提取
d. 以上内容可组合
e. @-: 取消文件路径
f. -mui: 取消mui文件提取
g. +ver* : 所有版本都提取后续文件(移除版本判断)
h. 文件以\开头,将无视@指定的路径(避免因为个别文件而反复设置@路径)
i.多个文件名以","分割可以写到一行,文件关系更紧凑
以磁盘管理组件为例,参照WIN10XPE的Explorer_AddFiles.txt,内容如下:
- ; Microsoft Managment Control. Disk Management
- \windows\system32\diskmgmt.msc
- \Windows\System32\dmdlgs.dll
- \Windows\System32\dmdskmgr.dll
- \Windows\System32\dmdskres.dll
- \Windows\System32\dmdskres2.dll
- \Windows\System32\dmintf.dll
- \Windows\System32\dmocx.dll
- \Windows\System32\dmutil.dll
- \Windows\System32\dmvdsitf.dll
- \Windows\System32\dmview.ocx
- \Windows\System32\hhsetup.dll
- \Windows\System32\??-??\diskmgmt.msc
- \Windows\System32\??-??\dmdskres.dll.mui
- \Windows\System32\??-??\dmdskres2.dll.mui
- \Windows\System32\??-??\dmocx.dll.mui
- \Windows\System32\??-??\dmutil.dll.mui
复制代码
所以,MMC\diskMgr.bat
- call AddFiles %0 :end_files
- goto :end_files
- @\windows\system32\
- +mui
- ;Disk Management
- diskmgmt.msc
- dmdlgs.dll,dmdskmgr.dll,dmdskres.dll,dmdskres2.dll,dmintf.dll
- dmocx.dll,dmutil.dll,dmvdsitf.dll,dmview.ocx,hhsetup.dll
- :end_files
复制代码
为了更容易理解,我从WIN10XPE的
Accessibility.Script
Accessibility_AddFiles.txt
移植了,辅助工具(轻松访问,放大镜,屏幕键盘,讲述人)。
这个组件,只要补充install.wim的文件即可。
见最终附件的
WINXPE\01-Components\zz-Accessories\Accessibility\main.bat
|
|