Download the wim editing program. What is the WIM file extension? What is the .WIM file format used for?

16.06.2010 20:41

Files installed Windows 7 may be damaged or deleted by mistake or as a result of computer infection by viruses, Trojan horses and other dangerous programs. Instead of reinstalling Windows 7 because of one or two damaged files, you can extract the necessary files from the Windows 7 installation DVD.

All Windows files 7 compressed and packed into an image file install.wim, located in the folder sources installation disk Windows 7. There are two ways to open a WIM file and extract the necessary data from it:

Mounting an image using DISM

1. Insert the installation Windows disk 7 into your DVD drive, open it and copy the file install.wim from folder sources to drive D.

2. Create a folder on drive D and name it, for example, wseven. The install.wim image will be included in this folder. Please note that you CANNOT use the root of drive C as the folder for mounting the install.wim image.

3. Open Start > All Programs > Accessories .

4. Run the command:

dism /Mount-Wim /WimFile:D:\install.wim /name:"Windows 7 Ultimate" /MountDir:D:\wseven

Explanations:

  • dism is a built-in utility in Windows 7 command line, which allows you to connect and manage WIM images.
  • The /Mount-Wim parameter mounts the WIM file.
  • The /WimFile parameter allows you to specify the location and name of the WIM file to be mounted.
  • The /name parameter allows you to specify the name of the Windows 7 edition that will be mounted.
  • /MountDir: Specifies the directory where the WIM image will be mounted.

6. Wait for the image to connect. This may take a few minutes.

7. Open the D:\wseven folder, find the file you need in it and copy it to any location on your hard drive (for example, replace a damaged Windows 7 file).

Disabling an image in DISM

After copying necessary files the image can be disabled.

1. Close all folders and files.

2. Open Start > All Programs > Accessories, right-click the command prompt icon and select Run as administrator.

3. Run the command:

dism /Unmount-Wim /MountDir:D:\wseven /discard

Explanations:

  • The /Unmount-Wim option unmounts the image.
  • /MountDir: Specifies the folder in which the image you want to mount is mounted.
  • The /discard option discards all changes made to the image.

4. Wait for the image to shut down.

5. Delete the folder wseven and file install.wim from drive D.

Opening a WIM file using 7-zip archiver

1. Download and install free archiver 7-zip.

2. Insert the Windows 7 installation disc into the DVD drive, open the folder Sources and find the file in it install.wim.

3. Right click on the file install.wim and in the context menu that appears, select To open with.

4. In the window that opens, select 7-zip File Manager and press OK.

5. The archiver window can display from one to five folders, depending on the edition of Windows 7. The installation images of 32-bit Windows 7 contain all editions except Enterprise, so there will be five folders:

  • folder “1” contains all folders and files of Windows 7 Starter;
  • in folder “2” - all folders and files of Windows 7 Home Basic;
  • in folder “3” – Windows 7 Home Premium (Home Premium);
  • in folder “4” – Windows 7 Professional (Professional);
  • in folder “5” – Windows 7 Ultimate.

The installation images of 64-bit Windows 7 do not have the Starter edition, so there will be only four folders:

  • Folder “1” contains all Windows 7 Home Basic folders and files;
  • in folder “2” – Home Premium (Home Extended);
  • in folder “3” – Professional;
  • in folder “4” – Ultimate.

In the installation images of Windows 7 Enterprise (Corporate) there is only one folder - with the “Corporate” itself; other editions are not included in the distribution kit.

Hello. Thanks for answering.

But my problem is a little different.

I wanted to activate Windows which is in the AiRecovery section.

I have a Windows 7pro x64 license in the AiRecovery section.

After installation from the AiRecovery partition via F9

activated by the key on the back

laptop cover, 100% no problem.

Now it's just a little inconvenience after

installations from the AiRecovery section. Before renovation

when i installed windows 7 it automatically

activated. If the Internet was not connected, then windows

installed with 3 days automatic activation,

