Integration of update into Windows 7 x64 image

Under manipulation with in an installation manner Windows we will mean adding or deleting individual components operating system before its installation. It's about about adding to the distribution (usually a file with ISO extension) components (for example, drivers or service packs) without the help of Microsoft specialists.

Such an operation can be carried out using a specialized software. When and why might this be needed? In a variety of circumstances and for a variety of Windows users. Primarily for those who need to integrate updates into their existing Windows 7 image.

A variety of circumstances can prompt you to modify your image. For example:

  • You are trying to install Windows 7 on a laptop you just purchased and find that the installation process fails with an error indicating missing drivers.
  • You are doing a mass installation of an OS on many computers in an organization.
  • Having created a convenient for yourself work environment would you like to save it for further use and receive an environment suitable for yourself immediately after installation.
  • You have a Windows distribution without latest packages updates and would like to include them on the installation disc.

In all these cases, it would be advisable for you to obtain a modified image Windows distribution with personalized configuration.

A little history and where is information about the download process stored?

From the very moment NT model operating systems appeared, tools began to be supplied with them for automatic installation of the system on one or many computers. For example, Windows 2000 contained quite developed tools for this purpose. Those who have installed the OS from a regular installation disk manually know well that during the installation process the operating system requires the user to answer questions. whole line questions regarding installation location, file system type and some other parameters. Automatic installation of the system implies that the answers to these questions are pre-recorded in separate file, which is called “response file”.

If this file is included in the installation image and contains all the necessary answers - the installation can occur automatically or hide its individual stages from the user. It would seem, what does all this have to do with the stated topic? The most direct.

If you add it to the distribution additional components(drivers, service packs, etc.), and also tell the installer where these updates are located and what to do with them - you can get an image with the required characteristics. Those. integrate updates directly into the Windows installer.

What do "response files" look like and what is wim?

In modern Windows 7 distributions (made as an iso image), the response file is a regular xml document called autounattend.xml, located at the root of the image file hierarchy. Himself installation package is represented by two files with the wim extension - boot.wim and install.wim. the first one is responsible for bootstrap, and the second contains the actual system being installed. Wim files are essentially containers for other files included in the operating system image. Therefore, individual components can be added or removed from them, thereby forming Windows instance with the necessary internal filling.

Further work on modifying the system is as follows:

  • The Windows ISO file is unpacked with a suitable archiver into a separate folder.
  • Added to it necessary components and updates.
  • The nuances of installing these updates are written in the “answer file”
  • All this is packed back into the ISO box, ready for use.

The result is a ready-made installer with the necessary updates. It should be kept in mind that in general case This kind of integration requires certain, sometimes not small, knowledge. The answer file can be generated automatically during the system installation process - but this is not our case because we want to achieve more than just automatic installation, and get a distribution kit with updates.

From theory to practice

Some Windows users 7 were faced with approximately the following situation (it is very reminiscent of the story of the inability to install the “seven” on new laptop): after the next automatic update and rebooting the computer - the system refuses to start in the new configuration and simply freezes at the startup stage. One solution to this problem is to download the update package from the Internet and integrate it directly into the OS image. There is no need to be scared in advance - you will not need to create and edit “answer files” for this purpose. IN in this case everything turns out to be much simpler, although everything happens according to the scheme described above.

What do we need? Firstly, - good program for working with disk images, like the widely used free utility"Ultraiso". And, secondly, a little ingenuity and accuracy. Below are step-by-step instructions:

  • Open the image in ultraiso.
  • Create a separate folder.
  • We put install.wim from the iso file there. You should look for it in the /source folder.
  • We put the file with the service pack there.
  • Open a command line window and enter the command view all Windows editions integrated into our image (usually there are several of them). The command looks like this:

Dism /Get-WimInfo /WimFile: …\install.wim (instead of three dots, write the path to install.wim)

And then we roll up the service pack into one or all editions at once. To integrate across all editions, in the same command window, type something like:

…\UpdatePack7R2.exe /WimFile=…\install.wim /Index=*

During the modification process, the system will display message windows.

We transfer the new install.wim to the iso file in place of the old one.

That's the whole wisdom of integrating packages into an image.

