Windows Imaging Format

Last updated
Windows Imaging Format
Filename extension
.wim, .swm, .esd
Internet media type
application/x-ms-wim [1]
Magic number MSWIM\0\0\0 / WLPWM\0\0\0 for wimlib pipable variant [2]
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 help deploy Windows Vista and subsequent versions of the Windows operating system family, as well as Windows Fundamentals for Legacy PCs. [3]

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 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 .swm extension.

WIM images can be made bootable and Windows boot loader 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). [4] Since Windows 10, system files can be compressed on the system disk (CompactOS). [5]

WIM supports three families of LZ77-based compression algorithms in ascending ratio and descending speed: XPRESS, [6] LZX, and LZMS. [7] The former two use Huffman encoding, while the latter uses adaptive Huffman encoding with range coding. [8] 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. [9]

Tools

ImageX

ImageX is the command-line tool used to create, edit and deploy Windows 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 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 [10] and Windows Server 2008 R2 [10] 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. [10] [11] [12] It is now possible to repair with DISM any image using either a Windows Installation CD or Windows Update. [13]

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. [10] However, DISM deprecated ImageX in Windows 8. [14]

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 systems, as well as on Windows. Thanks to this project, Linux 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. [15]

As WIM images use somewhat common compression algorithms, they can be accessed by using file archivers like 7-Zip.

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. [16]

See also

Related Research Articles

New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family. It superseded File Allocation Table (FAT) as the preferred filesystem on Windows and is supported in Linux and BSD as well. NTFS reading and writing support is provided using a free and open-source kernel implementation known as NTFS3 in Linux and the NTFS-3G driver in BSD. By using the convert command, Windows can convert FAT32/16/12 into NTFS without the need to rewrite all files. NTFS uses several files typically hidden from the user to store metadata about other files stored on the drive which can help improve speed and performance when reading data. Unlike FAT and High Performance File System (HPFS), NTFS supports access control lists (ACLs), filesystem encryption, transparent compression, sparse files and file system journaling. NTFS also supports shadow copy to allow backups of a system while it is running, but the functionality of the shadow copies varies between different versions of Windows.

<span class="mw-page-title-main">Disk partitioning</span> Creation of separate accessible storage areas on a secondary computer storage device

Disk partitioning or disk slicing is the creation of one or more regions on secondary storage, so that each region can be managed separately. These regions are called partitions. It is typically the first step of preparing a newly installed disk, before any file system is created. The disk stores the information about the partitions' locations and sizes in an area known as the partition table that the operating system reads before any other part of the disk. Each partition then appears to the operating system as a distinct "logical" disk that uses part of the actual disk. System administrators use a program called a partition editor to create, resize, delete, and manipulate the partitions. Partitioning allows the use of different filesystems to be installed for different kinds of files. Separating user data from system data can prevent the system partition from becoming full and rendering the system unusable. Partitioning can also make backing up easier. A disadvantage is that it can be difficult to properly size partitions, resulting in having one partition with too much free space and another nearly totally allocated.

Cabinet is an archive-file format for Microsoft Windows that supports lossless data compression and embedded digital certificates used for maintaining archive integrity. Cabinet files have .cab filename extensions and are recognized by their first four bytes MSCF. Cabinet files were known originally as Diamond files.

<span class="mw-page-title-main">Live CD</span> Complete, bootable computer installation that runs directly from a CD-ROM

A live CD is a complete bootable computer installation including operating system which runs directly from a CD-ROM or similar storage device into a computer's memory, rather than loading from a hard disk drive. A live CD allows users to run an operating system for any purpose without installing it or making any changes to the computer's configuration. Live CDs can run on a computer without secondary storage, such as a hard disk drive, or with a corrupted hard disk drive or file system, allowing data recovery.

LZX is an LZ77 family compression algorithm, a slightly improved version of DEFLATE. It is also the name of a file archiver with the same name. Both were invented by Jonathan Forbes and Tomi Poutanen in the 1990s.

<span class="mw-page-title-main">Windows Vista</span> Seventh major release of Windows NT

Windows Vista is a major release of Microsoft's Windows NT operating system. It was released to manufacturing on November 8, 2006, and became generally available on January 30, 2007, on the Windows Marketplace, the first release of Windows to be made available through a digital distribution platform. Vista succeeded Windows XP (2001); at the time, the five-year gap between the two was the longest time span between successive Windows releases.

<span class="mw-page-title-main">Windows Preinstallation Environment</span> Lightweight version of Microsoft Windows for deployment

Windows Preinstallation Environment is a lightweight version of Windows used for the deployment of PCs, workstations, and servers, or troubleshooting an operating system while it is offline. It is intended to replace MS-DOS boot disks and can be booted via USB flash drive, PXE, iPXE, CD, DVD, or hard disk. Traditionally used by large corporations and OEMs, it is now widely available free of charge via Windows Assessment and Deployment Kit (WADK).

In Linux systems, initrd is a scheme for loading a temporary root file system into memory, to be used as part of the Linux startup process. initrd and initramfs refer to two different methods of achieving this. Both are commonly used to make preparations before the real root file system can be mounted.

An NTFS reparse point is a type of NTFS file system object. It is available with the NTFS v3.0 found in Windows 2000 or later versions. Reparse points provide a way to extend the NTFS filesystem. A reparse point contains a reparse tag and data that are interpreted by a filesystem filter driver identified by the tag. Microsoft includes several default tags including NTFS symbolic links, directory junction points, volume mount points and Unix domain sockets. Also, reparse points are used as placeholders for files moved by Windows 2000's Remote Storage Hierarchical Storage System. They also can act as hard links, but are not limited to pointing to files on the same volume: they can point to directories on any local volume. The feature is inherited to ReFS.

Windows Vista contains a range of new technologies and features that are intended to help network administrators and power users better manage their systems. Notable changes include a complete replacement of both the Windows Setup and the Windows startup processes, completely rewritten deployment mechanisms, new diagnostic and health monitoring tools such as random access memory diagnostic program, support for per-application Remote Desktop sessions, a completely new Task Scheduler, and a range of new Group Policy settings covering many of the features new to Windows Vista. Subsystem for UNIX Applications, which provides a POSIX-compatible environment is also introduced.

A Microsoft Windows Emergency Repair Disk (ERD) is a specially formatted diskette that creates backups of important system files and settings and is used to troubleshoot and repair problems in Microsoft Windows NT and Windows 2000 systems. An ERD is used in conjunction with the Windows repair option. The Emergency Repair Disk provides only the ability to restore the system to a bootable state. It is not a replacement for system and file backups. Note: The emergency repair disk is not to be confused with a standard boot diskette as it cannot be used alone.

Windows Deployment Services (WDS) is a deprecated component of the Windows Server operating system that enables centralized, network-based deployment of operating systems to bare-metal computers. It is the successor to Remote Installation Services (RIS). WDS officially supports remote deployment of Windows Vista and later, as well as Windows Server 2008 and later. However, because WDS uses disk imaging, in particular the Windows Imaging Format (WIM), it could deploy virtually any operating system. This is in contrast with its predecessor, RIS, which was a method of automating the installation process.

VHD and its successor VHDX are file formats representing a virtual hard disk drive (HDD). They may contain what is found on a physical HDD, such as disk partitions and a file system, which in turn can contain files and folders. They are typically used as the hard disk of a virtual machine, are built into modern versions of Windows, and are the native file format for Microsoft's hypervisor, Hyper-V.

<span class="mw-page-title-main">EasyBCD</span> Software for Microsoft Windows

EasyBCD is a program developed by NeoSmart Technologies to configure and tweak the Boot Configuration Data (BCD), a boot database first introduced in Windows Vista and used in all subsequent Windows releases. EasyBCD can be used to set up multi-boot environments for computers on which some versions of Windows, Linux, BSD and Mac OS X can be simultaneously installed; EasyBCD can also be used for adding entries to bootable tools and utilities, as well as modifying and controlling the behavior of the Windows boot menu. EasyBCD 2.3 introduced additional support for creating and managing entries for UEFI-based Windows entries in the boot menu. As of June 20, 2011 with the release of EasyBCD 2.1, it is no longer free for use in commercial environments which require the purchase of a paid license, however it remains free for home and non-profit use without limitations.

