Skip to content

Instantly share code, notes, and snippets.

@apsun
Last active December 16, 2023 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apsun/27577bc714fcd1141eaa17f36641bfa9 to your computer and use it in GitHub Desktop.
Save apsun/27577bc714fcd1141eaa17f36641bfa9 to your computer and use it in GitHub Desktop.

Windows 7 install ISO with slipstreamed updates

Preparation

Create three directories. For the sake of this tutorial, they will be:

  • c:\image - holds the contents of the ISO file
  • c:\mount - mount point for the install.wim file
  • c:\updates - holds the update files

Additionally, download the Windows ADK and select the "Deployment Tools" option. This gives you the oscdimg command that we will use to generate the output ISO image.

Download updates

Download the .msu files that you want to slipstream to c:\updates. You can get them by searching the Microsoft Update Catalog. For Windows 7 Professional, I added:

  1. KB3020369 - April 2015 SSU
  2. KB3125574 - Convenience rollup
  3. KB4490628 - March 2019 SSU
  4. KB4474419 - SHA-2 update
  5. KB4536952 - January 2020 SSU
  6. KB4534310 - January 2020 Windows rollup
  7. KB4018271 - June 2017 IE8 rollup
  8. KB4532945 - January 2020 .NET 3.5.1 rollup

By no means is this an exhaustive list, but it gets you 90% of the way to a fully patched system.

Mount install.wim

Extract the Windows install ISO contents to c:\image, then run:

dism /get-wiminfo /wimfile:c:\image\sources\install.wim

This will print out the list of Windows editions available in your ISO. Next run:

dism /mount-wim /wimfile:c:\image\sources\install.wim /name:"Windows 7 Professional" /mountdir:c:\mount

Replace Windows 7 Professional with your Windows edition from the previous step.

Add update packages

For each update that you want to slipstream, run:

dism /image:c:\mount /add-package /packagepath:c:\updates\kb12345678.msu

Replace the package path with the appropriate content. Note that the ordering of updates matters.

Generate output ISO

Unmount install.wim with:

dism /unmount-wim /mountdir:c:\mount /commit

Now it's time to generate the ISO file. Launch the "Deployment and Imaging Tools Environment" shortcut (should have been created in the start menu by the Windows ADK installer) and run:

oscdimg -m -o -u2 -udfver102 -lGRMCPRXFRER_EN_DVD -bootdata:2#p0,e,bc:\image\boot\etfsboot.com#pEF,e,bc:\image\efi\microsoft\boot\efisys.bin c:\image c:\output.iso

Replace GRMCPRXFRER_EN_DVD with whatever you want the disk label to be. The ISO file will be output to c:\output.iso.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment