How to open wim? How to edit the Windows registry in a system image How to change the names of images in install wim

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 license in the AiRecovery windows 7pro x64 section.

After installing from the AiRecovery partition via F9

activated with a key on the back

laptop lid, 100% no problem.

Now 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 day automatic activation,

if within 3 days there was no access to the network, then windows

switched to a 30 day trial status, and activate

could be done manually.

Now, when installed in the right

in the lower corner of the screen under the ASUS obviatorium in small print

writes that I'm using a non-legal version of windows.

And after installation, the screen is black, installation

picture is not installed. This means that I must

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 such

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

I did not succeed, 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 the only way I was able to get into the audit mode. By activating Windows

and after passing the “generalize” I lost two drivers

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 about 500 megabytes longer.

And I have 3 questions:

one). Is it possible in the AiRecovery section by combining swm images into a wim image and activating windows in it,

as this is the best way to solve 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 deactivated

when passing “generalize”

since when installing new drivers, the volume of windows increases by the volume of the newly installed drivers.

If you are a system administrator, then you will definitely face the issue of mass deployment of the operating system to users' computers. And no matter how you deploy it - from USB, via a WDS server with MDT, using SCCM - in any case, you will use a WIM file with an operating system image.

An overview of how to fork an OS

  1. Installing from a 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 beforehand with Windows System Image Manager (SIM), which is included with the Windows ADK. Please note that all builds of Windows 10 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 into the WIM file in advance or put them in the $OEM$ subfolder, and the path to it is specified 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 hardware.
  2. Deployment using MDT from a USB drive. In this case, you prepare the boot disk itself using MDT (Microsoft Deployment Toolkit). You can download the MDT package for free from the Microsoft website (again, different versions of MDT support different versions of deployable OS). MDT also requires the correct version of the ADK to work. The latest 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 the USB. The subtlety lies in the fact that here you do image customization 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 media, or by writing scripts that you add to packages and included in the installation process as a Task Sequence step.
    When creating a media MDT, you will create a boot.wim file that will be executed when booting from a flash drive. It will download the Windows PE environment for you, from which the installation will begin.
    A very flexible way that allows you to enable any driver and install any software during OS installation.
  3. Deployment using MDT and WDS server. The only difference with this method is that the boot.wim created in MDT will be located not on USB, on the network on a WDS server, from where you can boot via PXE.
  4. Deployment using SCCM and WDS server. Client loading is performed 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 run 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 many distributed installations.

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

As I have already pointed out, 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 the console utility DISM, which has many keys. Moreover, the same utility also deploys (apply, apply) a 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 deployed OS.

Image capture and WIM creation

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

Sysprep.exe /generalize /shutdown /oobe

This will change the system to OOBE mode (Out-Of-Box Experience, as if it had just been installed from scratch) and then the computer would shut down. You can read more about this procedure in the Microsoft documentation.

Now the disk image can be captured. Capturing a disk is performed by the already mentioned DISM utility.

If you capture manually, you must boot into Windows PE from USB or over the network, or connect the drive 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 from one WIM file (for example, with a different set of programs). 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 from 1. Accordingly, when you apply the image to a blank disk, you will need to specify the system index:

bcdboot C:\Windows

will create a BCD bootloader on the disk with the operating system. In addition, you will need to make a Recovery partition. For speed, I will give an example of a typical bat script that performs all these operations from the Microsoft documentation.

In fact, all this is not the purpose of our article, but rather an overview that allows you to understand which utilities and in which case you need to use. 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 disk with preliminary formatting 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 the console DISM.

This is a great utility written in the AutoIt scripting language that saves a lot of your 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 to a folder, edit its contents and unmount it back (mount and unmount)
  • unloading 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. Installation is not required. Use case: capturing another partition on your drive or on a connected drive, as well as editing an existing wim file. Work in Windows PE is not implied.

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

The utility allows:

  • integrate drivers into the image (drivers)
  • add packages (cab packages) and enable/disable features (features)
  • Assign license information and key
  • apply ready-made Unattend.xml
  • get a list of applications (applications) and patches (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 anything you want from it in a very granular way:

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

Registry editing - one of the most common operations when performing various tweaks designed to improve the functionality of Windows. As a rule, making changes to the registry is carried out on a working system, however, when deploying Windows on several computers, this method may not be appropriate. Of course, you can create a set REG -files and merge them on every instance of Windows installed, 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 (we have this section D) .

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

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

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

Note: since one image can contain several editions of the same version of the system (Home, Professional, Corporate, etc.) , just before mounting it is desirable to know 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 can be different depending on which registry key 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
  • The path used to load the HKLM/Security subkey is windows/system32/config/security
  • For DEFAULT under 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 that, 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. When you're done, close the editor and unload the partition back with reg unload HKLM\EDIT .

To work with archives in the .wim format, Windows has 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 (built into Windows 7), then Dism version 10.0.14393 (built into Windows 10).

dism version 6.1.7600 can do just about anything:
/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 successfully completed.

View image content

To view the contents of the image, it must be mounted by index or name (the name is too strong a perversion, so I give an example only with the index):
Dism /Mount-Wim /WimFile:install.wim /index:3 /MountDir:C:\win7 /ReadOnly
With this command, we have mounted the "Windows 7 PROFESSIONAL" image to 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/Remove files in the C:\win7 directory as in any other.
3. Unmount the image and save 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 wim file into multiple swm files

Wim is a file type archive, it will not be possible to split it with some kind of dd. But it will turn out the next 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 of 4GB maximum). The resulting swm files should be 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 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.

Title (English): Windows Imaging Format File

Title (Russian): Windows installation image

Developer: Microsoft

Description: WIM or Windows Imaging Format File is a Windows installation image file format. The WIM format was developed by Microsoft. Such images can be used to install Windows, as well as to create custom images such as the WinPe Preinstallation Environment. WIM images contain a set of operating system files placed in separate directories. Each subfolder has a sequential number. The WIM file is usually located on the boot disk in the sources directory. Typically, the WIM file is named boot.wim, but it can also be called install.wim. WIM differs from other images in that its smallest element is not a sector, as in ISO, for example, but a file. Such images are also called file-oriented. In some cases, the WIM image may be split into several separate files with the SWM extension.

The following programs can be used to open (edit) a file of this format.

Share with friends or save for yourself:

Loading...