if there was no network access for 3 days, then windows

switched to a 30-day trial status, and activate

could be done manually.

Now, when installed in the right

in the bottom corner of the screen under the ASUS obviator in small font

It says that I am not using a legal version of Windows.

And after installation the screen is black, installation

The picture is not installed. This means that I have to

activate windows manually every time and after

activation install installation image

also by hand.

4 years ago there was an article on asus.ru

Editing the Recovery partition. The article included these

After the successful completion of the process, you need to boot the laptop from the disk itself... and... The loaded OS, which we deployed from the images, will be launched in Audit mode.

It didn’t work out for me, apparently the article was written

for windows 7 x32.

On the official website of Asus I found

If you have configured your Windows image to boot to OOBE, but then need to make further configurations to your image in audit mode, you can do one of the following:
Use the CTRL+SHIFT+F3 keyboard shortcut. The computer will reboot into audit mode.
This option may trigger any scripts that you have configured to launch in OOBE

and that’s the only way I was able to enter audit mode. Activating Windows

and after passing “generalize” two drivers crashed

These are video and audio drivers.

In general, with Windows activation

everything worked out, but since I reinstalled the drivers

Windows turned out to be longer by about 500 megabytes.

And I had 3 questions:

1). Is it possible in the AiRecovery section to combine swm images into a wim image and activate windows in it?

since this is the most The best way solving this issue.

2). If not, is it possible to prevent the flight?

video and audio drivers when going through “generalize”.

3). If not, is it possible to activate drivers that

if you look at the volume, most likely they were deactivated

when passing “generalize”

because when installing the drivers again, windows volume increases by the volume of newly installed drivers.

...development of OS cloning from homemade sector cloning via a flash drive to industrial file cloning over a network...

To clone operating systems I previously used paid programs Symantec Ghost or Acronis True Image. They performed their functions and suited me... Until I became acquainted with Windows Deployment Services - an even more powerful tool from Microsoft for centralized OS deployment, which is available as a role in Windows Server starting from version 2008.

This article will cover the following topics:

Cloning methods

There are two ways to clone an OS: sector and file, each of them has its pros and cons.

Sector

The traditional method is used by programs such as Symantec Ghost and Acronis True Image.

Advantages:

  • Versatility - as a rule, when cloning, the type of operating system is not important, as long as the file system is supported.
  • Speed ​​- sector copying is much faster than file copying (file system structure and fragmentation do not greatly affect copying speed).

Flaws:

  • After creating an image, there is no way to somehow edit it offline (without deploying it to disk).
  • It is not possible to deploy an image to the target partition on top of its contents (leaving existing files).
  • The format is closed - as a rule, only the software that created the image can work with this image.

File

At this method in the Microsoft implementation, the OS image is captured at the file level using the ImageX utility; the resulting image file is in WIM format.

Advantages:

  • Ability to connect an image to file system and edit it offline. You can even install updates and drivers on operating systems that support this function (starting with Vista).
  • The format is open, third-party software can also work with it.
  • Good compression, nothing unnecessary is added to it during the image capture process. It is possible to combine multiple images into one file, without duplicate files taking up additional space.

Flaws:

  • Low speed (all features of file placement and fragmentation matter).
  • Limited OS and file system support (Microsoft only, starting with Windows XP)

Working with WIM images

There are several operating systems for creating, editing and deploying WIM images. standard means, which complement each other:

  • ImageX is a text-based utility for creating, editing and applying WIM images.
  • Windows Automated Installation Kit - a set of image creation tools for automated OS installation, contains Windows PE.
  • Windows Deployment Services, which will be discussed below.
  • Microsoft Deployment Toolkit is an advanced package for fine tuning installation images (download). The functionality partially overlaps with WDS: working with the network is limited to a file share, but there are wider possibilities for setting up actions performed by images (Task Sequence).
  • System Center Configuration Manager is a powerful tool for centralized OS deployment without user intervention (zero-touch install), combines and uses the programs listed above.
