The Windows Imaging Format (WIM) is a
file-based
disk image format. It was developed by
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
to help deploy
Windows Vista
Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, released five years earlier, which was then the longest time span between successive releases of Microsoft W ...
and subsequent versions of the
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
family.
Design
Like other
disk image formats, a WIM
file contains a set of files and associated
filesystem metadata
Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including:
* Descriptive ...
. However, unlike
sector-based formats (such as
ISO
The International Organization for Standardization (ISO ; ; ) is an independent, non-governmental, international standard development organization composed of representatives from the national standards organizations of member countries.
Me ...
or
VHD), WIM is file-based: the fundamental unit of information in a WIM is a file.
The primary advantages of being file-based is hardware independence and
single-instance storage of a file referenced multiple times in the filesystem tree. Since the files are stored inside a single WIM file, the overhead of opening and closing many individual files is reduced. 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 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 extension.
WIM images can be made
bootable and Windows
boot loader
A bootloader, also spelled as boot loader or called bootstrap loader, is a computer program that is responsible for booting a computer and booting an operating system. If it also provides an interactive menu with multiple boot choices then it's o ...
supports booting Windows from a WIM file. Windows Setup DVD in Windows Vista and later use such WIM files. In this case, BOOT.WIM contains a bootable version of
Windows PE from which the installation is performed. Other setup files are held in the INSTALL.WIM.
Since
Windows 8.1, the size of Windows directory can be reduced by moving system files into compressed WIM images stored on a separate hidden partition (
WIMBoot).
[Windows Image File Boot (WIMBoot) Overview]
/ref> Since Windows 10
Windows 10 is a major release of Microsoft's Windows NT operating system. The successor to Windows 8.1, it was Software release cycle#Release to manufacturing (RTM), released to manufacturing on July 15, 2015, and later to retail on July 2 ...
, system files can be compressed on the system disk ( CompactOS).
WIM supports three families of LZ77
LZ77 and LZ78 are the two lossless data compression algorithms published in papers by Abraham Lempel and Jacob Ziv in 1977 and 1978.
They are also known as Lempel-Ziv 1 (LZ1) and Lempel-Ziv 2 (LZ2) respectively. These two algorithms form the basis ...
-based compression algorithms in ascending ratio and descending speed: XPRESS, , and LZMS.[wimlib: the open source Windows Imaging (WIM) library - Compression algorithm]
/ref> The former two use Huffman encoding, while the latter uses adaptive Huffman encoding with range coding. There is also support for solid compression. Both solid compression and LZMS are introduced more recently, in WIMGAPI from Windows 8 and DISM from Windows 8.1.
WIM uses SHA-1 algorithm to calculate checksum for whole archive.
Tools
ImageX
ImageX is the command-line tool used to create, edit and deploy Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
disk images in the Windows Imaging Format. Along with the underlying Windows Imaging Interface library (WIMGAPI), it is distributed as part of the free Windows Automated Installation Kit (WAIK/OPK). Starting with Windows Vista
Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, released five years earlier, which was then the longest time span between successive releases of Microsoft W ...
, Windows Setup uses the WAIK API to install Windows.
The first distributed prototype of ImageX was built 6.0.4007.0 (main.030212-2037). It allowed Microsoft OEM partners to experiment with the imaging technology and was developed in parallel with Longhorn alpha prototypes. It was first introduced in Milestone 4 into the Longhorn project and used in later builds of Longhorn. Build 6.0.5384.4 added significant advantages over previous versions, like read-only and read/write folder mounting capabilities, splitting to multiple image files (SWM), a WIM filter driver and the latest compression algorithms. It has been used since pre-RC (release candidates) of Windows Vista.
DISM
Deployment Image Service and Management Tool (DISM) is a tool introduced in Windows 7 and Windows Server 2008 R2 that can perform servicing tasks on a Windows installation image, be it an online image (i.e. the one the user is running) or an offline image within a folder or WIM file. Its features include mounting and unmounting images, querying installed device drivers in an offline image, and adding a device driver to an offline image. It is now possible to repair with DISM any image using either a Windows Installation CD or Windows Update.
Before Windows Server 2012 and Windows 8, DISM had incorporated the majority of ImageX functions but not all; ImageX was still needed for image capture and applying. However, DISM deprecated ImageX in Windows 8.
Windows 8.1 added ability to apply and capture disk images, and Windows 10 extended image applying, by adding compression.
Support in other operating systems
Since April 30, 2012, an open-source library for handling the WIM format is available. This library can be used on Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
systems, as well as on Windows. Thanks to this project, Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
distributions now have their own imagex clone called ''wimlib-imagex'', which allows mounting WIM images and managing them (read/write) like any other block-storage provider.
As WIM images use somewhat common compression algorithms, they can be accessed by using file archiver
In computing, a file archiver is utility software that combines computer file, files into a single archive file or in less common cases, multiple files.
A minimally designed archiver might concatenate the content of files along with file file n ...
s like 7-Zip
7-Zip is a free and open-source file archiver, a utility used to place groups of files within compressed containers known as "archives". It is developed by Igor Pavlov and was first released in 1999. 7-Zip has its own Archive file, archive forma ...
.
For other operating systems that might not support this format, it is still possible to convert .wim images to the more commonly used ISO image using the Windows Assessment and Deployment Kit on Windows.
See also
* Windows Preinstallation Environment
* System Deployment Image
* Windows To Go
References
External links
Windows Imaging Format Whitepaper that describes the internal file structure of WIM files
ImageX and WIM Image Format
at Microsoft TechNet
{{Windows Components
Archive formats
Windows Vista
Windows Server 2008
Disk images