Each of us is faced with a situation where reinstalling the operating system (OS) is inevitable. Usually, we take out the dusty purchased disk with Windows, insert it into the CD/DVD-ROM, start the installation, give the name of our account and computer, and... let's go have tea! After all, it’s time to install updates.

And now, it would seem, the usual procedure for reinstalling the OS takes at least an hour (even with quick access on the Internet), because updates for the same Windows 7 since the release Service Pack 1, has already accumulated more than ~1.5 gigabytes. And there is still driver installation ahead. Of course, you can download the 16-in-one image from the nearest torrent tracker, where all updates, drivers, and a bunch of other “useful software” will be integrated.

But we're gentlemen here, aren't we?

To simplify and speed up the reinstallation procedure, tools such as: RT Se7en Lite, WinToolKit And Windows Download Integrator (WDI).
The article will focus on the latter, using the example of integration current updates(more than 300) into the original image Microsoft Windows 7 SP1 x64.

Why Windows Download Integrator?

This tool was chosen for several objective reasons:

  • Windows OS support starting from Windows Vista and ending Windows 8.
  • Automatic download and integration of language packs, updates for Windows and Microsoft Office.
  • Backup of drivers installed in the system and their subsequent integration into a clean OS image.
  • Possibility to create answer file and automatic installation.
  • Unlock all OS editions in one image.
  • Export to ISO and burn to USB drive out of the box.
  • You can't make ZverDVD, i.e. cram a bunch of software and left-handed drivers.
  • And much more...

Although WDI appeared relatively later than its competitors, the program already surpasses them in capabilities and is actively developing. Thanks to the guys from the My Digital Life forums.

Let's get down to business

What do we need?
  • ISO image of Windows Vista/7/8, preferably from a purchased disk, but you can use original images from MSDN (be sure to check the checksums!).
  • A set of updates in .MSU / .CAB format. You can download them directly from WDI or manually using WUD.
  • Current version Windows Download Integrator.
  • Free place on your hard drive (3 gigabytes or more).
  • More than 1 hour of free processor time.
Instructions for use

One of the disadvantages of WDI is its scant documentation, or rather its complete absence. In the archive with the program you will find only yourself executable file and list of changes to current version. All. Coupled with the second drawback - a very unobvious interface, this can cause some problems. But there are no unsolvable problems.

Loading the necessary components

All components necessary for integration can be downloaded out of the box, you just need to find the menu...


The main menu is circled in red (what did I say about the non-obvious interface?).

  • To download language packs, use the “Download language packs” menu item.
  • To download updates - menu item " Download Windows updates".
  • (Optional) To create backup copy installed drivers- menu item “Backup Drivers”.

We carefully arrange all the loaded stuff into folders.

Selecting a source

Click on the inscription Click to select DVD source!, answer affirmatively to the question “Would you like to select an ISO image?”.
(!) By answering “No” in this window, we can immediately select the unpacked ISO.
Select a folder to unpack the ISO. In the future, you can immediately specify this folder.

Choosing editors

In the window that appears, you can unlock the OS editions required for installation:


Integration of updates, language packs

On next step we can integrate the necessary language packs, updates, drivers, and also change the screensaver during installation and even import tweaks (I can’t imagine who might need this).


Everything here is more or less clear. Click on the “Add” button and select previously downloaded files.
(!) We check the LDR Mode checkbox on the Updates tab if desired. You can find out more about the difference in installation.

(!) I do not specifically touch on the last 4 tabs (starting with Drivers). We want to get a “clean” image that is closest to the original?

After all necessary changes Click the button we are familiar with, which has moved to the upper right corner.

Integration process

Quite boring. There is no need to sit and look at the progress bar; you can go about your business for the next hour. The integration process itself occurs in 2 stages, upon completion of which a dialog box will appear saying “Success” (or not) with information about the time spent on the operation. For me, the integration operation of more than 300 updates took about 1 hour (1 hour 16 minutes, to be more precise).

Export to ISO / Burn to USB

After integration is complete finished image can be exported to ISO (menu item “Create ISO”) or directly written to a USB drive (menu item “USB Tool”).

Results

As a result, after spending an hour of time, we received an up-to-date image with Windows OS, close to the original, for the contents of which only we ourselves are responsible. None unnecessary software and drivers, no boring wallpaper - everything is only the most important and necessary.

More links

