|
本帖最后由 martin313 于 2025-2-20 08:50 编辑
使用 DISM 和 wimlib-imagex 制作 ESD 文件的命令如下:
一、DISM 制作 ESD 文件
DISM 默认不支持直接捕获到 ESD,但可以通过以下两种方式间接生成:
1. 从现有 WIM 转换为 ESD
dism /Export-Image /SourceImageFile:"source.wim" /SourceIndex:1 /DestinationImageFile:"output.esd" /Compress:recovery
/Compress:recovery:指定使用 ESD 压缩格式。
2. 捕获新镜像并导出为 ESD
步骤 1:先捕获为 WIM
dism /Capture-Image /ImageFile:"temp.wim" /CaptureDir:"C:\Source" /Name:"MyImage" /Compress:max
步骤 2:导出 WIM 为 ESD
dism /Export-Image /SourceImageFile:"temp.wim" /SourceIndex:1 /DestinationImageFile:"output.esd" /Compress:recovery
二、wimlib-imagex 制作 ESD 文件
wimlib 支持直接捕获为 ESD,且压缩更灵活:
1. 直接捕获为 ESD
wimlib-imagex capture "C:\Source" "output.esd" --compress=esd:1000 --solid
--compress=esd:1000:使用 ESD 压缩(:1000 为最大压缩率)。
--solid:启用固态压缩(进一步提升压缩率)。
2. 从 WIM 转换为 ESD
wimlib-imagex export "source.wim" 1 "output.esd" --compress=esd:1000 --solid
关键说明
权限要求:需以管理员身份运行命令提示符。
路径格式:路径含空格时需用英文引号包裹(如 "C:\My Source")。
压缩效率:
DISM 的 ESD 压缩率固定。
wimlib 的 --compress=esd:1000 --solid 压缩率更高,但耗时更长。
兼容性:
DISM 是微软官方工具,兼容性最佳。
wimlib 是第三方工具,支持更多参数(需自行下载 wimlib)。
|
|