Windows Assessment and Deployment Kit, formerly Windows Automated Installation Kit, is a collection of tools and technologies produced by Microsoft designed to help deploy Microsoft Windows operating system images to target computers or to a virtual hard disk image in VHD format. It was first introduced with Windows Vista. WAIK is a required component of Microsoft Deployment Toolkit.

A System Deployment Image is a file format used primarily with Microsoft products to contain an arbitrary disk image, including boot sector information.

<span class="mw-page-title-main">Windows Setup</span> Installer that prepares a hard disk drive for a Microsoft Windows operating system installation

Windows Setup is an installer that prepares a computer for a Microsoft Windows installation by allowing the user to pick installation settings and copying the files to the drive.

Side-by-side assembly technology is a standard for executable files in Windows 98 Second Edition, Windows 2000, and later versions of Windows that attempts to alleviate problems that arise from the use of dynamic-link libraries (DLLs) in Microsoft Windows. Such problems include version conflicts, missing DLLs, duplicate DLLs, and incorrect or missing registration. In side-by-side, Windows stores multiple versions of a DLL in the %systemroot%\WinSxS directory, and loads them on demand. This reduces dependency problems for applications that include a side-by-side manifest.

<span class="mw-page-title-main">Rufus (software)</span> USB drive software

Rufus is a free and open-source portable application for Microsoft Windows that can be used to format and create bootable USB flash drives or Live USBs.

<span class="mw-page-title-main">Booting process of Windows NT Setup before Vista</span>

The booting process of Windows NT Setup before Vista works very similarly to the one of a regular Windows NT boot except that it runs from a CD-ROM. For this boot method to work, the BIOS must be compatible with the El Torito specification. The ISO 9660 file system on the install CD is not fully compatible with the standard. Although it is "Level 1", the file names don't have the file version appended to them. The boot image is of the "no emulation" type, 1 sector long and is loaded at segment 0x7c0. It can be extracted from an ISO image by using a file-extraction program such as 7-Zip or WinZip. The ISO image is also not hybridized like ISO images from most Linux distributions and therefore it does not contain any master boot record (MBR) which makes it unable to boot by just copying the image over a block device such as a pen drive.

References

  1. "application/x-ms-wim". Archived from the original on 2021-09-04. Retrieved 2019-03-10.
  2. "WIMCAPTURE". 2018-11-24. Retrieved 2019-03-10.
  3. "Windows Imaging File Format (WIM)". Microsoft . Retrieved 24 Feb 2014.
  4. Windows Image File Boot (WIMBoot) Overview
  5. "Compact OS, single-instancing, and image optimization". Microsoft. Retrieved 1 October 2019.
  6. "[MS-XCA]: Xpress Compression Algorithm". 31 January 2023.
  7. wimlib: the open source Windows Imaging (WIM) library - Compression algorithm
  8. Biggers, Eric. "wimlib_compression_type". Wimlib documentation. Retrieved 2 October 2019.
  9. Biggers, Eric. "WIMLIB_WRITE_FLAG_SOLID". Wimlib documentation.
  10. 1 2 3 4 Savill, John (29 January 2010). "Q. What's Deployment Image Servicing and Management (DISM)?". Windows IT Pro. Penton.
  11. "Deployment Image Servicing and Management (DISM) Technical Reference". Microsoft. 29 February 2012. Retrieved 6 Oct 2012.
  12. "What Is Deployment Image Servicing and Management?". Microsoft TechNet . Microsoft. 22 October 2009. Retrieved 14 Dec 2012.
  13. "Repair a Windows Image - Technet - Microsoft". Microsoft Technet . Microsoft. 20 October 2013.
  14. "What is DISM?". TechNet . Microsoft. 18 April 2014.
  15. "the open-source Windows Imaging (WIM) library" . Retrieved 2015-12-21.
  16. "WIM to ISO or what". September 4, 2007. Retrieved October 30, 2016.