I advise you to look at the MDL forum in the MDL Projects and Applications section, you can find a lot of useful stuff there.

In this manual, we will show you how to integrate new system update packages into an offline installation image of Windows 10 / Windows 8.1 using built-in system tools. Similarly, you can add the latest security updates to your distribution Windows Server 2012 R2 / 2016.

In this example, we will show the process of adding the latest cumulative security updates (from December 2018) to the Windows 10 1803 installation image. So, we will need:

  • Windows 10 installation image in ISO format or its WIM file;
  • Updates in .msu format that need to be downloaded from the server Microsoft updates ().

It is important to make sure that the bitness and version of your Windows distribution and the downloaded updates match, otherwise when installing the update you will see: .

On your computer, create the following directory structure:

Mount the file with the Windows 10 installation image (install.wim) into the C:\updates\mnt directory by running:

dism /mount-wim /wimfile:C:\updates\Win10Image\install.wim /index:1 /mountdir:C:\updates\mnt

Advice. If the wim image contains several versions of Windows at once, you need to specify the index in this command the required version OS, or perform update integration for each image in turn. A list of Windows editions in a wim file can be obtained using the command:

DISM /Get-WimInfo /WimFile:C:\updates\Win10\install.wim

In our example, the image contains only one OS edition - Windows version 10 Pro with index 1 , so in the command we specify install.wim /index:1.

Now you can start the integration process into the image Windows suitable MSU updates located in the specified directory.

dism /image:C:\updates\mnt /add-package /packagepath:C:\updates\msu

If the system detects an inappropriate update (the OS version does not match, the bitness does not match, or if the update is already installed), it will be skipped, and the corresponding information will be written to the C:\Windows\Logs\DISM\dism.log log.

To reduce image size by deleting files unused updates(see article on ), run the command:

dism /image:C:\updates\mnt /Cleanup-Image /StartComponentCleanup /ResetBase /ScratchDir:C:\Temp

If you already have a computer with similar version Windows 10, which already has the latest security updates installed, you can get everything necessary files updates directly from it. In this case, you do not need to manually select and download MSU files updates from the Microsoft Update Catalog on the Internet. The fact is that Windows saves all cab update files received from servers Windows Update or server to the C:\Windows\SoftwareDistribution\Download directory.

Mount the Windows installation Wim image that you want to update:

dism /mount-wim /wimfile:C:\updates\Win10\install.wim /index:1 /mountdir:C:\updates\mnt

By using next command you will start integrating update files that have already been downloaded and installed on another computer into the install.wim image via the local network:

Start /w for /R \\Win10x64Patched\C$\Windows\SoftwareDistribution\Download\ %f in (*.cab) do dism /image:C:\updates\mnt /add-package /packagepath:”%f”

In this example Win10x64Patched– name of the computer on which the necessary updates(OS version and bit depth must match). It is natural that this computer was accessible over the network, and your account must have administrator rights on it. As a result of running the command, a new window will open in which you can monitor the process of installing updates in an offline Windows image. DISM will try to add every Windows image it finds to your WIM CAB file on a remote computer.

If, when integrating updates into a Windows image, you encounter the error: “Error 0xc0000135 An error occurred while attempting to start the servicing process for the image located at C:\Update\mount. Fore more information, review the log file.”, make sure you are using latest version DISM (for example, you are trying to change the image of Windows Server 2016 from Windows 8.1. Install the latest available version Windows Assessment and Deployment Kit (Windows ADK) for your OS and run DISM directly from the C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\DISM directory.

dism /unmount-wim /mountdir:C:\updates\mnt /commit
dism /Cleanup-Wim

All that remains is to copy the resulting image in install.wim to the source directory/ virtual machine or rebuild the installation iso image, for example, using oscdimg), UltraISO or .

If the size of the received install.wim file is more than 4 GB, when installing a Windows image on the system, you may encounter the error “Windows cannot open the required file D:\sources\install.wim. Error code: 0x8007000D." In this case, you need to split the original install.wim into smaller files with the command

dism /split-Image /imagefile:C:\Update\Win10Image\install.wim /swmfile:C:\Update\Win10Image\install.swm /filesize:4096

After this, the original install.wim can be deleted.

