How to deploy updates to a windows 7 distribution

Today Windows 7 is the main corporate system, de facto, taking over from Windows XP. Therefore, for the system administrator, the issue of its deployment is relevant, but since the last official image was built quite a long time ago, the systems installed with its help require a fairly large number of updates. You can avoid this by compiling your own distribution kit containing all the current system updates. We will tell you how to do this in this article.

There are two ways to get an up-to-date distribution of Windows 7: integrating updates directly into the image, and using a reference system to download and install updates.

The first method is easier and faster, but it has a serious drawback - you need to download all the necessary updates. And this, even with a list, is quite difficult to do. At the same time, there are already downloaded sets of updates 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 can get an unstable system due to an untested or incompatible set of updates, and in the worst case, you can easily get unwanted or malware.

Using the 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 create a distribution kit. Therefore, we will consider this particular method.

Creating a reference system

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

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

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

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

When loaded in audit mode, the utility starts automatically Sysprep, close this window, we do not need it now.

It should be remembered that the system put into audit mode will continue to boot into it until we start again Sysprep and we will not change the regime. After loading, 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 to April 2016, in order to reduce the amount of downloaded updates, we recommend downloading and installing this package manually. To install it, you need update KB3020369.

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

If your goal was only to integrate all the latest updates into the distribution kit, then you can finish there. 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 OC, a different amount of software of dubious utility.

Therefore, no one bothers us to include the necessary software in our distribution kit, 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 of necessary software, including an office suite and other software. You should not include in the image programs that install their own drivers and the actual device drivers, since all third-party drivers will be removed at the stage of preparing the system for capturing the image. Also, you should not activate the software, this information will also be lost.

After completing the preparation of the reference system, we will delete all the files we downloaded and unnecessary software (if any), special attention should be paid to cleaning the system from copies of update files, for this use the tool Disk cleanup:

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

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

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

Let's analyze the utility keys in more detail:

  • oobe - starts the computer in the welcome screen mode. The Windows Welcome screen allows end users to customize the Windows operating system, create new accounts, rename the computer, and more.
  • generalize - prepares the Windows installation before imaging. If this parameter is specified, all unique system information is removed from the Windows installation. The security identifier (SID) is cleared, system restore points are reset, and event logs are deleted.
  • shutdown - shuts down the computer after Sysprep finishes.

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

Creating your own distribution

For further work we need a workstation running Windows 7 with installed windows Automated Installation Kit (WAIK)... The bit size and version of the system do not play any role.

The WAIK installation should be straightforward and is done with the default settings.

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

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

Copype.cmd x86 e: \\ win_pe

or for 64-bit ones:

Copype.cmd amd64 e: \\ win_pe

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

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

Then in Deployment Tools Command Line let's 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 boot the reference system.

If you did not perform additional disk partitioning on the reference system, then the capture partition will have the letter D:and the boot disk E:, just in case we check with the command dir.

Now let's start capturing the image, since the image is created on a file-by-file basis, 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

Specify capture disk as parameters D: and save it to image D: \\ install.wim, in quotes we indicate our own name of the image, we also set the maximum compression, the ability to download and check the created image. After that we can go for a coffee, this operation takes about half an hour on average.

We 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 clear the ISO folder, then copy the contents of the original Windows 7 disk there, 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 by running 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 analyze the command keys in more detail:

  • u2 -creates an image that only has a UDF file system.
  • m - removes restrictions on the size of the image.
  • o - replaces duplicate files with one copy, reduces the size of the image.
  • l - volume label, entered without spaces, optional parameter.
  • b - the location of the 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 not be possible to burn it to a regular DVD disc. In this case, you can use dual-layer DVD9 discs, but they are less common on the market 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-capacity DVD. You should also remember about the limitation of 32-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 of 3000 MB. Then remove from the folder ISO \\ sources install.wim and put install.swm there, after which we build an 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 that, delete install.swm and copy install2.swm to its place. It makes no sense to make the second disk bootable, so let's build 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 performed in the usual way, starting from the first disk, during the work the installer itself will ask you to change the disk:

Thus, you do not have to worry about the size of the created image, especially if, in addition to updates, it is planned to include bulky software, for example, MS Office, etc. We also recommend that before proceeding to deploy workstations from the created distribution kit, thoroughly test its operation on a test system.

Hello! In this article, I want to tell you how you can easily and simply integrate the necessary updates into the Windows distribution and then, after reinstalling the system, not waste time on this.

I decided to deal with this issue after, when reinstalling Windows on one laptop, all the necessary updates were downloaded as expected and even began to be installed, but when the computer was restarted, it could not install them and began to cancel.

At the stage of canceling updates, the laptop simply hung up and the system did not boot further. After that, I thought to solve this issue in a different way.

Of course, someone will say that you can not download system updates at all, but I hold a different opinion and believe that at least critical updates after reinstalling the system must be installed. So, let's get down to the actual process itself.

We need:

  • Windows 7 distribution
  • UltraIso program
  • Windows Service Pack

First, in the crown of the C drive, create a folder W7... Next, open the Windows image with the UltraIso program and find the file in the sources folder install.wim.


We put this file in the W7 folder.

This is what the folder should look like

The updates themselves can be downloaded from this forum. Now we launch the command line, for this we press the Start button and write the command in the search form cmd.
Now, in fact, on the command line, we write this code and press Enter

Dism / Get-WimInfo /WimFile:C:\\W7\\install.wim

It is not necessary to write it, you can simply select it with the mouse, copy and paste it into the command line window. Next, we will be shown the indexes of all Windows that are contained in our distribution. If you want to integrate updates into all versions, then write the following code and press Enter

By the way, read this article too: How to glue photos in paint

C: \\ W7 \\ UpdatePack7R2.exe /WimFile\u003dC:\\W7\\install.wim / Index \u003d *

If you need to integrate updates into only one edition of Windows, then instead of an asterisk at the end of the code, put its index.



As a result, you will be given a report that will tell you how the updates were integrated.


After that, we go into our W7 folder and notice that our install.wim file has noticeably gained in weight. Now launch UltraIso again and drag our new file install.wim back to folder sources, we answer the question about replacement Yes!

After all the manipulations in the UltraIso program, press the button file\u003e save, or press the keyboard shortcut ctrl + s... All!

As a result, we have a distribution kit of the system with integrated updates. Now you can safely write it to a disk or USB flash drive and safely install the system! Thank you all for your attention!

If anyone has any questions, you can watch the video at Youtube channel of this blog. Success to everyone!

There are two options for integrating SP1 into a Windows 7 installation ISO. The first is using the command Dism, and the second - using the program RT 7 Lite

