无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 4868|回复: 27
打印 上一主题 下一主题

夜猫,对 ImageX 感兴趣或了解的请进!

[复制链接]
跳转到指定楼层
1#
发表于 2007-7-20 23:47:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
ImageX在制作WIM映像时定义了以下四个节的配置文件,本人想了解红字部分的内容。

[ExclusionList]
;默认被排除的文件、目录。这些文件或目录不会被捕获在WIM映像内。
\$ntfs.log
\hiberfil.sys
\pagefile.sys
\System Volume Information
\RECYCLER
\Windows\CSC
[ExclusionList]这个节是否支持通配符定义,如以下格式:
; 某目录下的某类型文件
\Path1\Path2\*.TXT
; 所有的某类型文件
*.TXT

[ExclusionException]
;可以定义一个排除列表,覆盖默认的排除列表。
;当这个表不为空时,将优先使用这个列表。
[ExclusionException]节的定义应与上面[ExclusionList]的定义一致的吧?

[CompressionExclusionList]
;排除以下类型的文件在压缩序列,这些文件在WIM映像内不会被压缩。
*.mp3
*.zip
*.cab
*.rar

[CompressionExclusionList]这个节是支持通配符定义的(如上),但能否这样定义:
;某目录下的所有文件
\Path1\Path2

;目录中的某类文件
\Path1\Path2\*.png

;特定的文件
\Path1\Path2\123.png

[AlignmentList]
;定义以下文件在 64K 边界对齐,在 64K 边界对齐的任何文件,将不会被压缩。
;这个有什么作用?好象意义不大,也不明。

[AlignmentList]这个节是否也支持通配符定义?支持什么格式和法则?


高手来!

[ 本帖最后由 lxl1638 于 2007-7-20 11:49 PM 编辑 ]
2#
发表于 2007-7-20 23:49:25 | 只看该作者
拿来主义者路过,哈哈
回复

使用道具 举报

3#
 楼主| 发表于 2007-7-20 23:50:58 | 只看该作者
拿你个头!本人是问你!
这个配置文件各个节的法则是如何的?
回复

使用道具 举报

4#
 楼主| 发表于 2007-7-21 00:07:53 | 只看该作者
没有知道?本人也很想定义这个配置文件的法则,但怕与 ImageX 的不符。

;特定的文件
\Path\FileName.Ext

; 某种类型文件
*.Ext

;某目录下的所有文件及其所有子目录下的所有文件
\Path1\Path2

;某目录下的所有文件(不包括其子目录)
\Path1\Path2\*

;某目录下的某类文件(不包括其子目录)
\Path1\Path2\*.Ext
回复

使用道具 举报

5#
发表于 2007-7-21 00:48:04 | 只看该作者
lxl1638 你问的问题 我看你可一通过试验找是能到答案。
回复

使用道具 举报

6#
 楼主| 发表于 2007-7-21 00:51:19 | 只看该作者
不试了,就按4楼的法则去做,至少有4条是与 ImageX 一致的,大不了以后再改,准备明天开工。
回复

使用道具 举报

7#
发表于 2007-7-21 11:37:42 | 只看该作者
[ExclusionList]
应该不支持通配符
===================
[ExclusionException]
不支持通配符(存在的话上面的ExclusionList就无效了)
===================
[CompressionExclusionList]
某目录下的所有文件貌似应该为
\Path1\Path2\*
最前面有\表示对应目录
比如捕获c:就表示c:\Path1\Path2\*
捕获c:\kk就表示c:\kk\Path1\Path2\*
回复

使用道具 举报

8#
 楼主| 发表于 2007-7-21 13:05:58 | 只看该作者
原帖由 jl580650 于 2007-7-21 11:37 AM 发表
[ExclusionList]
应该不支持通配符
===================
[ExclusionException]
不支持通配符(存在的话上面的ExclusionList就无效了)
===================
[CompressionExclusionList]
某目录下的所有文件 ...


