Windows Imaging Format
WIM image format | |
---|---|
File extension: | .wim .swm |
Developed by: | Microsoft |
Type of format: | Disk image |
The Windows Imaging Format (WIM) is a file-based disk image format. It was developed by Microsoft to deploy its latest Windows operating system releases, Windows Vista and Windows Server 2008, which use it as part of their standard installation procedure. It works equally well with legacy versions of Windows however, and indeed is used as part of Windows Fundamentals for Legacy PCs.
Contents |
Design
Like other disk image formats, a WIM file contains a set of files and associated filesystem metadata. However, unlike sector-based formats (such as .ISO, .CUE/.BIN used for CD and DVD images), WIM is file-based, which means that the smallest unit of information is a file. The primary advantages of it being file-based include hardware independence and unique storage of a file referenced multiple times in the filesystem tree (single instance storage).
Although the architecture is file based, the files are nevertheless stored inside a single WIM database, thereby reducing the SMB overhead of opening and closing many individual files at that end of the data transfer. The cost of reading or writing many thousands of individual files on the local disk is negated by hardware and software based disk caching as well as sequential reading and writing of the data.
WIM images need to be deployed to an existing volume or partition as the toolset does not create low-level disk structures such as partitions, nor does it format them. Microsoft provides a command-line tool called DiskPart for creating and formatting new volumes.
WIM files can contain multiple disk images, which are referenced either by their numerical index or by their unique name. Due to the use of single instance storage, the more each successive disk image has in common with previous images added to the WIM file, the less new data will be added. A WIM can also be split (spanned) into multiple parts, which have the .swm extension.
Usage and Tools
WIM files can be created with a command-line tool named ImageX, which is officially available in several of Microsoft's deployment tools, such as in the (WAIK), (OPK) or in 2007.
A WIM image can also be mounted as a new volume under Windows with a drive letter associated in order to facilitate easier extraction or updating of its contents. (For example, a WIM image can be converted into an ISO image using this approach). A device driver named WimFltr.sys needs to be loaded before this mode operation is possible however.
Lastly, a set of public APIs for manipulating WIMs have also been released, with the required functionality contained in WIMGAPI.DLL, thereby allowing developers to write their own tools too. A number of third party applications have therefore included the capability to read or write WIM files.
WIM images can be made bootable, as is the case with Windows Vista's setup DVD. In this case, BOOT.WIM contains a bootable version of Windows PE from which the installation is performed. Other setup files are contained in the file INSTALL.WIM