Bạn có thể cho mình xin lệnh capture ra file .esd được không?
Mình muốn capture ra .esd để giảm dung lượng luôn, chứa capture ra .wim sau đó phải chỉnh sửa rồi lại chuyển từ wim sang esd sẽ mất thời gian
Mình xin phép gửi bạn một số thông tin chính thức của MS về lệnh dism /capture-image:
Captures an image of a drive to a new .wim file. Captured directories include all subfolders and data. You cannot capture an empty directory. A directory must contain at least one file. DISM can also optionally apply and capture extended attributes (EA).
You can capture the image as a Windows image (.wim) file or a set of split Windows image (.swm) files, but this option doesn’t support capturing a virtual hard disk (.vhd/.vhdx) file. See
/Capture-FFU if you are looking to capture an FFU.
Syntax:
Mã:
Dism /Capture-Image /ImageFile:<path_to_image_file> /CaptureDir:<source_directory> /Name:<image_name> [/Description:<image_description>]
[/ConfigFile:<configuration_file.ini>] {[/Compress:{max|fast|none}] [/Bootable] | [/WIMBoot]} [/CheckIntegrity] [/Verify] [/NoRpFix] [/EA]
/ConfigFile: Specifies the location of a configuration file that lists exclusions for image capture and compress commands. For more information, see
DISM Configuration List and WimScript.ini Files.
/Compress: Specifies the type of compression used for the initial capture operation. The
maximum option provides the best compression, but takes more time to capture the image. The
fast option provides faster image compression, but the resulting files are larger than those compressed by using the maximum option. This is also the default compression type that is used if you do not specify the argument. The
none option does not compress the captured image at all.
/Bootable: Marks a volume image as being a bootable image. This argument is available only for WinPE images. Only one volume image can be marked as bootable in a .wim file.
/CheckIntegrity: Detects and tracks .wim file corruption when used with capture, unmount, export, and commit operations. /CheckIntegrity stops the operation if DISM detects that the .wim file is corrupted when used with apply and mount operations.
/Verify: Checks for errors and file duplication.
/NoRpFix: Disables the reparse point tag fix. A reparse point is a file that contains a link to another file on the file system. If /NoRpFix is not specified, reparse points that resolve to paths outside of the value specified by /ImageFile will not be captured.
/WIMBoot: Use /WIMBoot to append the image with Windows image file boot (WIMBoot) configuration. This only applies to Windows 8.1 images that have been captured or exported as a WIMBoot file. This feature isn't supported in Windows 10.
/EA: Captures extended attributes. The switch must be explicitly specified to capture extended attributes. DISM will capture extended attribute bits if they are set in the components to be captured in the WIM image. If the bits are not set, DISM won't set them. Only the inbox components of CAB packages and drivers will have these extended attribute bits, not the AppX package components or Win32 application components. Extended attributes with prefix “$Kernel.” in name will be skipped because only user mode extended attributes are captured. If you use DISM in Windows 10, version 1607 to capture extended attributes and use an earlier version of DISM to apply the image, the operation will succeed but the extended attributes will not be set to the applied image.
Examples:
Mã:
Dism /Capture-Image /ImageFile:E:\install.wim /CaptureDir:D:\ /Name:"Windows 10 Enterprise Full Software"
/Description:"Windows 10 Enterprise v2004 update 07/2020 by manhnd"
/Compress:max
Lệnh bên trên là lệnh nguyên gốc của MS nói về capture image. Sau khi capture xong thì sẽ dùng lệnh
/Apply-Image để triển khai vào hê thống mới hoặc sử dụng
Windows Deployment Services trên
Windows Server để triển khai trên toàn bộ hệ thống hàng trăm, hàng nghìn,... máy đồng thời.
Khi bạn đưa nó vào trong 1 file ISO thì bạn cần thêm trường
Edition (flags) bằng lệnh:
Mã:
Dism /Image:C:\test\offline /Set-Edition:Enterprise
hoặc bằng tool mình có chia sẻ trong video. Khi chỉnh sửa image thì
bắt buộc nó phải ở dạng .wim rồi mount nó ra để chỉnh sửa.
Trong lệnh DISM nguyên gốc của MS
không có option nén ra .esd (/compress:recovery) mà chỉ có lệnh nén ra .wim (/compress:max|fast|none). Sau khi capture ra .wim file rồi sau đó mới nén lại bằng lệnh:
Mã:
Dism /Export-Image /SourceImageFile: /SourceIndex: /DestinationImageFile: /Compress:recovery
Bạn có thể kiểm tra các thông tin trong .wim file bằng lệnh:
Mã:
Dism /Get-ImageInfo /ImageFile:C:\test\offline\install.wim /index:2
Examples:
Mã:
Index : 2
Name : Windows 10 Enterprise Full Software
Description : Windows 10 Enterprise v2004 update 07/2020 by manhnd
Size : 25,151,605,959 bytes
WIM Bootable : No
Architecture : x64
Hal : acpiapic
Version : 10.0.19041
ServicePack Build : 388
ServicePack Level : 0
Edition : Enterprise
Installation : Client
ProductType : WinNT
ProductSuite : Terminal Server
System Root : WINDOWS
Directories : 32717
Files : 136718
Created : 7/21/2020 - 11:28:12 PM
Modified : 8/7/2020 - 12:53:44 PM
Languages : en-US (Default)
Tài liệu tham khảo:
DISM Image Management Command-Line Options
docs.microsoft.com
ss64.com
Compares .WIM, .VHD/.VHDX, and .FFU file formats, which may all be used during manufacturing to deploy Windows to new devices.
docs.microsoft.com
Boot to a virtual hard disk: Add a VHDX or VHD to the boot menu
docs.microsoft.com