How to open wim for editing. Opening WIM files

Editing the registry - one of the most common operations when performing various tweaks aimed at improving the functionality of Windows. As a rule, changes to the registry are made on working system, however, when deploying Windows on multiple computers, this method may not be appropriate. Of course, you can create a set REG -files and merge them on each instance installed Windows, but there is another option.

Make changes to the registry in advance, to the image, thanks to which everything tweaks will be applied automatically during system installation.

To do this, you will need an unpacked system image, in which you will need to find the file INSTALL.WIM (it is located in the SOURCES directory) and copy it to any convenient place (this is our section D) .

Create on disk D folder mount, run the command line as administrator and mount to the folder mount image INSTALL.WIM using the following command:

Dism /mount-wim /wimfile:D:\install.wim /index:1 /mountdir:D:\mount

  • D:/install.wim– this is the original location of the image
  • INSTALL.WIM, index:1- system edition,
  • D:/mount- the directory in which the image will be mounted.

Note: since one image may contain several editions of the same version of the system (Home, Professional, Corporate, etc.) , just before mounting it is advisable to find out its index (index). To do this, use the command Dism /Get-WimInfo /WimFile:D:\install.wim.

After the image is mounted, load the registry branch you need from it. The path in the key unload command may be different depending on which registry section you are going to edit.

  • If it is HKLM/SOFTWARE , the path will be windows/system32/config/software
  • If HKLM/SYSTEM - windows/system32/config/system
  • If HKLM/SAM then windows/system32/config/SAM
  • To load the HKLM/Security subkey, use the path windows/system32/config/security
  • For DEFAULT in the HKEY_USERS section - windows/system32/config/default

Let's say you need to access a subkey SOFTWARE. Immediately load it in the console with the following command:

reg load HKLM/EDIT D:\mount\windows\system32\config\software

Where EDIT- temporary subsection in the registry editor. After this, open the registry editor on a running system and expand the HKEY_LOCAL_MACHINE\EDIT branch.

Please, now you can create and edit the keys you need. Once you're done, close the editor and unload the section back with the command reg unload HKLM\EDIT .

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 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”

since when you reinstall drivers, the volume of Windows increases by the volume of newly installed drivers.

In this lesson we import wim file. For those who don't know, this is disk image format. It was developed by Microsoft for deployment latest releases operating systems families 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 read the first article in this series and perform all the steps to create a flash drive in the order in which new articles are published. The main thing is not to rush and do everything gradually. Well, for the rest of you, I offer you this article.

Step 1. We mount the original image of Win 7 x86 (x64) into the system and configure the connection when the power is turned on.

