Valid HTML 4.01 Transitional Valid CSS Valid SVG 1.0

Me, myself & IT


ATTENTION: due to the termination of my provider's homepage service, the web pages and all content located below http://home.arcor.de/skanthak/ will become unavailable on January 31, 2017!

All web pages and other content will then be available solely on https://skanthak.homepage.t-online.de/.
Please update your bookmarks and references!


Slipstream update packages during installation of Microsoft® Windows® 7 SP1

Purpose

Automatic (unattended) or manual installation of (security) update packages during the (initial) installation of Microsoft Windows 7 SP1 from an unmodified original DVD.

Note: you may be eligible to download a disc image in case that you don't have an original Windows 7 SP1 installation disc.
Note: when you start the installation from (bootable) USB media, SD card etc., the method presented here can of course be used too.
Caveat: due to both a bug and a limitation the convenience rollup update package 3125574 can't be installed using the method presented here!

Reason

Preparation

On a computer running Windows 95 OSR2 Vista SP2 or a newer version of Windows NT, perform the following 16 steps:
  1. Download at least the last cumulative (security) update package for Internet Explorer 8, 3124275 alias MS16-001, and the latest (security) update package for the Windows Update Client, currently (January 17, 2017) 3161647; the latter is available only as part of the July 2016 (optional) update rollup package 3172605.

    Note: be sure to download the update packages that match the processor architecture (32-bit: x86 alias I386; 64-bit: x64 alias AMD64) of your installation disc (or media)!

    Optionally download other update packages of your choice, for example 917607, 958559, 2670838, 2685811, 2685813, 2729094, 2834140, 2836502, 2952664, 2999226, 3150513, 3177467, 3179573, 3185278, 3185330, 3197868, 3203884 and 3207752, and process them in the following steps like 3124275 and 3172605 too.

    Note: don't forget to kick Microsoft for their bit-rotten MSKB article 949104!

  2. Open the directory where you saved the downloaded update packages in Windows Explorer.
    This is typically the Downloads directory in your user profile, %USERPROFILE%\Downloads\.

    In this directory you should see at least the files
    Windows6.1-KB3124275-x86.msu and Windows6.1-KB3172605-x86.msu (for 32-bit processor architecture) or
    Windows6.1-KB3124275-x64.msu and Windows6.1-KB3172605-x64.msu (for 64-bit processor architecture).

  3. Change the extension of the files Windows6.1-KB*-x??.msu you downloaded in step 1. from .msu to .cab.

  4. Open the renamed files (which are compressed archives) Windows6.1-KB*-x??.cab per double-click in Windows Explorer.

    In each opened window you should see the four files
    Windows6.1-KB*-x??.cab, Windows6.1-KB*-x??.xml,
    Windows6.1-KB*-x??-pkgProperties.txt and WSUSSCAN.cab.

  5. Plug an (preferable empty) USB stick or an (preferable empty) SD card into your computer.

  6. From each compressed archive you opened in step 4., copy the files Windows6.1-KB*-x??.cab and Windows6.1-KB*-x??.xml (per drag & drop) to the root directory of the drive attached in step 5., then close its window.

  7. If you want to keep the files downloaded in step 1., undo the changes made in step 3., i.e. restore the original extension .msu on all files you renamed, else delete these files.

  8. Open the root directory of the drive you attached in step 5. in Windows Explorer.

    In this directory you should see at least the four files
    Windows6.1-KB3124275-x??.cab and Windows6.1-KB3124275-x??.xml plus
    Windows6.1-KB3172605-x??.cab and Windows6.1-KB3172605-x??.xml.

  9. Change the extension of the files Windows6.1-KB*-x??.xml you extracted in step 6. from .xml to .txt.

  10. In the right pane of the root directory window open the context menu per right-click and select New, then choose Text document and change the filename from New text document to AutoUnattend.

  11. Open the empty file AutoUnattend.txt per double-click in Editor.

  12. Open each (not yet empty) file Windows6.1-KB*-x??.txt you renamed in step 9. per double-click in Editor, select its contents per [Ctrl][A], cut the selection per [Ctrl][X], close the file and save the changes (thereby writing the empty file back), then insert the cut contents per [Ctrl][V] at the bottom of the AutoUnattend.txt file.

  13. In the (still open) AutoUnattend.txt file delete each block of the six consecutive lines

        </servicing>
    </unattend>
    
    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <servicing>
    then close the file and save the changes.
  14. Change the extension of the AutoUnattend.txt file from .txt to .xml.

  15. Delete the (now empty) files Windows6.1-KB*-x??.txt you renamed in step 9. and rewrote in step 12.

  16. Use Safely Remove Hardware from the notification area alias system tray of the taskbar to eject the prepared USB stick or SD card and unplug it from your computer.