Option 1. Integration using the Dism command.

  1. Create folders necessary for work (For example, on drive D: Temp, SP1, mWim and Mount folders)
  2. Open a command window in the folder where you have the service package exe file
    a) While holding down the key Shift right click on the folder in the Navigation Pane
    b) In the context menu, select Open command window
  3. Unpack the service package exe file to a temporary folder using the command:

    For 64-bit version:

    windows6.1-KB976932-X64.exe / x: D: \\ Temp

    For 32 bit version:

    windows6.1-KB976932-X86.exe / x: D: \\ Temp
  4. Close the command window
  5. Open the D: \\ Temp folder in the explorer and launch a command window in it as described in paragraph 2.
  6. Unpack the KB976932 cab file using the command:

    For 64-bit version:

    expand windows6.1-KB976932-X64.cab -f: * D: \\ SP1

    For 32 bit version:

    expand windows6.1-KB976932-X86.cab -f: * D: \\ SP1
  7. Close the command window
  8. Open the D: \\ SP1 folder in the explorer and launch a command window in it as described in paragraph 2.
  9. Unpack all the cab-files of languages \u200b\u200binto the D: \\ SP1 folder by executing the commands one by one (agreeing if the system asks about rewriting):
    expand KB976933-LangsCab0.cab -f: * D: \\ SP1
    expand KB976933-LangsCab1.cab -f: * D: \\ SP1
    expand KB976933-LangsCab2.cab -f: * D: \\ SP1
    expand KB976933-LangsCab3.cab -f: * D: \\ SP1
    expand KB976933-LangsCab4.cab -f: * D: \\ SP1
    expand KB976933-LangsCab5.cab -f: * D: \\ SP1
    expand KB976933-LangsCab6.cab -f: * D: \\ SP1
  10. After unpacking is finished, delete all cab-files of languages \u200b\u200busing the command:
    del KB976933-LangsCab * .cab
  11. Unzip the cab file NestedMPPContent.cab to the D: \\ SP1 folder using the command (agreeing if the system asks about overwriting):
    expand NestedMPPContent.cab -f: * D: \\ SP1
  12. After unpacking is complete, delete the NestedMPPContent.cab cab file using the command:
    del NestedMPPContent.cab
  13. Delete files from folder D: \\ SP1 cabinet.cablist.ini and old_cabinet.cablist.iniusing the command:
  14. Close the command window.
  15. update.ses, replace all Absent on the Installed and save changes
  16. In the D: \\ SP1 folder, open the file in any text editor update.mum, replace allowedOffline \u003d "false" on the allowedOffline \u003d "true" and save your changes.
  17. In the D: \\ SP1 folder, open the file in any text editor For 64-bit version: Windows7SP1-KB976933 ~ 31bf3856ad364e35 ~ amd64 ~~ 6.1.1.17514.mum or

    For 32-bit version: Windows7SP1-KB976933 ~ 31bf3856ad364e35 ~ x86 ~~ 6.1.1.17514.mum, replace allowedOffline \u003d "false" on the allowedOffline \u003d "true" and save your changes.

  18. Copy the file install.wim from the \\ Sources folder of your installation ISO image to the D: \\ mWim folder
  19. Find out the index number of your Windows 7 using the command:
    DISM.exe / Get-WimInfo /WimFile:D:\\mWim\\install.wim
  20. Mount the file install.wim to the D: \\ Mount folder, taking into account the index number (For example, for a 64-bit version of Windows 7 Enterprise, it is 1) using the command:
    DISM / Mount-Wim /WimFile:D:\\mWim\\install.wim / Index: 1 / MountDir: D: \\ Mount

    Note: If your file install.wim contains several indices and you are going to add SP1 for each of them, then you will have to repeat the steps specified in paragraphs 20 - 22 for each of the indices in turn.

  21. Integrate the service package using the command:
    DISM / Image: D: \\ Mount / Add-Package / PackagePath: D: \\ SP1
  22. Unmount the image and save the changes using the command:
    DISM / Unmount-Wim / MountDir: D: \\ Mount / Commit
  23. Remove files and folders that might have remained after unmounting the wim image using the command:
  24. Replace the file install.wim from the \\ Sources folder of your installation ISO image, using the D: \\ mWim \\ install.wim file
  25. Delete the Temp, SP1, mWim and Mount folders.

You can also use the DISM Tool to work with DISM in graphical mode. This program allows you to execute all the commands you need using a graphical interface. With it you can mount (Mount WIM) and unmount (Dis-Mount WIM) an image, integrate a language pack or an update you need (use the Add Packages item).

