What is the WIM file extension? Utilities for preparing an OS image for deployment Add files to wim.

To work with archives of the .wim format, Windows includes the Dism utility (and the wimlib library is its open source alternative).
Let's consider several typical tasks, first using the example of Dism version 6.1.7600 (embedded in Windows 7), then Dism version 10.0.14393 (embedded in Windows 10).

dism version 6.1.7600 can do nothing at all:
/ Get-MountedWimInfo
/ Get-WimInfo
/ Commit-Wim
/ Unmount-Wim
/ Mount-Wim
/ Remount-Wim
/ Cleanup-Wim

List images in wim file

Dism / Get-WimInfo /WimFile:install.wim
For example, install.wim from the windows 7 installation disk contains four images (it makes sense to pay attention to the Index and Name fields):

Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Details for image: install.wim Index: 1 Name: Windows 7 HOMEBASIC Description: Windows 7 HOMEBASIC Size: 11 531 865 453 bytes Index: 2 Name: Windows 7 HOMEPREMIUM Description: Windows 7 HOMEPREMIUM Size: 12 045 241 621 bytes Index: 3 Name: Windows 7 PROFESSIONAL Description: Windows 7 PROFESSIONAL Size: 11 947 613 470 bytes Index: 4 Name: Windows 7 ULTIMATE Description: Windows 7 ULTIMATE Size: 12 110 440 566 bytes The operation completed successfully.

View the contents of the image

To view the content of the image, it must be mounted by index or name (by name is too strong a perversion, so I give an example only with an index):
Dism / Mount-Wim /WimFile:install.wim / index: 3 / MountDir: C: \ win7 / ReadOnly
With this command, we mounted the "Windows 7 PROFESSIONAL" image to the C: \ win7 directory. By default, the image is mounted writable, but the / ReadOnly switch sets it to read-only.

Make changes to the image

1. Mount the desired image for modification (without the / ReadOnly key):
Dism / Mount-Wim /WimFile:install.wim / index: 3 / MountDir: C: \ win7
2. Modify / Replace / Add / Delete files in the C: \ win7 directory as in any other.
3. Unmount the image while saving the changes:
Dism / Unmount-Wim / MountDir: C: \ Win7 / commit
or the same with two separate commands:
Dism / Commit-Wim / MountDir: C: \ win7

Dism / Unmount-Wim / MountDir: C: \ Win7 / discard

View a list of all mounted images (and their status)

Dism / Get-MountedWimInfo

Dism version 10.0.14393, among other things, can do the following:

/ Split-Image
/ Apply-Image

Split wim file into multiple swm files

Wim is a file-type archive, you won't be able to split it with any dd. But it will be the next command. It can come in handy, for example, when you manually create an installation flash drive in FAT32 (this file system has a file size limit - maximum 4GB). The resulting swm files should be in the sources directory. The FileSize key accepts the size in megabytes.
Dism / Split-Image /ImageFile:install.wim /SWMFile:install.swm / FileSize: 4096

Apply (unpack) the image to the file system
Dism / Apply-Image /Image-File:install.wim / Index: 1 / ApplyDir: D: \ / EA
In the case of an archive split into swm files, you must specify the file naming pattern.
Dism / Apply-Image /Image-File:install.swm /SWMFile:install*.swm / Index: 1 / ApplyDir: D: \ / EA
The / EA switch instructs to set extended file attributes.

In this lesson, we import wim file. For those who do not know, this disk image format... It was developed by Microsoft for deployment latest releases of family operating systems Windows(Vista, 7, 8). Systems use this file as part of the standard installation procedure. For those who have just started reading my blog, I recommend that you first familiarize yourself with the first article from this series and perform all the steps to create a flash drive in the order of the release of new articles. The main thing is not to rush and do everything gradually. Well, for the rest I offer yours this article.

Step 1. We mount the original Win 7 x86 (x64) image into the system and set up the connection at power on.

Step 2. We start the virtual machine. We go into the BIOS (by pressing the key F2 at startup) and set the load from CD-ROM. We keep (F10).

Step 3. When the message "Press any key to boot from CD or DVD ..." appears, press any key.

Step 4. The system displays a window with a choice of language. But we press Shift + F10.

Step 5. In the command line that appears, enter c:

Step 6. Then dir

Step 7. Now d: and again dir

Step 9. And again dir

class = "eliadunit">