Step 2. Let's start the virtual machine. We go into the BIOS (by pressing the key F2 at startup) and set the boot from CD-ROM. Let's save (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 on Shift+F10.

Step 5. In the appeared command line 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. Next we enter 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 has started.

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

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

Step 14

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

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

Step 17 Finding the file install.wim, cut it out and put it in a folder \SystemFlash\Sborki\Win7x86_wim.

To replicate a standard configuration on several computers, it is rational to use an image of a once installed operating system.

Detailed instructions are available on the Microsoft website: Creating and using Windows images

Since with a large set of additional software, the partition image file can easily exceed 4GB, then write such a distribution to DVD disc it won't work. However, this is not required to install the OS. It will be enough for us to obtain an image of the partition on which the OS is installed. Then it can be included in the distribution on a bootable Flash disk or simply transferred to new computer, booting from any live-CD/DVD/USB. In this article we will look at both options.

Having prepared the partition once, we will be able to deploy a working OS with all installed software, connected peripheral devices and necessary shortcuts on new computers in less than half an hour.

According to Microsoft: "When creating an image, be aware that the partition layout on the source and destination computers must be identical. For example, if Windows image is saved on drive D, this image must also be deployed to drive D of the destination computer, and the following partition parameters () must also match:

  1. Partition types (primary, secondary or logical) must match
  2. If a partition is made active on the reference computer, it must also be active on the target computer."

However, if we add a prepared partition to the distribution, then these restrictions do not matter.

Step-by-step instructions for deploying Windows 7 from an image

1. We do a template installation of Windows in audit mode

5. Write the created partition image to the local hard drive

E:\tools\imagex.exe /apply E:\images\win7image.wim 1 C: WITH:- the section where we will deploy the image 1 - number (or name) of the image, default = 1

If the OS images are located on a network resource, then connect it first with the command:

Net use E: \\server\share /user: domain_name\username password

6. Completion

If you created a separate system partition, then you need to transfer bootloaders to it system files(assuming the OS is located on the C: drive):

Bcdboot C:\Windows

Exit Windows PE:

or close the Windows 7 installer window. The computer will reboot. We take out the CD/DVD disk and boot from the newly installed OS.

7. Complications

  • If you encounter problems loading the transferred OS, you can try restoring the bootloader. To do this, you need to boot from the Windows 7 distribution (you can open the console by pressing Shift+F10) or Windows PE and run the command:
bcdboot C:\Windows /l ru-RU /s C: Read more in the article "Restoring the Windows and Linux bootloader".

Repository of various Windows images

You can create several images of partitions with different sets of software, using the same template OS, then place them in one place, for example on a flash drive, and each time install exactly the image that will be suitable in each individual case. The process of adding software can be carried out sequentially, making a new partition image after installing each required set. The algorithm is as follows (see details above):

  1. Loading the OS in audit mode
  2. Install/remove software, connect printers, create shortcuts, etc.
  3. We prepare the system for deployment using sysprep and turn off the computer
  4. Booting from live CD or Windows7 distribution, go to console
  5. Create a partition image using imagex by placing it on a flash drive or network resource
  6. We repeat the above until all the necessary sets have been created.

Creating your own Windows distribution

Having an image Windows partition(wim file), you can create your own distribution, that is, an installation DVD/Flash disk. To do this, it is enough to replace the \sources\install.wim file in the original distribution with your own image, renaming it accordingly to install.wim.

To automate the installation, you can prepare an autounattend.xml answer file by creating it using WIAK and placing it in the root of the distribution.

To work with .wim archives, Windows includes the Dism utility (and the wimlib library is its open-source alternative).
Let's look at several typical tasks, first using the example of Dism version 6.1.7600 (built into Windows 7), then Dism version 10.0.14393 (built into 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 installation windows disk 7 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 image contents

To view the contents of the image, you need to mount it by index or name (name is too much of a distortion, so I’m giving an example only with the index):
Dism /Mount-Wim /WimFile:install.wim /index:3 /MountDir:C:\win7 /ReadOnly
With this command we mounted the "Windows 7 PROFESSIONAL" image into the C:\win7 directory. By default, the image is mounted writable, but the /ReadOnly switch sets the access mode to read-only.

Make changes to the image

1. Mount the desired image to change (without the /ReadOnly key):
Dism /Mount-Wim /WimFile:install.wim /index:3 /MountDir:C:\win7
2. Change/Replace/Add/Delete files in the C:\win7 directory as in any other.
3. Unmount the image 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 (as well as their status)

Dism/Get-MountedWimInfo

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

/Split-Image
/Apply-Image

Split a wim file into several swm files

Wim is a file-type archive; it will not be possible to split it with some kind of dd. But it will work with the following command. It can be useful, for example, when you manually make an installation flash drive in FAT32 (this file system has a file size limit - a maximum of 4GB). The resulting swm files should be located in the sources directory. The FileSize key takes the size in megabytes.
Dism /Split-Image /ImageFile:install.wim /SWMFile:install.swm /FileSize:4096

Apply (unpack) the image to file system
Dism /Apply-Image /Image-File:install.wim /Index:1 /ApplyDir:D:\ /EA
In the case of an archive divided 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.