Option 2. Integration using RT 7 Lite

  1. Unpack the ISO image of the installation disc (into which you are going to integrate the service pack) into any folder. ISO images can be perfectly unpacked with 7zip or UltraISO.
  2. Download, install and run RT 7 Lite
  3. Click the button Browse and select item Select OS Path.
  4. Specify the path to the folder where you unpacked the ISO-image of the installation disc and click OK
  5. In the window that appears List of operating system select your Windows 7 edition, check the box Slipstream Service Pack and press OK.
  6. In the window that appears RT Service Pack Slipstream press the button Browse
  7. Specify the path to the service package exe file (windows6.1-KB976932-X64.exe or windows6.1-KB976932-X86.exe) and click Open.
  8. Click the button Start and wait for completion
  9. Click the button Proceed
  10. Task and in the window that opens, check the box ISO Bootable
  11. In the left column, click ISO Bootable
  12. In the drop-down menu ---- Select a mode ---- select item Create Image
  13. In a text box Volume name specify what name for the ISO image will be used for mounting.
  14. Click the button Make ISO to create an ISO image of an installation disc with an integrated service pack
  15. Enter a file name and click Save

By manipulating the Windows installation image, we mean adding or removing individual components of the operating system even before its installation. It is about adding components (for example, drivers or service packs) to a distribution kit (usually an ISO file) without the help of Microsoft specialists.

Such an operation can be carried out using specialized software. When and why is it needed? In a wide variety of circumstances and for the most diverse categories of Windows users. First of all, those who need to integrate updates into their existing Windows 7 image.

A variety of circumstances can lead to the modification of the image. For example:

  • You are trying to install Windows 7 on your newly purchased laptop and find that the installation process fails with an error indicating missing drivers.
  • You are doing bulk OS installation on many computers in an organization.
  • Having created a comfortable working environment for yourself, you would like to save it for future use and get a suitable environment for yourself immediately after installation.
  • You have a Windows distribution without the latest service packs and would like to include them in the installation disc.

In all these cases, it would be desirable for you to get a modified image of the Windows distribution with a personalized configuration.

A bit of history and where is the download process stored?

From the very moment the NT operating systems appeared, tools for automatic installation of the system on one or many computers began to be supplied with them. For example, Windows 2000 contained a fairly advanced toolkit for this purpose. Those who installed the OS from a regular installation disk manually know well that during the installation process the operating system requires the user to answer a number of questions regarding the installation location, file system type and some other parameters. Automatic installation of the system means that the answers to these questions are recorded in advance in a separate file, which is called the "answer file".

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

If you add additional components (drivers, service packs, etc.) to the distribution kit, 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 “answer files” look like and what is wim?

In modern distributions of Windows 7 (made in the form of an iso image), the answer file is a regular xml document called autounattend.xml, located at the root of the file hierarchy of the image. The installation package itself is represented by two files with the wim extension - boot.wim and install.wim. the first is responsible for the initial boot, 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 to them, thereby forming an instance of Windows with the necessary internal content.

Further work on modifying the system is as follows:

  • ISO-shnik with Windows is unpacked with a suitable archiver into a separate folder.
  • The necessary components and updates are added to it.
  • The nuances of installing these updates are written in the "answer file"
  • All this is packed back into the iso-shnik, ready to use.

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

From theory to practice

Some Windows 7 users are faced with the following situation (it is very similar to the story of the inability to install the "seven" on a new laptop): after the next automatic update and restart of the computer, the system refuses to start in the new configuration and just freezes at the startup stage. One of the solutions to this problem is to download the update package from the Web and integrate it directly into the OS image. There is no need to be intimidated in advance - you do not need to create and edit "answer files" for this purpose. In this case, everything turns out to be much simpler, although everything happens according to the scheme described above.

What do we need? First, it is a good disk imaging program, like the widely used freeware Ultraiso utility. And, secondly, a bit of ingenuity and accuracy. Then we give step-by-step instructions:

  • Open the image in ultraiso.
  • We create a separate folder.
  • We put install.wim from the iso file there. Look for it in the / source folder.
  • We put the file with the service pack there.
  • We open a command prompt window and enter the command to view all Windows editions integrated into our image (there are usually 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 in one or all editions at once. To integrate into all editions, in the same command window, type something like:

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

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

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

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