Step 10. We are interested in imagex.exe. Then we introduce the following d: \ x86 \ imagex.exe / capture c: d: \ install.wim / flags “Professional” “Windows 7 SP1 Professional” “Windows 7 SP1 Professional” / compress maximum and press ENTER

Step 11. The utility started.

Step 12. We do everything similarly on a 64-bit OS. The only difference is the team. X86 changes to amd64.

Step 13. After finishing the work, turn off the machines.

Step 14.

Step 15. We import the wim file to the host system. To do this, go to Options virtual machine and find the tab HDD. We look at the name of the disk file.

Step 16. Go to File-Connect virtual disks-Connect-Browse-Specify the disk file with the name above-Select to connect the second partition-Ok-Ok.

Step 17. Find the file install.wim, cut it out and place it in the folder \ SystemFlash \ Sborki \ Win7x86_wim.

If the need to change the wim image made you curve your necks like these cute animals, then you are at the right place. Here I will try to straighten your necks. In this and the next article, we will try to figure out how you can change the already prepared Windows images without deploying them to computers. In this article, we will look at the basic commands and the ability to add drivers to a finished image. To find out how, please go to the next post. And there, and here we will perform all the actions thanks to the DISM utility.

Why do I need to add drivers to the finished wim image?

Let's say we have an operating system ready for deployment. Let's say he's already a couple of months old. Also, let's say that a new Windows security update, a new improved driver, or a language pack has been released during this time. And you need 100 computers! But depriving the image of the latest updates and improvements is not very good. After all, you can leave computers in danger for a while. Moreover, all this will still have to be done. It is better to do this once than to check all computers later. There are several ways to add a driver to the finished image:

  1. Create a new image.
  2. Deploy the finished image, add the driver to it, and reapply.
  3. Add the required driver to the finished image using.

I hope you understand that the most convenient and fastest way is the third, and that is what we will consider.

Basic DISM Commands

For those who are superficially familiar with the DISM utility, please go to the article, which is fully devoted to this one. Still, let's re-run through some of the commands, as we may need them.

  • dism / get-wiminfo /wimfile:c:\install.wim

    This command displays information about the wim image. By the way, a couple of times we had to specify the operating system edition index. Perhaps many wondered how to find out this index. So here's the answer: using this command. You can also get information about the image using the command:

  • imagex / info c: \ install.wim

    This command is similar to the previous one.

  • dism / get-mountedwiminfo

    Used to get information about mounted images.

Working with DISM Online Image

As already mentioned, the DISM utility allows you to work not only with a wim file saved on disk, but also with an image of a running machine, or, in another way, with an operational image. Using DISM commands, when working with an online image, you can only get information about the image, but you cannot change it. To work with the online image, you need to use the / online parameter.

  • dism / online / get-drivers

    Lists all installed drivers.

  • / online / get-currented dismantition

    Displays the active edition of the operational image.

  • / online / get-stageded dismition

    Displays a list of editions that can be removed from the image.

  • dism / online / get-targetedition

    Displays a list of editions to which the live image can be upgraded.

  • dism / online / get-driverinfo

    Displays information about a specific driver.

  • dism / online / get-intl

    The command will display information regarding the regional settings

  • dism / online / get-packages

    Lists information about all installed packages in the live image.

  • dism / online / get-packageinfo

    Displays information about the selected package.

  • dism / online / get-features

    Displays information about all components

  • dism / online / get-featureinfo

    Displays information about a specific information.

All of these commands can be used for a non-live image as well. To do this, use / image: c: \ papka_podklucheniya instead of / online. In addition to the above commands, you can perform the following actions with a NOT operative way:

  • dism / image: c: \ papka_podklucheniya / get-apppatchinfo

    Displays information about installed Windows Installer patch files.

  • dism / image: c: \ papka_podklucheniya / get-apppatches

    Displays information about all applied MSP patches for all installed applications.

  • dism / image: c: \ papka_podklucheniya / get-appinfo

    Displays information about a specific Windows Installer application.

  • dism / image: c: \ papka_podklucheniya / get-apps

    Displays information about all installed applications.

How do I add a driver to an existing Wim image?

Finally we got to today's main course. We will now look at the commands for adding a driver to a wim image. To do this, you must specify the folder with the driver .inf file. Drivers are added using the parameter / add-driver, and removed - / remove-driver.

  • dism / image: c: \ papka_podklucheniya /add-driver:c:\driver.inf

    Adding one driver to the mounted image.

  • dism / image: c: \ papka_podklucheniya / add-driver / driver: c: \ mydrivers

    Adding all drivers that are in the specified folder.

  • dism / image: c: \ papka_podklucheniya / add-driver / driver: c: \ mydrivers / driver: d: \ 123

    Adding all drivers that are in the specified folders. Each new folder must be added via the / driver parameter: In this example, two folders are specified.

  • dism / image: c: \ papka_podklucheniya / add-driver / driver: c: \ mydrivers / recurse

    Adding all drivers from the specified folder and its subfolders.

  • dism / image: c: \ papka_podklucheniya / remove-driver /driver:oem10.inf

    Removing a driver from a non-live image. You can find out the name of the driver you need if you list them. Many drivers will have a name similar to oem№.inf, where № is a sequential number. Such names are automatically assigned for unsigned drivers. You can read about it by clicking on the link.

With these simple steps, you can add the necessary drivers to the ready-made wim-image. This is done in a few clicks, thanks to the excellent DISM utility, the main thing is to know how. I remind you that you can find an article about adding applications and language packs to a wim image through the search, or through the link that I gave in this article. Good luck!

How to create a wim image of the Windows operating system? Today in this article we will talk about creating an installation image and answer all important questions on this topic. Creating a Windows image is a tedious process. The preparatory steps for this process have already been described in earlier articles. For those who are not familiar with them, below I will list the main preparatory steps and links leading to relevant articles. Please read them first.

Creating a reference computer

If you have read our previous entries, then you already know how to create and can prepare it for installation. To successfully complete this stage, you need:

  1. Reference computer last accessed by command sysprep / oobe / generalize / shutdown.
  2. and the Imagex.exe program on board.
  3. A location where you can save the installation image. You need a free volume of up to 10 GB, and maybe more. It all depends on how much software you've crammed into your Windows image.

Windows wim image capture process

First of all, we boot the reference computer from the Windows PE installation media (remember that this should be the first action with the computer, after processing it with the Sysprep program), after which, in the command prompt window that opens, we execute the command:

E: \ imagex.exe / capture c: d: \ install.wim "my windows 7 install" / compress fast / verify

Next, you will have to wait from 10 to 30 minutes, depending on the weight of your wim image. After that, on your D: drive there is a file install.wim which contains the Windows installation image. This is the result that we have achieved. We have created a Windows image. As you can see, the process of capturing a wim image is quite simple, you just need to properly prepare for this.

Now let's take a closer look at the command. What is what:

  • e:- The letter of the installation media c.
  • / capture- we indicate that you need to capture a wim image of the Windows operating system.
  • c:- indicate the disk on which the reference operating system is installed.
  • d: \ install.wim- the drive letter and the name of the wim file where we save the installation image. It makes no sense to specify a different name for the wim file, since in the Windows iso image, the installation image must have exactly this name.
  • "My windows 7 install"- tagging the installation image. Nothing fancy, but kind of a required parameter. You can write something of your own.
  • / compress fast- compression method. The compression process will increase the time it takes to capture a Windows image, but can be very useful when the image size is large and there is little available storage space. Possible parameters:
    • fast- fast compression of the Windows image.
    • maximum- maximum compression of the Windows image.
    • There is one more parameter that stands between them, and means that the capture is uncompressed. This parameter is used by default, so you don't really need to know it. Well, plus to this, I forgot what it looks like, so you will not learn this parameter from me anyway.
  • / verify- no idea what the parameter is. Fortunately, it does not make special weather, you don't have to enter it.

How do I determine the drive letters?

When I grabbed a Windows wim image, I saved it to a second flash drive. In this regard, there was a little confusion about which disc was given which name. To deal with this use the utility diskpart and the team list volume... I hope you haven't forgotten that Windows PE is a stripped-down version of the corresponding version of Windows, which in turn allows you to work with the main Windows programs. This is why some people use Windows PE for or for other actions on a locked computer.

What is the difference between a wim image and a Windows iso image?

Well, we captured the Windows wim image, we got the long-awaited install.wim file. But what to do with it? Install.wim is a Windows setup file. In fact, out of the entire Windows iso image, you only need to have this file to deploy Windows. And the rest of the nonsense from the iso image, it is, incidental nonsense, needed only to support install.wim. The install.wim file can be deployed to computers using other deployment tools. For example, if only this file is needed. Well, as a last resort, you can simply open the iso-image of Windows, and in the folder sources replace the original install.wim to the install.wim... After that, if you wish, add the flash drive to the root and that's it: you will receive an automatic installation of the operating system with the image of the reference computer you created by wim.