ZTIWindowsUpdate.WSF does not install all patches

This article is obsolete. The algorithm how  was changed in recent versions of MDT, and now this logic is built into it.  

 

 

ZTIWindowsUpdate.wsf is the script that goes to Microsoft Update or internal WSUS server and install all approved updates from there. It is a part of automated image build process I've been creating for all of my customers.

In MDT 2010 this script was optimized to reduce the number of reboots. To accomplish it, the script now remembers all installed patches, and does not install them if they have been already installed.

The problem is that some patches need to be re-installed. Let's say we run this script for the first time, then install some applications overwriting newer files and some patches become applicable again, but second run of ZTIWindowsUpdate.wsf won't reapply the patch due to reasons above. With help of Keith Garner, I wrote a simple script that will zero the list of installed updates. It's attached here, copy WSF script to your MDT share scripts folder, and add actions to your Task Sequence like shown here:

DeleteListOfInstalledUpdates.zip