sodcalculator

10 Tech How-To

Integrate Security Updates into Windows Image

Guide 10-43151 · Updated · Step by step

This guide walks you through mounting a Windows image (WIM or VHD), adding the latest security updates, and committing the changes so that every system deployed from that image starts fully patched. You will need a Windows PC with the Deployment Imaging Servicing and Management (DISM) tool, the Windows ADK installed, and the update files (.msu) downloaded.

What You’ll Need

  • A Windows image file (.wim or .vhd) – typically install.wim from the installation media
  • Windows Assessment and Deployment Kit (ADK) installed (includes DISM)
  • The security update files (.msu) you want to add – download from Microsoft Update Catalog
  • A folder to use as a mount directory (e.g., C:\Mount)
  • Administrator privileges on the machine where you perform the steps

Step-by-Step

  1. Create a working folder – Make a folder to hold the image and a separate empty folder for mounting. Example: C:\ImageWork and C:\Mount.
  2. Copy the image file – Copy your install.wim (or .vhd) into the working folder. Never work directly on the original file.
  3. Identify the image index – Open Command Prompt as Administrator and run: dism /Get-WimInfo /WimFile:C:\ImageWork\install.wim. Note the index number of the edition you want to update (e.g., Windows 10 Pro is often index 1 or 6).
  4. Mount the image – Run: dism /Mount-Image /ImageFile:C:\ImageWork\install.wim /Index:1 /MountDir:C:\Mount. For a VHD, use /Mount-Image /ImageFile:C:\ImageWork\myimage.vhd /MountDir:C:\Mount (VHD mounts the whole image, no index).
  5. Add the security update – Run: dism /Image:C:\Mount /Add-Package /PackagePath:C:\Updates\KB1234567.msu. Repeat this for each update. You can also add multiple packages at once by specifying multiple /PackagePath arguments.
  6. Verify the update was added – Run: dism /Image:C:\Mount /Get-Packages and check that the package appears in the list with “Install Pending” status.
  7. Commit the changes – Run: dism /Unmount-Image /MountDir:C:\Mount /Commit. This writes the changes back to the image file. Do not skip this step; otherwise, changes are lost.
  8. Replace the original image – After committing, you can replace the original install.wim with the updated one. If you are deploying via MDT or SCCM, import the updated image into your deployment tool.

Common Mistakes

  • Forgetting to mount with write access – By default, DISM mounts read-only. You must use /Mount-Image without the /ReadOnly switch to be able to add packages.
  • Using the wrong index – Applying an update to the wrong edition (index) wastes time and may fail. Always check the index first.
  • Not downloading the correct update architecture – Ensure the .msu matches the image architecture (x64 vs x86) and Windows version (e.g., 21H2 vs 22H2).
  • Unmounting without committing – If you close the command prompt or restart without unmounting, changes are lost. Always unmount with /Commit.
  • Mixing update types – Security updates are cumulative for Windows 10/11, so you only need the latest one. Adding older updates is unnecessary and can cause conflicts.

Tips

  • Use a script for multiple updates – If you have many updates, write a simple batch file that loops through the .msu files.
  • Keep a backup – Always keep a copy of the original image before mounting, so you can revert if something goes wrong.
  • Check for servicing stack updates – Some updates require a servicing stack update (SSU) to be installed first. Install the SSU before the cumulative update.
  • Test on a VM – After updating the image, deploy it to a virtual machine to verify that updates install cleanly and the system boots.
  • Clean up after unmount – After committing, delete the mount folder contents or the mount will fail next time.

Troubleshooting

  • Error 0x800f081e – Package not applicable – This means the update does not match the image version or architecture. Double-check the update’s KB number and the image’s build.
  • Mount fails with “access denied” – Ensure you are running Command Prompt as Administrator and that the mount folder is on an NTFS drive with enough free space (at least 15 GB).
  • Update installs but system shows it as not installed – This can happen if the update is superseded by a newer one. Install the latest cumulative update only.
  • Image becomes corrupted – If you get errors during unmount, try dism /Cleanup-Mountpoints to remove stale mounts, then start over with a fresh copy of the image.
  • Slow performance – Mounting and updating a large WIM can take 30 minutes or more. This is normal. Ensure your drive is not full.

Frequently Asked Questions

Can I integrate updates into a Windows 10 image using Windows 11 DISM?

Yes, DISM is backward compatible. You can use a Windows 11 ADK to service Windows 10 images, but always use the latest DISM version.

Do I need to install updates in a specific order?

Yes, install the servicing stack update (SSU) first, then the cumulative security update. Other updates can follow any order, but it is safest to follow the order listed on the Update Catalog.

Can I remove an update after adding it?

Yes, you can remove a package with dism /Image:C:\Mount /Remove-Package /PackageName:..., but only before you commit the image.

Will the updates be applied to new installs only?

Yes, the updates become part of the image, so any new deployment from that image will have them pre-installed. Existing systems are unaffected.

How long does the process take?

It depends on the image size and your hardware. Typically, mounting takes 5-10 minutes, adding a large cumulative update can take 10-20 minutes, and unmounting with commit takes another 5-10 minutes.

Can I use this method for Windows Server images?

Yes, the same DISM commands work for Windows Server WIM files. Just ensure you download the correct server updates.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →