WIM is a file-based disk image format from Microsoft. Windows Vista and later install from install.wim, and it is used by Windows PE and recovery images and by deployment tools such as DISM. It stores compressed files with single-instance data, so it works as an archive of a volume rather than a block-level image.
Overview
A WIM archive holds one or more images, each a file tree, in compressed resources. A header (signature MSWIM) locates the lookup (blob) table, XML metadata and boot index. Files are single-instanced by SHA-1 hash, so identical content is stored once across images. Compression types are XPRESS, LZX and LZMS.
History
Introduced with Windows Vista (2006) and its ImageX tool.
ESD (LZMS-compressed) images were added with Windows 8.
Structures
Offsets are in bytes from the start of the structure named in each heading. Field names are descriptive and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.
Read Chunk Table
Offset
Size
Type
Field
Notes
(int)((i – 1) * 4)
4
u32 LE
–
(int)((i – 1) * 8)
8
u64 LE
–
Wim Archive
Offset
Size
Type
Field
Notes
0x18
2
u16 LE
Blob
0x1A
4
u32 LE
–
0x1E
20
bytes
–
Parse
Offset
Size
Type
Field
Notes
0x8
4
u32 LE
–
0xC
4
u32 LE
Version
0x10
4
u32 LE
Flags
0x14
4
u32 LE
Chunk Size
0x18
16
bytes
Guid
0x28
2
u16 LE
Part Number
0x2A
2
u16 LE
Total Parts
0x2C
4
u32 LE
Image Count
0x78
4
u32 LE
Boot Index
Parse
Offset
Size
Type
Field
Notes
0x0
8
u64 LE
First
0x8
8
u64 LE
–
0x10
8
u64 LE
–
Link Target
Offset
Size
Type
Field
Notes
0x0
2
u16 LE
Substitute Offset
0x2
2
u16 LE
Substitute Length
0x4
2
u16 LE
Print Offset
0x6
2
u16 LE
Print Length
Read Entry
Offset
Size
Type
Field
Notes
0x0
8
u64 LE
Entry Length
0x10
20
bytes
Hash
0x24
2
u16 LE
Stream Name Bytes
Read Entry
Offset
Size
Type
Field
Notes
0x0
8
u64 LE
Length
0x8
4
u32 LE
Attributes
0x10
8
u64 LE
Subdir
0x28
8
u64 LE
Created
0x30
8
u64 LE
Accessed
0x38
8
u64 LE
Modified
0x40
20
bytes
Ain Hash
0x58
4
u32 LE
Reparse Tag
0x58
8
u64 LE
Hard Link Group
0x60
2
u16 LE
Extra Streams
0x62
2
u16 LE
Short Name Bytes
0x64
2
u16 LE
Name Bytes
Other fields read
Read in
Offset
Size
Type
Field
Notes
Parse Tree
0x0
4
u32 LE
Security Length
Probe
0x0
8
bytes
–
Constants
Struct
Name
Value
Type
Notes
FlagFree
0x01
byte
FlagMetadata
0x02
byte
FlagCompressed
0x04
byte
FlagSpanned
0x08
byte
FlagSolid
0x10
byte
Size
24
int
Wim Header
Name
Value
Type
Notes
Size
208
int
Wim File System
Name
Value
Type
Notes
DentrySize
102
int
StreamEntrySize
38
int
Implementation limits
Class
Name
Value
Notes
Wim Archive
MaxTableBytes
256 * 1024 * 1024
Wim File System
MaxDepth
1024
Wim Compression
Name
Value
None
(next)
Xpress
(next)
Lzx
(next)
Lzms
(next)
Signatures and magic strings referenced
Text
Where checked
MSWIM\0\0\0
Parse
WLPWM\0\0\0
Parse
Structures and constants were extracted from the implementation. Prose sections are a summary from public sources; verify details before relying on them.