DISM also allows you to manage the installation of drivers in the image. Previously we looked at how to use DISM utilities or PowerShell cmdlet Add-WindowsDriver at Windows example 10 / 8.1 / Windows Server 2012 R2 / 2016 or Windows 7 ().

Now you can use your distribution with the latest security updates integrated for installation on computers on your network. By regularly integrating the latest security updates into your Windows image that you deploy to new computers, you make your infrastructure more secure against the latest vulnerabilities and reduce the risk of new computers becoming infected before they start updating with WSUS.

Today Windows 7 is the main corporate system, de facto, taking over the baton from Windows XP. Therefore for system administrator the actual issue is its deployment, but since the last official image was compiled quite a long time ago, systems installed with its help require obtaining quite large quantity updates. You can avoid this if you assemble your own distribution containing all the current system updates. We will tell you how to do this in this article.

There are two ways to obtain the latest Windows 7 distribution: integrating updates directly into the image and using a reference system to download and install updates.

The first method is simpler and faster, but has a serious drawback - you need to download everything necessary updates. And this, even with a list, is quite difficult to do. At the same time, there are already downloaded update sets available on the network, but we do not recommend using them, since installing system components from unverified sources is a very bad idea. At a minimum, you could end up with an unstable system due to an untested or incompatible set of updates, and at worst, you could easily end up with unwanted or malicious software.

Using a reference system allows you to get all the necessary updates in automatic mode, install them, check the operation of the system and only then proceed to creating a distribution kit. Therefore, we will consider this method.

Creation of a reference system

For these purposes, we recommend using a virtual machine in which we will create guest system for Windows 7 and install the version of the OS for which we will create a distribution kit. If you need to create distributions for several versions or bits, then you will also need several reference systems.

Once the installation is complete, take your time; when the welcome screen appears, click CTRL+ SHIFT+ F3

This will reboot the system into audit mode, but if you managed to create a user and log in, then run the command as Administrator:

C:\Windows\System32\sysprep\sysprep /audit /reboot

When booting into audit mode, the utility starts automatically Sysprep, close this window, we don’t need it now.

It should be remembered that the system switched to audit mode will continue to boot into it until we start it again Sysprep and we will not change the regime. After downloading, open Windows Update and search for and install updates.

Important! On May 17, 2016, Microsoft released a cumulative update package for Windows 7 SP1 KB3125574, which includes updates from the release of SP1 until April 2016; in order to reduce the volume of downloaded updates, we recommend downloading and installing Current Package manually. Installation requires update KB3020369.

We reboot and search and install updates again. We reboot and repeat this operation again until the system installs all available updates.

If your goal was only to integrate all latest updates, then we can finish here. However, the audit mode allows you to install a variety of software, which will also be included in the distribution. This is widely used by OEMs; we think everyone has come across distributions (usually on laptops) containing, in addition to the OC, different quantities software of dubious usefulness.

Therefore, no one is stopping us from including the necessary software in our distribution, so as not to waste time on its subsequent installation. We usually limit ourselves to the "gentleman's set": archiver, Adobe Reader, Java, Silverlight. You can include the entire set necessary software, including office suite and other software. You should not include in the image programs that install your own drivers and device drivers themselves, since all third party drivers will be deleted at the stage of preparing the system for image capture. Also, you should not activate the software; this information will also be lost.

Having finished preparing the reference system, we will delete all the files we downloaded and unnecessary software (if any), Special attention You should pay attention to cleaning the system from copies of update files; to do this, use the tool Disk Cleanup:

Important! After cleaning be sure to reboot system to complete the updates, otherwise you risk getting a broken image.

Now let's prepare it for image capture using the utility Sysprep:

C:\Windows\system32\sysprep\sysprep /oobe /generalize /shutdown

Let's look at the utility keys in more detail:

  • oobe- starts the computer in welcome screen mode. Screen Windows greetings allows end users set up the operating room Windows system, create new Accounts, rename your computer, and perform other tasks.
  • generalize- prepares the Windows installation before creating the image. If this parameter is specified, all are unique system information are removed from Windows installations. The security identifier (SID) is reset, system restore points are reset, and event logs are deleted.
  • shutdown - Shuts down the computer after Sysprep has finished running.

After completing the necessary actions, the system will shut down. You cannot enable it before the image is captured. This concludes our work with the reference system and moves on to creating our own distribution based on it.

