This problem has- unfortunately- reverted back to injecting update files into a WIM file, which isn’t ideal but c’est la vie.
The best process I’ve come up with is this: use PowerShell to pull up a list of all updates applied to a server; modify this list to turn it into a batch file that can search c:\windows \softwaredistribution\downloads and then output this list to a text file; copy this text file to another batch file, modify this copy so that DISM applies each update to the mounted WIM in sequence.
If nothing else this process is time consuming. I’ve currently got my 2nd batch file applying each update then pausing (in case of a failure), then committing each update to disk to minimise loss in the event of a problem. Hopefully this whole process can be automated, but bear in mind this is only applying about 50 updates to 1 WIM image- there are way more updates than that, and 2 images, plus keeping the master images patched… not the most streamlined process.
UPDATE 21/FEB/14: it’s even worse. I’ve got a stable method for retrieving updates, but the actual DISM commands stop working after a while- this is completely random, but at some point the Add-Package commands stop working and then corrupts the install.wim file, at which point you have to scrap it all and start again. My (final?) method is to mount the WIM image, apply the update, dismount the WIM image, mount the WIM image, apply the update, dismount the WIM image… this is going to take ages. It’s been running for an hour now and has done 5 updates- hopefully there’ll be some good news by the time I get back to it on Monday.
UPDATE 12/MAR/2014: Injecting updates into the WIM seems to be the one and only way of getting this to work (although I haven’t actually tried installing the GUI yet, this is just the official MS line). Anyway, here’s the procedure if using WSUS:
- Build a server as core;
- Join it to the domain;
- DON’T install any WSUS updates just yet;
- copy everything from C:\Windows\SoftwareDistribution\Downloads to some temporary location;
- Run a “dir /s /b *.cab” against the folder you just copied and >> the text to file- this should give you a list of all the updates with their path;
- Knock up a quick batch file using the contents of the above batch file as follows:
- Dism /Mount-WIM /WimFile:C:\Support\Copy\install.wim /Index:2 /mountdir:C:\Support\WIM
- dism.exe “/Image:c:\Support\WIM” /LogPath:C:\Support\dism.log /LogLevel:4 /Add-Package “/PackagePath:C:\Support\Cabs1f8571c8b1da3d1952869019dbc51ab\windows8-rt-kb2916036-x64.cab”
- IF %ERRORLEVEL% NEQ 0 GOTO END
- dism.exe /Unmount-Wim /MountDir:c:\Support\WIM /commit
- copy C:\Support\Copy\install.wim C:\Support\Copy\backup.wim /y
- The theory being that you mount the WIM, patch it, check to see if the patch failed, if not dismount the WIM, back it up and start again. This is massively convoluted, I’ll post back when I’ve had a chance to test it in anger.