today I will show you how to integrate updates into your WIM file using a patched system. For this you need a "clean" patched system, i.e. a virtual machine. Follow the attached steps to get your image up to date.
Install all needed Updates on a clean system, so you can use this machine to get the needed updates for your image.
On your admin workstation create a "mount" folder in C:\. Then copy your image to "C:\Images\Win7\install.wim", after this run the attached UpdateWIM.bat to integrate the updates.
UpdateWIM.bat
dism /mount-wim /wimfile:”C:\Images\Win7\install.wim” /mountdir:C:\mount /index:1
Start /w for /R \\PATCHEDComputer\C$\Windows\SoftwareDistribution\Download\ %f in (*.cab) do dism /image:C:\mount /add-package /packagepath:”%U”
dism /unmount-wim /mountdir:C:\mount /commit
pause
Now your image is up to date and you can upload it to your server. You can also directly mount your image that is located on the server, only change the path ”C:\Images\Win7\install.wim”
Start /w for /R \\PATCHEDComputer\C$\Windows\SoftwareDistribution\Download\ %f in (*.cab) do dism /image:C:\mount /add-package /packagepath:”%U”
dism /unmount-wim /mountdir:C:\mount /commit
pause
Now your image is up to date and you can upload it to your server. You can also directly mount your image that is located on the server, only change the path ”C:\Images\Win7\install.wim”