Well I learned a lot on this after spending most of my day yesterday ripping apart Windows lol
There are 4 locations that have to do with the updates, C:\Windows\Winsxs, HKLM\Components (Which only loads when you check for updates and such), HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing and C:\Windows\servicing
I did all kinds of different things to see how windows updates would respond. And it comes down to this, if there is a single error in any of them the updates fail. There is no rebuild option and we are talking about 50,000+ files and 80,000+ registry keys.
I realized that the error numbers given when an update fails or the errors that are in the cbs.log file are not meant for the user, but instead meant only for the MS techs who make the updates. This is why they are always so cryptic and give no proper info on why or what is failing.
Basically if a virus went in any of those registry locations and simply removed them updates will never work again without a reinstall.
Right now my pre-scan uses the registry location to know what files to look for, but if those registry keys are gone the program wont know if any files are missing since they wont be listed. And since what keys and files are there depend on what updates are installed, there is no easy way to simply import over what we need from another system, and that is because of the insane amount of files and registry keys!
No down to a point though there is a middle ground. The system readiness tool knows how to handle all this and put things back, BUT only if it has the manifest, cat and mum files.
As you will see here you can add the files for the system readiness tool to look at and use, BUT you have to manually go and download each update of the missing files you need.
https://technet.microsoft.com/en-us/library/ee619779%28v=ws.10%29.aspxSo I am thinking of making a tool that will grab the files from a huge file repository I am making, it will download any needed files (If I have it) and then put it in the folders the system readiness tools looks at, then the user will run the ms tool and let it do the work.
I have no clue how long that will take me to make, but is worth a shot. Their tool is great for replacing missing and bad files, but it is lacking big time on the files it has. So let me see if I can make up on that slack and make it better
Shane