你理解与本人的不同,这个应该是排除规则,Imagex默认的设置是:
[ExclusionList]
\$ntfs.log
\hiberfil.sys
\pagefile.sys
\System Volume Information
\RECYCLER
\Windows\CSC


通过ImageX捕获映像时会有上面的提示,这个提示也不是绝对路径,而是相对路径(更合理)。

hiberfil.sys是休眠文件,pagefile.sys是虚拟内存,显然它们都不应被捕获在WIM映像内,
\System Volume Information和\RECYCLER是垃圾站,也不应被捕获在WIM映像内。
回复

使用道具 举报

9#
发表于 2007-7-21 13:21:18 | 只看该作者
:o [ExclusionList]是默认的,如果[ExclusionException]存在的话[ExclusionList]就无效了
最前面的"\"表示对应关系啊
\path1\path2\*.txt,捕获目录为c:\kk的话,只排除c:\kk\path1\path2\*.txt
path1\path2\*.txt,捕获目录为c:\kk的话,会排除c:\kk\path1\path2\*.txt,c:\bb\path1\path2\*.txt,c:\ww\ss\path1\path2\*.txt这样的
前面少打了几个字>_<
具体也没实践过,只是看了说明而已,因为觉得默认的排除列表就挺好的

[ 本帖最后由 jl580650 于 2007-7-21 01:23 PM 编辑 ]
回复

使用道具 举报

10#
 楼主| 发表于 2007-7-21 13:28:53 | 只看该作者
以下是官方说明,看看红色部分。

Create an ImageX Configuration File
ImageX is a command-line tool that enables the creation of image files for deployment in a manufacturing or corporate IT environment. You can create a configuration file (configuration_list.ini) to determine:
? Which files and folders must be excluded from the capture process when using the /capture option.

? Which folders, files, and file types must be excluded from the compression process when using the /compress option.

? Whether the .wim file aligns on a 64K boundary or the default 32K boundary.

If you name your configuration_list.ini file wimscript.ini and store it in your ImageX directory (where the ImageX.exe file is located), it will automatically run when using the /capture option (with or without the /compress option) without requiring you to use the /config option.
The /config option enables you to customize specific compression, capture, and boundary alignment actions, for each individual file and folder, within ImageX. Create configuration_list.ini by using a text editor, such as Notepad.
Creating a Configuration List
The following sections appear in the ImageX configuration list.
Section Description
[ExclusionList]
Enables you to define the files and folders to exclude from the /capture operation.

[ExclusionException]
Enables you to override the default exclusion list during the /capture operation.

[CompressionExclusionList]
Enables you to define the specific files and folders, in addition to specific file types, to exclude from the /compress operation.
  Note:  
You can use file or folder matching to exclude a file from compression. You can provide a full path match, or you can use wildcards (*). For example, you can use C:\WINDOWS\inf\*.pnf to match a specific type of file or C:\WINDOWS\inf\* to match an entire folder.


[AlignmentList]
Enables you to define specific files to align on a 64K boundary. Compression will not occur for any files aligned on a 64K boundary. If you do not list files within this section, all your files will align on a 32K boundary.
  Note:  
    Security may occasionally use this section for pattern-matching purposes.


Default Exclusion List
By default, ImageX will exclude the following files.
[ExclusionList]
\$ntfs.log
\hiberfil.sys
\pagefile.sys
\System Volume Information
\RECYCLER
\Windows\CSC
[CompressionExclusionList]
*.mp3
*.zip
*.cab
\WINDOWS\inf\*.pnf
Exclusion List Guidelines
? You can only use wildcards in the last component in a file path that does not begin with a preceding back slash. For example,
myfolder\*.txt

? You can use a preceding backward slash to limit file- and directory-matching relative to the root directory. For example, if you capture the "c:\" drive with the previous exclusion list,
\myfolder
\folder\subfolder
ImageX will exclude the following files and directories.