On a note

The Internet is full of articles on how to create and deploy OS images from the command line using ImageX; partition and format disks using the even more inconvenient DiskPart. Personally, I'm not a fan of the command line, so I prefer to do all these operations with the mouse, using the capabilities of WDS.

Windows Deployment Services

This role has been available in Windows Server since version 2008; the predecessor role in Windows Server 2003 was called RIS.

WDS allows you to:

  • Systematically store prepared WIM images of operating systems in one place.
  • Boot computers over the network from boot images using PXE.
  • Deploy OS Windows family(XP, Server 2003, Vista, 7, Server 2008/2008R2) from stored installation images (Install Images).
  • Perform parallel OS deployment on multiple computers using multicast.

The WDS service is quite simple and user-friendly, and its built-in help is short and clear. After installing WDS, in the initial configuration wizard, I recommend selecting Respond to all clients computers at the PXE Response Policy setup stage. This will save us from preliminary manual creation of objects in Active Directory for each computer booted over the network.

After completing the initial configuration wizard, WDS is ready to use. I suggest you start learning by adding a standard Windows 7 WIM installation image (Install Image) to the server, which can be taken from the installation disk at \sources\install.wim. To boot computers over the network and deploy installation images on them, you need to add boot images(Boot Images), which I will talk about in more detail later.

On a note

It is very convenient to use virtual machines to practice cloning scenarios.

In order to virtual machine on Hyper-V could boot over the network, you need to add the Legacy Network Adapter to its hardware configuration.

WDS boot images

These are sets of images from which the computer is loaded to perform certain cloning actions. There are 3 standard types of boot images.

Setup Boot Image - installing boot image

After booting from such an image, the computer connects to the WDS server over the network (asks for a name and password), reads the list of installation images available for deployment, and after selecting the image allows you to manage partitions from a graphical environment hard drive computer, just like a regular Windows 7 installer (delete, create, format). After selecting a partition for installation, the previously selected installation image begins to deploy to it.

To add Setup Boot Image to the WDS server, just run the Add Boot Image command and specify \sources\boot.win from the regular Win7/WS2008R2 installation disk of the desired language and bitness as the source file.

On a note

64-bit boot images allow you to deploy and clone 32-bit and 64-bit OSes, while 32-bit boot images allow you to deploy and clone 32-bit OSes only.

Capture Boot Image - a captivating boot image

Booting from such an image will be provided GUI allowing:

  • Select the partition on the computer that you want to “capture” into a WIM image.
  • Set a name and description for the image.
  • Select the location of the created WIM file.
  • Optionally send the resulting WIM image to the WDS server over the network.
On a note

Capture Boot Image allows you to create images only for operating systems prepared using SysPrep.

Let me remind you that SysPrep for WinXP/WS2003 is on the installation disk in \support\deploy.cab. Preparation is performed with the command sysprep -mini -reseal -reboot.

In OS starting from Vista, SysPrep is located on system disk in the \windows\system32\sysprep directory. Preparation is performed with the command sysprep /oobe /generalize /reboot.

To add a Capture Boot Image to the WDS server, just right-click on the existing Setup Boot Image and select Create Capture Image from the context menu.

Discover Boot Image - detecting boot image

This image allows computers that do not support network boot (PXE) to boot traditional way(from a CD or flash drive) and connect to the WDS server to deploy available installation images from it, similar to how Setup Boot Image works.

To create a Discover Boot Image, you need to right-click on the existing Setup Boot Image and select Create Discover Image. The result of this operation will be a bootable WIM image. I will tell you further about how to create bootable ISO images and flash drives with WIM files.

Creating bootable media

It is not always possible to boot a computer over a network from a WDS server, so it may be necessary to locally download Setup and Capture images from a CD or flash drive.

To create such media, you must first install the Windows Automated Installation Kit (WAIK, downloadable) and follow these steps.

1. As an administrator, run Deployment Tools Command Prompt.

2. Execute

copype x86 c:\Deploy\WinPE_x86

where instead of x86 you can choose another bit depth (x86, amd64, ia64).

3. Copy the bootable WIM image (Setup, Capture, Discover) you need to the c:\Deploy\WinPE_x86\ISO\sources folder and name it boot.wim.

4. Now at c:\Deploy\WinPE_x86\ISO there is a template for creating bootable media.

Creating a Bootable ISO Image

From Deployment Tools Command Prompt execute

oscdimg -bc:\Deploy\WinPE_x86\etfsboot.com c:\Deploy\WinPE_x86\ISO c:\Deploy\WinPE_x86\image.iso

As a result, a bootable ISO image image.iso will be created, ready for recording on a disc or connecting to virtual machines.

Creating a bootable USB flash drive

1. Format the flash drive in FAT32, make this partition active.

2. Take the bootsect.exe utility from the \boot folder of the Win7/WS2008R2 installation disk of the required bit depth.

3. Run as administrator

bootsect /nt60 e: /force

where e: is the drive letter of the flash drive.

4. Copy the contents of c:\Deploy\WinPE_x86\ISO to the root of the flash drive.

The bootable USB flash drive is ready.

On a note

This option is especially convenient because once you create such bootable USB flash drive, you can easily change the boot (boot.win) and installation (install.wim) images on it as needed.

An example of using WDS for centralized OS deployment

  1. Add a standard Windows 7 installation image to the WDS server (from the \sources\install.wim installation disk).
  2. We load the sample computer over the network into the Setup Boot Image, and deploy Windows 7 from the standard image.
  3. We configure the installed OS as we need.
  4. Preparing the OS for cloning using SysPrep.
  5. We clone using Capture Boot Image and upload the resulting WIM image to the WDS server.
  6. Deploying a sample WIM on necessary computers over the network using Install Boot Image or from other media (flash drives, CDs).

useful links

  • Deploying Windows 7 is a 29-part series by Mitch Tulloch, author of many Microsoft Press books.

WIM: Applies a Windows image file (WIM) or split Windows image (SWM) to a specific partition.

This option does not support applying an image from a virtual hard disk (VHD), although you can use this command to apply images to a mounted, partitioned, and formatted VHDX file.

/CheckIntegrity Detects and monitors WIM file corruption when used with write, unmount, export, and commit operations. /CheckIntegrity stops the operation if DISM detects that the .wim file is corrupt in the apply and connect operations.

/Verify checks for errors and duplicate files.

/NoRpFix disables reparse point tag fixing. A reparse point is a file that contains a reference to another file in the file system. If the parameter /NoRpFix not specified, reparse points pointing to paths outside the value specified /ImageFile, will not be recorded.

/SWMFile Allows you to specify a link to split WIM (SWM) files. pattern is a pattern for naming and locating split files. You can also specify wildcards. For example, the value E:\image\install*.swm applies all split files in the E:\image directory named install1.swm, install2.swm, etc.

/ConfirmTrustedFile Verifies the image to work with the Trusted Desktop on Windows 10, Windows 8.1, or Windows 8. This setting can only be used on a computer running at least WinPE 4.0.

Note

Using /Apply-Image with parameter /ConfirmTrustedFile in WinPE always add the parameter /ScratchDir, indicating the location of the physical media. This ensures that short file names are always available. Detailed description default behavior when using parameter /ScratchDir see section.

/WIMBoot Windows 8.1 only: Applies the Windows Image File Boot (WIMBoot) configuration to the image. This only applies to Windows images 8.1 that were recorded or exported as a WIMBoot file.

Important

This feature is not supported on Windows 10.

/Compact: Applies the image in compact mode, saving space. Replaces WIMBoot. Windows 10 classic editions only (Home, Pro, Enterprise, and Education)

Dism /apply-image /imagefile:install.wim /index:1 /ApplyDir:D:\