Creating your own distribution

For further work we will need work station under Windows control 7 with installed Windows Automated Installation Kit (WAIK). The capacity and version of the system do not play any role.

Installing WAIK should not be difficult and is done using the default settings.

Now let's prepare the image Windows PE to capture an image of the reference system. The WinPE bit capacity must match the bit capacity of the reference system.

Let's open Start - All Programs - Microsoft Windows AIK - Deployment Tools Command Line and run the command for 32-bit systems:

Copype.cmd x86 e:\win_pe

or for 64-bit:

Copype.cmd amd64 e:\win_pe

Where e:\win_pe desired location of the folder with the image. There is no need to create the folder first, as in this case you will receive an error that the folder already exists.

Now let's go to the destination folder and copy the file winpe.wim to a folder ISO\sources and rename it to boot.wim. Then copy it to a folder ISO from folder C:\Program Files\Windows AIK\Tools\amd64 or C:\Program Files\Windows AIK\Tools\x86, depending on the bit depth, file imagex.exe.

Then in Command line deployment tools give the following command:

Oscdimg -n -be:\win_pe\etfsboot.com e:\win_pe\ISO e:\win_pe\winpe.iso

The result of the command will be an image winpe.iso from which to download reference system.

If you did not perform additional partitioning of the reference system disk, the partition to be captured will have the letter D:, A boot disk E:, just in case, we check with the team dir.

Now let's start capturing the image, since the image is created file by file, it can be saved to the same partition. Let's enter the following command:

E:\imagex /capture d: d:\install.wim "Win7_ULT_x64" /compress maximum /boot /verify

As parameters we indicate to capture disk D: and save it to an image D:\install.wim, in quotation marks we indicate our own name of the image, we also put maximum compression, the ability to download and check the created image. After which we can go have coffee, this operation takes on average about half an hour.

Reboot the reference system into normal mode and copy the created image to a PC with WAIK installed. Let's go to e:\win_pe and cleanse ISO folder, then copy the contents of the original there Windows disk 7, which we used to install the reference system.

Then we will replace the file install.wim in folder sources to the image we captured. Now you can start building your own ISO image, to do this, run the command:

Oscdimg -u2 -m -o -lWIN7ULTx64 -be:\win_pe\etfsboot.com e:\win_pe\iso e:\win_pe\Win7_ULT_x64.iso

Let's look at the command keys in more detail:

  • u2-creates an image that has only file system UDF.
  • m- removes restrictions on image size.
  • o- replaces duplicate files with one copy, allowing you to reduce the size of the image.
  • l- volume label, entered without spaces, optional parameter.
  • b- location boot file, also without spaces.

The image is assembled quite quickly, the only thing is that with a high degree of probability its size will exceed 4.7 GB and it will be written to a regular DVD blank it won't work. In this case, you can use double-layer DVD9 discs, but they are less common on sale and may not be supported by all drive models. In this case, you can split the distribution into two parts, each of which will fit on a standard-sized DVD. You should also remember the 32 limit bit systems, which cannot work with wim images larger than 4 GB.

You can split the image with the following command:

Imagex /split e:\win_pe\install.wim e:\win_pe\install.swm 3000

This will create two or more swm file maximum size at 3000 MB. Then delete it from the folder ISO\sources install.wim and place install.swm there, after which we will assemble the image of the first disk:

Oscdimg -u2 -m -lWIN7ULTx64DVD1 -be:\win_pe\etfsboot.com e:\win_pe\iso e:\win_pe\Win7_ULT_x64_DVD1.iso

After this, delete install.swm and copy install2.swm in its place. There is no point in making the second disk bootable, so we will assemble it with a simpler command:

Oscdimg -u2 -m -lWIN7ULTx64DVD2 e:\win_pe\iso e:\win_pe\Win7_ULT_x64_DVD2.iso

Installation from a split image is carried out in the usual way, starting from the first disk; during operation, the installer itself will ask you to change the disk:

This way you don't have to worry about the size created image, especially if, in addition to updates, it is planned to include voluminous software, for example, the MS Office package, etc. We also recommend that before you proceed to deploy workstations from the created distribution, you thoroughly test its operation on a test system.

  • Tags:

Please enable JavaScript to view the