Windows Imaging Format: Difference between revisions

Content deleted Content added
Wget (talk | contribs)
Add a note about the possible conversion to ISO images wrt. the discussion in the talk page
i installed windows flp and embedded 2009 they only a boot.wim the install files are still in i386 folder
 
(33 intermediate revisions by 27 users not shown)
Line 1:
{{Short description|File format}}
{{Infobox file format
| name = Windows Imaging Format
| icon =
| extension = <tt>.wim .swm</tt>
| extension = {{mono|.wim}}, {{mono|.swm}}, {{mono|.esd}}
| mime =
| mime = application/x-ms-wim<ref name="x-ms-wim">{{cite web|url=https://reposcope.com/mimetype/application/x-ms-wim|title=application/x-ms-wim|access-date=2019-03-10|archive-date=2021-09-04|archive-url=https://web.archive.org/web/20210904111110/https://reposcope.com/mimetype/application/x-ms-wim|url-status=dead}}</ref>
| genre = [[Disk image]]
| url =
| containerfor =
| containedby =
| owner = [[Microsoft]]
| extendedfrom =
| extendedto =
| magic = {{mono|MSWIM\0\0\0}} / {{mono|WLPWM\0\0\0}} for wimlib [[Pipeline (Unix)|pipable]] variant<ref name="wimcapture">{{cite web|url=https://wimlib.net/man1/wimcapture.html|title=WIMCAPTURE|language=en|date=2018-11-24|access-date=2019-03-10}}</ref>
| magic = <code>MSWIM</code>
}}
The '''Windows Imaging Format''' ('''WIM''') is a [[Computer file|file]]-based [[disk image]] [[file format|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]].<ref>{{cite web|url=http://technet.microsoft.com/en-us/library/dd799284%28v=ws.10%29.aspx|title=Windows Imaging File Format (WIM)|publisher=[[Microsoft]]|accessdate=24 Feb 2014}}</ref>
 
== Design ==
Like other [[disk image]] formats, a WIM [[Computer file|file]] contains a set of files and associated [[filesystem]] [[metadata]]. However, unlike [[Disk sector|sector]]-based formats (such as [[ISO image|ISO]] or [[VHD (file format)|VHD]]), WIM is file-based: Thethe 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 buffer|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 <tt>{{mono|.swm</tt>}} extension.
 
WIM images can be made [[booting|bootable]]. and Windows [[boot loader]] supports booting Windows from within 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 ([[NTFS#WIMBoot|WIMBoot]]).<ref name=wimboot>[https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-8.1-and-8/dn594399(v=win.10) Windows Image File Boot (WIMBoot) Overview]</ref> Since [[Windows 10]], system files can be compressed on the system disk ([[NTFS#CompactOS|CompactOS]]).<ref name=compactos>{{cite web |title=Compact OS, single-instancing, and image optimization |url=https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/compact-os |publisher=Microsoft |access-date=1 October 2019 |language=en-us}}</ref>
 
WIM supports three families of [[LZ77]]-based compression algorithms in ascending ratio and descending speed: XPRESS,<ref name=ms-xca>{{cite web | url=https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-xca/ | title=&#91;MS-XCA&#93;: Xpress Compression Algorithm | date=31 January 2023 }}</ref> [[LZX]], and LZMS.<ref name=wmilib-compression>[https://wimlib.net/compression.html 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]].<ref name=wimlib-compression-type>{{cite web |last1=Biggers |first1=Eric |title=wimlib_compression_type |url=https://wimlib.net/apidoc/group__G__general.html#gaf713fb36023a651f206a546e645ad09e |website=Wimlib documentation |access-date=2 October 2019}}</ref> 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.<ref>{{cite web |last1=Biggers |first1=Eric |title=WIMLIB_WRITE_FLAG_SOLID |url=https://wimlib.net/apidoc/group__G__writing__and__overwriting__wims.html#gab40a17c158783415c4c0dfa0de8b740c |website=Wimlib documentation}}</ref>
 
WIM uses [[SHA-1]] algorithm to calculate checksum for whole archive.<ref> {{Cite web |title=assorted/documentation/Windows Imaging (WIM) file format.asciidoc at main · libyal/assorted |url=https://github.com/libyal/assorted/blob/main/documentation/Windows%20Imaging%20(WIM)%20file%20format.asciidoc |access-date=2025-04-13 |website=GitHub |language=en}}</ref>
 
== Tools ==
 
=== ImageX ===
ImageX is the command-line tool used to create, edit and deploy [[Windows]] disk images in the Windows Imaging Format. ItAlong 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 buildbuilt 6.0.4007.0 (main.030212-2037). It allowed Microsoft [[OEM]] partners to experiment with the imaging technology and was developed in parallel with [[List of Microsoft codenames#Longhorn|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 [[LZX|LZX compression]] algorithms. It has been used since pre-RC (release candidates) of Windows Vista.
ImageX is the command-line tool used to create, edit and deploy [[Windows]] disk images in the Windows Imaging Format. It is distributed as part of the free [[Windows Automated Installation Kit]] (WAIK). Starting with [[Windows Vista]], Windows Setup uses the WAIK API to install Windows.
 
The first distributed prototype of ImageX was build 6.0.4007.0 (main.030212-2037). It allowed Microsoft [[OEM]] partners to experiment with the imaging technology and was developed in parallel with [[List of Microsoft codenames#Longhorn|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 [[LZX|LZX compression]] algorithms. It has been used since pre-RC (release candidates) of Windows Vista.
 
=== DISM ===
{{mainMain|Windows Assessment and Deployment Kit}}
Deployment Image Service and Management Tool (DISM) is a tool introduced in Windows 7<ref name=DISM-WinITPro /> and Windows Server 2008 R2<ref name=DISM-WinITPro /> 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.<ref name=DISM-WinITPro>{{cite web |url=http://windowsitpro.com/systems-management/q-whats-deployment-image-servicing-and-management-dism |title=Q. What's Deployment Image Servicing and Management (DISM)? |work=[[Windows IT Pro]] |publisher=[[Penton (company)|Penton]] |date=29 January 2010 |first=John |last=Savill}}</ref><ref>{{cite web|url=httphttps://technet.microsoft.com/en-us/library/hh824821.aspx|title=Deployment Image Servicing and Management (DISM) Technical Reference|date=29 February 2012|accessdateaccess-date=6 Oct 2012|publisher=[[Microsoft]]}}</ref><ref>{{cite web |url=httphttps://technet.microsoft.com/library/dd744566 |title=What Is Deployment Image Servicing and Management? |date=22 October 2009 |accessdateaccess-date=14 Dec 2012 |work=[[Microsoft TechNet]] |publisher=Microsoft}}</ref> It is now possible to repair with DISM any image using either a Windows Installation CD or [[Windows Update]].<ref>{{cite web|title=Repair a Windows Image - Technet - Microsoft|url=https://technet.microsoft.com/en-us/library/hh824869.aspx|website=[[Microsoft Technet]]|publisher=[[Microsoft]]|date=20 October 2013}}</ref>
 
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.<ref name=DISM-WinITPro /> However, DISM [[deprecated]] ImageX in Windows 8.<ref>{{cite web|title=What is DISM?|url=https://technet.microsoft.com/en-us/library/hh825236.aspx|website=[[Microsoft TechNet|TechNet]]|publisher=[[Microsoft]]|date=18 April 2014}}</ref>
 
Windows 8.1 added ability to apply and capture disk images, and Windows 10 extended image applying, by adding compression.
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.<ref name=DISM-WinITPro /> However, DISM [[deprecated]] ImageX in Windows 8.<ref>{{cite web|title=What is DISM?|url=https://technet.microsoft.com/en-us/library/hh825236.aspx|website=[[Microsoft TechNet|TechNet]]|publisher=[[Microsoft]]|date=18 April 2014}}</ref>
 
=== {{anchor|wimlib}} 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[[Unix-like]] systems, as well as on Windows. Thanks to this project, GNU/[[Linux]] distributions now have their own imagex clone called ''wimlib-imagex'', which allows mounting WIM images and managing them (read/write) like any other fileblock-storage systemprovider.<ref>{{cite web |url=https://wimlib.net/ |title=the open -source Windows Imaging (WIM) library |accessdateaccess-date=2015-12-21}}</ref>
 
As WIM images areuse basicallysomewhat using the [[LZX|LZXcommon compression]] algorithmalgorithms, they can be accessed by using [[file archiver]]s 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|ISO image]] using the [[Windows Assessment and Deployment Kit]] on Windows.<ref>{{cite web |url=https://social.technet.microsoft.com/Forums/office/en-US/164c629a-c702-4b46-b3a2-6441e7e7f6ed/wim-to-iso-or-what |title=WIM to ISO or what |date=September 4, 2007 |accessdateaccess-date=October 30, 2016}}</ref>
 
== See also ==
* [[Windows Preinstallation Environment]]
* [[System Deployment Image]]
* [[Windows To Go]]
 
== References ==
{{Reflist}}
 
== External links ==
* [http://download.microsoft.com/download/f/e/f/fefdc36e-392d-4678-9e4e-771ffa2692ab/Windows%20Imaging%20File%20Format.rtf Windows Imaging Format Whitepaper that describes the internal file structure of WIM files]
* [httphttps://technet.microsoft.com/en-us/library/cc507842.aspx ImageX and WIM Image Format] at [[Microsoft TechNet]]
 
{{Disk images}}