Dism /apply-image /imagefile:install.swm /swmfile:install*.swm /index:1 /applydir:D:\

FFU: Applies an FFU image to the specified drive. For Windows 10 only.

This option does not support applying an image from a virtual hard disk (VHDX) file, but you can use this command to apply the entire image to a VHD.

/ImageFile specifies the path to the FFU file, for example: flash.ffu.

/ApplyDrive specifies the logical drive using DeviceID.

Getting the device ID:

    From the command line: wmic diskdrive list brief

    From drive C: system("wmic diskdrive list");

Note. The VHD may appear in the description with the name PhysicalDrive, such as \\.\PhysicalDrive2.

Use the parameter /SFUFile to specify a link to split FFU (SFU) files. This is a pattern for naming and distributing split files.

Use the parameter /SkipPlatformCheck, if the FFU file being applied is for a device other than the one on which the application is running. A special FFU file is required.

DISM.exe /Apply-Ffu /ImageFile:flash.ffu /ApplyDrive:\\.\PhysicalDrive0

DISM.exe /Apply-Ffu /ImageFile:flash.sfu /SFUFile:flash*.sfu /ApplyDrive:\\.\PhysicalDrive0

If you System Administrator, then you will definitely be faced with the question of mass deployment of the operating system on user computers. And no matter how you deploy it - from USB, through a WDS server with MDT, using SCCM - in any case, you will use a WIM file with an operating system image.

Overview of OS fork methods

  1. Installation with bootable usb drive. The answer file should be located on it in the root of the disk autounattend.xml. This is the file you create in advance using Windows System Image Manager (SIM) which is included in the kit Windows package ADK. Please note that all Windows 10 builds have their own ADK version. You can download it from the Microsoft website. The OS image file itself with the WIM or ESD extension is located in the sources folder of your USB. You can take the original MSDN image, copy it from somewhere, or prepare your own. You need to integrate the drivers in advance into the WIM file or put them in the $OEM$ subfolder, and the path to it is indicated in the autounattend.xml file.
    This method is suitable for single installations without the possibility of deep customization for different tasks, different users or different iron.
  2. Deployment with MDT c USB storage . In this case, myself boot disk you prepare using MDT (Microsoft Deployment Toolkit). You can download the MDT package for free from the Microsoft website (again, different versions MDT supports different versions of deployed OS). MDT also requires the correct version of ADK to work. Latest on this moment MDT 8450 currently only supports Windows 10 1709 and older. In the MDT environment, you prepare a Task Sequence, add packages, drivers, and an operating system WIM file. Next, you create a bootable media that will include all of the above and copy it to USB. The subtlety is that here you customize the image either by modifying the WIM file in advance, or by editing the unattend.xml file related to the Task Sequence you created in MDT, which will be automatically included in the media, or by writing scripts that you add to packages and include it in the installation process as a Task Sequence step.
    When creating media MDT, they will create a boot.wim boot file for you, which will be executed when booting from a flash drive. It will download for you Windows environment PE from which the installation will begin.
    A very flexible method that allows you to enable any drivers and install any software during OS installation.
  3. Deployment using MDT and WDS server. The only difference between this method is that the boot.wim created in MDT will not be located on USB, but on the network on a WDS server, from where you can boot via PXE.
  4. Deployment using SCCM and WDS server. The client is loaded as in option 3, but the difference is that all WIM files, drivers and packages, as well as the Task Sequence itself with the unattend.xml file will be created and launched from the SCCM server, and not from MDT. A bootable boot.wim image will also be created using SCCM.
    This option is suitable for the most complex deployments with a large number of distributed installations.

Please also note that the unattend.xml response file can be included in the WIM image itself by placing it in the %WINDIR%\Panther\Unattend folder, but for MDT and SCCM a separate external file will still be required to execute the Task Sequence.

As I already indicated, the unattend.xml or autounattend.xml files can be edited manually in the editor, but it is more correct and safer to do this through SIM. The WIM operating system image file itself is created and edited using a console utility DISM, having many keys. Moreover, the same utility also deploys (apply) the WIM file to disk.

