I use a script (Z-InstallXPX86SP2Updates.wsf) by Johan Arwidmark, so I can control, which updates to install during base image installs.
Just after the patching (and before create the image) I delete the $NtUninstall folders in the Windows root and the registry entries with this script:
HFCleanup.bat
—code—
rem Lars Krogh ’09
attrib -r -h -s -a /S /D “%systemroot%\$*”
attrib -r -h -s -a /S /D “%systemroot%\$hf_mig$\K*”
FOR /D %%K IN (%systemroot%\$hf_mig$\K*) DO (
reg delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%%~nxK” /f & (
DEL /f /q “%systemroot%\%%~nxK.log” ))
FOR /D %%$ IN (%systemroot%\$*) DO rmdir /s /q “%%$”
—code—