c:\myfolder
c:\folder\subfolder
However, ImageX will not exclude files or directories contained in the following example.
c:\main\myfolder
c:\data\folder\subfolder

? You can override the default exclusion list by using the [ExclusionException] section. For example,
[ExclusionException]
\pagefile.sys
\System Volume Information

? If an explicit [ExclusionException] section is provided in the WIM configuration file, it will always take precedence over the [Exclusion List] section.

? You cannot override the default compression exclusion list by using the [ExclusionException] section.

Using the Configuration File
If you create a custom-named configuration file and store it outside of the ImageX directory, you can use ImageX to run the file. At a command prompt, open the ImageX directory. For example,
imagex /config c:\imaging\<configuration_list>.ini /capture d: d:\imaging\data.wim "Drive D"
-OR-
imagex /config c:\imaging\<configuration_list>.ini /append d: d:\imaging\data.wim "Drive D"
where c:\imaging\<configuration_list>.ini provides the complete directory location for the configuration file. You must use either the /capture option to create a new .wim file or the /append option to append an existing .wim file.
回复

使用道具 举报

11#
 楼主| 发表于 2007-7-21 13:31:53 | 只看该作者
定义了 \myfolder
捕获时只排除 c:\myfolder,c:\myfolder不会被捕获到WIM内,
不排除 c:\main\myfolder, c:\main\myfolder会被捕获到WIM内。
回复

使用道具 举报

