This project is read-only.

This script applies patches to all | selected images in the wim file or vhd file. Definitions and updates are downloaded directly from Microsoft windows update but some updates are static and definitions are downloaded from Static xml file

is updated every month so you will get all required and optional updates for Windows 7 and Server 2008 R2 (sorry no support for Vista and 2008).

This script will not update Silverlight, Windows Defender,... because these updates are .exe files and DISM doesn't support these updates.

patching images in wim file is VERY TIME CONSUMIG - approx. 45min per image

Usage: imagepatcher.ps1 -dbg:yes -imagefile:path to image -patchimages

Note: You must run PowerShell as elevated

If you discover some bug or missing update please contact me at

Version 1.0 - 5th July 2010

.Parameter -dbg

Displays more detailed info about the process


imagepatcher.ps1 -dbg:yes -imagefile:c:\deployment\install.wim

.Parameter -imagefile

full path to the image file.

This file should be wim file - you can specify "all" to patch all images inside wim file or comma delimited indexes of the images "1,3,5,10,11" this will patch only selected images

This file should be vhd file - this will mount vhd and applies updated to this os

wim or vhd file MUST be writable - copy from DVD first to the hard drive

imagepatcher.ps1 -imagefile:c:\deployment\install.wim

imagepatcher.ps1 -imagefile:c:\virtual\windows7.vhd

Parameter -patchimages

defines which images will be patched (not used with vhd files). This parameter should be "all" (default) or comma delimited index of images in the wim file


imagepatcher.ps1 -imagefile:c:\deployment\install.wim -patchimages:"all"

imagepatcher.ps1 -imagefile:c:\deployment\install.wim -patchimages:"1,3,6,10"

.\imagepatcher.ps1 -imagefile:"C:\DeploymentShare\Operating Systems\AIO\sources\install.wim" -dbg:yes

Last edited Jul 5, 2010 at 2:14 PM by ondrejv, version 1


pneumann Feb 13, 2014 at 3:57 PM 
Looks good, but will be fine, when check WSUS server first and than windowsupdate.