Operation

On the target computer, insert your original Windows 7 SP1 installation DVD and the prepared USB stick or SD card, then boot from your installation disc (or media) and proceed as instructed: Windows Setup detects the AutoUnattend.xml answer file and applies it during installation.

Note: ‹target drive›:\$WINDOWS.~BT\Sources\DISM.exe, the program run by Windows Setup to perform this task, writes the log file ‹target drive›:\$WINDOWS.~BT\Sources\Panther\CBS.log, which is stored as %SystemRoot%\Panther\CBS.log in the installed system for later examination.

Caveat: for Windows Vista, the MSKB article 939289 documents a bug with the method presented here, and its resolution.
If you encounter this bug with Windows 7 SP1 too, perform the alternative (automatic or manual) installation below, or insert the following lines before the last line of the AutoUnattend.xml answer file:

    <settings pass="windowsPE">
        <component
            language="neutral"
            name="Microsoft-Windows-Setup"
            processorArchitecture="*"
            publicKeyToken="31bf3856ad364e35"
            versionScope="nonSxS">
            <userData>
                <acceptEula>true</acceptEula>
            </userData>
        </component>
    </settings>

Alternative (automatic) installation

Boot from your installation disc (or media) and select your language, then press [Shift][F10] to start a command prompt instead clicking the Install now button.
From the command prompt run the following command line, referencing the AutoUnattend.xml answer file created above:
Setup.exe /Unattend:"[‹path›\]AutoUnattend.xml"

Alternative (manual) installation

Boot from your installation disc (or media) and select your language, then press [Shift][F10] to start a command prompt instead clicking the Install now button.
From the command prompt run the following command line first:
Setup.exe /NoReboot
After completion run
DISM.exe /Image:"‹drive›:" /LogPath:"‹drive›:\Windows\Logs\DISM\DISM.log" /ScratchDir:"‹drive›:\Windows\Temp" /Apply-Unattend:"[‹path›\]AutoUnattend.xml"
to use the AutoUnattend.xml answer file created above, or run
DISM.exe /Image:"‹drive›:" /LogPath:"‹drive›:\Windows\Logs\DISM\DISM.log" /ScratchDir:"‹drive›:\Windows\Temp" /Add-Package /PackagePath:"[‹path›\]Windows6.1-KB…-x….cab" […]
to install one or more update packages without answer file.

Limitation

Setup.exe and DISM.exe, the programs behind Windows Setup, install all update packages referenced in the <servicing> section of the AutoUnattend.xml answer file in a single session: the update package 3020369, a prerequisite for the convenience rollup update package 3125574, but has to be installed in a separate session.

Caveat: due to a bug the newer update package 3177467 which replaces 3020369 is not suitable as prerequisite for offline installation of the convenience rollup update package!

Bug

Offline installation of the convenience rollup update package 3125574 into an applied image (like the one created by Windows Setup) residing on a disk volume using one of the equivalent command lines
"%SystemRoot%\System32\DISM.exe" /Image:"‹drive›:" /Apply-Unattend:"[‹path›\]Windows6.1-KB3125574-v4-x86.xml"
"%SystemRoot%\System32\DISM.exe" /Image:"‹drive›:" /Add-Package /PackagePath:"[‹path›\]Windows6.1-KB3125574-v4-x86.cab"
fails with Win32 error 5 alias ERROR_ACCESS_DENIED (derived from NTSTATUS 0xC0000121 alias STATUS_CANNOT_DELETE) returned from the attempt to create the hardlink ‹drive›:\Windows\System32\MSI.dll and renders the applied image unusable!

Online installation using one of the equivalent command lines

"%SystemRoot%\System32\DISM.exe" /Online /Apply-Unattend:"[‹path›\]Windows6.1-KB3125574-v4-x86.xml"
"%SystemRoot%\System32\DISM.exe" /Online /Add-Package /PackagePath:"[‹path›\]Windows6.1-KB3125574-v4-x86.cab"
but works as designed and documented.

Offline installation of the convenience rollup update package 3125574 into a virtual hard disk image using the same command line

"%SystemRoot%\System32\DISM.exe" /Image:"‹drive›:" /Apply-Unattend:"[‹path›\]Windows6.1-KB3125574-v4-x86.xml"
"%SystemRoot%\System32\DISM.exe" /Image:"‹drive›:" /Add-Package /PackagePath:"[‹path›\]Windows6.1-KB3125574-v4-x86.cab"
as well as its offline installation into a mounted image using the command lines
"%SystemRoot%\System32\DISM.exe" /Mount-Wim /MountDir:"‹directory›" /WimFile:"[…\]Install.wim" /Index:‹index›
"%SystemRoot%\System32\DISM.exe" /Image:"‹directory›" /Apply-Unattend:"[‹path›\]Windows6.1-KB3125574-v4-x86.xml"
"%SystemRoot%\System32\DISM.exe" /Image:"‹directory›" /Add-Package /PackagePath:"[‹path›\]Windows6.1-KB3125574-v4-x86.cab"
"%SystemRoot%\System32\DISM.exe" /Unmount-Wim /MountDir:"‹directory›" /Commit
works too.

Offline installation into a mounted image or a virtual hard disk image but fails and renders the mounted image or the virtual hard disk image unusable if the convenience rollup update package is installed together with other update packages, for example 3161608 or 3172605, but not as last update package of the session!

"%SystemRoot%\System32\DISM.exe" /Mount-Wim /MountDir:"‹directory›" /WimFile:"[…\]Install.wim" /Index:‹index›
"%SystemRoot%\System32\DISM.exe" /Image:"‹directory›" /Add-Package /PackagePath:"[‹path›\]Windows6.1-KB3125574-v4-x86.cab" /PackagePath:"[‹path›\]Windows6.1-KB3172605-x86.cab"

Further actions

Unless you definitively need .NET Framework 4, .NET Framework 4.5 or .NET Framework 4.6, create the Registry entries
REGEDIT4

; Copyright © 2011-2017, Stefan Kanthak <skanthak@nexgo.de>

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\WU]
"BlockNetFramework4"=dword:00000001
"BlockNetFramework45"=dword:00000001
"BlockNetFramework451"=dword:00000001
"BlockNetFramework452"=dword:00000001
"BlockNetFramework46"=dword:00000001
"BlockNetFramework461"=dword:00000001
"BlockNetFramework462"=dword:00000001
to block their automatic installation via Windows Update, as documented in the MSKB articles 982320, 2721187, 2971109 and 3133990.

Contact

If you miss anything here, have additions, comments, corrections, criticism or questions, want to give feedback, hints or tipps, report broken links, bugs, errors, inaccuracies, omissions, vulnerabilities or weaknesses, …:
don't hesitate to contact me and feel free to ask, comment, criticise, flame, notify or report!

Use the X.509 certificate to send S/MIME encrypted mail.

Notes: I dislike HTML (and even weirder formats too) in email, I prefer to receive plain text.
I also expect to see a full (real) name as sender, not a nickname!
Emails in weird formats and without a proper sender name are likely to be discarded.
I abhor top posts and expect inline quotes in replies.

Terms and conditions

By using this site, you signify your agreement to these terms and conditions. If you do not agree to these terms and conditions, do not use this site!
[Counter]
• Copyright © 1995-2017 • Stefan Kanthak • <­skanthak­@­arcor­.­de­>