12#
发表于 2007-7-21 13:53:10 | 只看该作者
:o 不就是我说的意思嘛
刚才用imagex试了一下,竟然没成功,定义文件放在d:\a.ini
[CompressionExclusionList]
"\Program Files"
\WINDOWS
对c:捕获,竟然没有排除掉
难道[CompressionExclusionList]不可以排除整个文件夹??
:( 又试了下
[CompressionExclusionList]
*.ini
对c:捕获,竟然也没有把boot.ini排除掉:em14

[ 本帖最后由 jl580650 于 2007-7-21 02:03 PM 编辑 ]
回复

使用道具 举报

13#
 楼主| 发表于 2007-7-21 14:04:08 | 只看该作者
原帖由 jl580650 于 2007-7-21 01:53 PM 发表
:o 不就是我说的意思嘛
刚才用imagex试了一下,竟然没成功,定义文件放在d:\a.ini
[CompressionExclusionList]
"\Program Files"
\WINDOWS
对c:捕获,竟然没有排除掉
难道[CompressionExclusionList]不可 ...


你搞错了。

[CompressionExclusionList]
; 排除以下类型的文件在压缩序列,这些文件在WIM映像内不会被压缩。
*.mp3
*.zip
*.cab
*.rar

意思是这些文件已是压缩文件,再压缩也无效,但会被捕获。

[ 本帖最后由 lxl1638 于 2007-7-21 02:09 PM 编辑 ]
回复

使用道具 举报

14#
 楼主| 发表于 2007-7-21 14:06:44 | 只看该作者
你鸟语好,看看这个是什么鸟意思?

Exclusion List Guidelines
? You can only use wildcards in the last component in a file path that does not begin with a preceding back slash. For example,
myfolder\*.txt
回复

使用道具 举报

15#
发表于 2007-7-21 14:10:34 | 只看该作者
路径最后才能用通配符,而且开头不能用"\"
回复

使用道具 举报

16#
 楼主| 发表于 2007-7-21 14:14:17 | 只看该作者
原帖由 jl580650 于 2007-7-21 02:10 PM 发表
路径最后才能用通配符,而且开头不能用"\"


就是说不会支持这些的定义:

Path1\Path2
Path1\Path2\*
Path1\Path2\*.Ext

如果是这样,10分钟后就可更新了。

[ 本帖最后由 lxl1638 于 2007-7-21 02:15 PM 编辑 ]
回复

使用道具 举报

17#
发表于 2007-7-21 14:26:45 | 只看该作者
Path1\Path2
会排除整个path2目录,[ExclusionList]中尝试过,是成功的

Path1\Path2\*
看说明貌似只能用在排除压缩类型[CompressionExclusionList]
[ExclusionList]中尝试过,是失败的
Path1\Path2\*.Ext
排除Path1\Path2\下所有*.Ext
[ExclusionList]中尝试过,是成功的
===============
开头带\只会排除捕获目录下的
不带\,会排除捕获目录下以及其子目录下所有匹配的
已经测试过了

[ 本帖最后由 jl580650 于 2007-7-21 02:29 PM 编辑 ]
回复

使用道具 举报

18#
 楼主| 发表于 2007-7-21 14:29:58 | 只看该作者
原帖由 jl580650 于 2007-7-21 02:26 PM 发表
Path1\Path2
会排除整个path2目录,[ExclusionList]中尝试过,是成功的

Path1\Path2\*
看说明貌似只能用在排除压缩类型[CompressionExclusionList]
[ExclusionList]中尝试过,是失败的
Path1\Path2\*.Ex ...


红色部分的定义,开头可以不用"\"也可以的?
回复

使用道具 举报

19#
发表于 2007-7-21 14:44:34 | 只看该作者
Path1\Path2
\Path1\Path2
\Path1\Path2\*.txt
\Path1\Path2\*
以上都可以
Path1\Path2\*
Path1\Path2\*.txt
不可以
见鬼了,和上面的翻译反过来了
要不老九你也测试下:Q
所有排除都放在[ExclusionList] 下测试的

[ 本帖最后由 jl580650 于 2007-7-21 02:50 PM 编辑 ]
回复

使用道具 举报

20#
 楼主| 发表于 2007-7-21 15:04:04 | 只看该作者
原帖由 jl580650 于 2007-7-21 02:44 PM 发表
Path1\Path2
\Path1\Path2
\Path1\Path2\*.txt
\Path1\Path2\*
以上都可以
Path1\Path2\*
Path1\Path2\*.txt
不可以
见鬼了,和上面的翻译反过来了
要不老九你也测试下:Q
所有排除都放在[ExclusionLi ...



我给你说晕了,你上面是这样说的,开头都没有"\"
Path1\Path2\*.Ext
排除Path1\Path2\下所有*.Ext
[ExclusionList]中尝试过,是成功的
===============
开头带\只会排除捕获目录下的
不带\,会排除捕获目录下以及其子目录下所有匹配的
已经测试过了
回复

使用道具 举报

21#
发表于 2007-7-21 15:06:53 | 只看该作者
最后说的一次是正确的
回复

使用道具 举报

22#
发表于 2007-7-22 17:29:41 | 只看该作者
看来看去都被你两说迷糊了?有结论了么?:lol
回复

使用道具 举报

23#
 楼主| 发表于 2007-7-22 21:11:44 | 只看该作者
现在不管ImageX是如何定义这些规则了,本人就用微软的API,让它确定一个带有通配符的文件名或目录名是否与一个真实的文件目录名匹配,估计ImageX也是这样,这样做代码量少,如果ImageX也是这样,那么WimTool可以完全兼容ImageX。
回复

使用道具 举报

24#
发表于 2007-7-23 02:24:23 | 只看该作者
本人菜鸟一个路过 帮忙顶一下 呵呵
回复

使用道具 举报

25#
发表于 2007-7-23 09:01:01 | 只看该作者
呵呵学习学习啦!支持一个吧
回复

使用道具 举报

26#
发表于 2007-7-24 09:49:28 | 只看该作者
还有老九不知道的东西啊。。。。。。
我只是学习了
回复

使用道具 举报

27#
 楼主| 发表于 2007-7-25 01:40:13 | 只看该作者
问题搞定,结帖。
请版主取消置顶。
回复

使用道具 举报

28#
发表于 2007-7-25 21:12:03 | 只看该作者
我来学习的,谢谢!!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2025-2-25 10:14

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表