The DISM utility is included in the ADK package; it is important to use the version of the utility that supports the OS you are deploying.

Image Capture and WIM Creation

In order to create a WIM file, you must perform the Sysprep and Capture operations. To do this, install the system on your computer, configure it as you wish, install or remove applications, and install updates. Also, for successful sysprep in Windows 10, you need to clean the system and remove some installed Modern App applications from HP and Canon, otherwise sysprep will fail. This can be done with Powershell commands:

Sysprep.exe /generalize /shutdown /oobe

In this case, the system will go to OOBE mode (Out-Of-Box Experience, as if it were just being installed from scratch), and then the computer will turn off. You can read more about this procedure in the Microsoft documentation.

Now the disk image can be captured. Disk capture is performed by the already mentioned DISM utility.

If you capture manually, you need to boot into Windows PE from USB or over the network, or connect the disk to another computer. Windows PE should already include the dism utility. Capturing the image is done with the command (assuming you are capturing the C: drive):

1 Dism /Capture-Image /ImageFile:D:\my-windows-partition.wim /CaptureDir:C:\ /Name:"My Windows partition"

Dism /Capture-Image /ImageFile:D:\my-windows-partition.wim /CaptureDir:C:\ /Name:"My Windows partition"

One WIM file can contain multiple OS images, you can add a new captured disk to an existing image. This is convenient when you need to deploy different systems (for example, with a different set of programs) from one WIM file. You can edit the properties of the wim file, the name of the images in it.

Each image in the file has an index starting with 1. Accordingly, when you apply the image to a blank disk, you will need to specify the system index:

bcdboot C:\Windows

it will create a BCD boot loader for you on the disk with operating system. Apart from this you will need to do Recovery section. To make it quick, I’ll give an example of a typical bat script that performs all these operations from the Microsoft documentation.

In fact, this is not the purpose of our article, but rather an overview that allows you to understand which utilities should be used and in what case. After all, the syntax of all commands is well described in the documentation. In addition, the procedure for both sysprep / capture and deploying an image to a pre-formatted disk is easier to perform through MDT by creating the appropriate Task Sequence in it, however, MDT requires skills; for one-time tasks it is easier to do everything manually.

Utilities for working with WIM images

All utilities in this list will be graphical replacements for console DISM.

This great utility, written in the AutoIt scripting language, saves you a lot of time by doing:

  • capturing a disk into an image (capture)
  • applying the image to disk (apply)
  • shows information from the finished wim image
  • allows you to mount an image into a folder, edit its contents and unmount it back (mount and unmount)
  • uploading a single image from a wim file with multiple images
  • editing the name and description of images in a wim file

The current version 2.2.0 is compatible up to Windows 10 build 1803. All operations are performed in one click. No installation required. Use case: capturing another partition on your disk or on a connected disk, as well as editing an existing wim file. Working in Windows PE is not implied.

This utility is written in Powershell, but is intended for slightly different operations, namely for maintaining and editing the existing WIM. All bookmarks are arranged in the order of their use: first you mount the image into a folder, and then edit it or save changes.

The utility allows you to:

  • integrate drivers into the image (drivers)
  • add cab packages and enable/disable features
  • Attribute license information and key
  • use ready-made Unattend.xml
  • get a list of applications and patches in the image
  • capture and apply image

The third utility is designed to prepare the system for capture. It allows you to cut or add whatever you want from it in a very granular manner:

  • clearing caches, logs, Appx (Modern applications), temporary files
  • management of installed Appx applications - allows you to remove Modern Apps, which previously could only be done through Powershell.
  • optimization and customization of menus and icons
  • adding and removing drivers
  • adding and removing Windows components
  • adding and deleting Windows features(Features on Demand)
  • adding and removing updates
  • setting up file associations
  • Editing the Unattend.xml response file