I couldn't update my Vista x64 Ultimate [I have it on an HP laptop - with only the "recovery discs - so I don't know if I can use the above "fixes"] for almost a year! (with the exception of windows defender updates which always worked) I had the same error code. Here's what i did to solve the problem:
0. I had to remove all other OS's (linux , opensolaris, etc) from my multi-boot config in order to get SP2 to install.
1. disable any antivirus after updating it and running a full scan to delete anything unwanted.
2. verify that the following 3 services are running:
Windows Installer
Windows Update
Windows Module Installer
these 3 services were always stopped - I had to run "msconfig" from a terminal command line, click the "services" tab, click on the services button or label (lower right hand corner) and start them and change their "mode" to automatic - restart the computer and verify that they are started - if not - start them again.
run, from the command line "sfc /scannow" - it takes a while. It will tell you if there were corrupt files that it could not repair. If that is the case, resart the computer, and run it again - I ran it 5 times before it finally stopped giving error messages - and (my error) I am not sure whether or not i had already manually identified the 27 updates that would not auto-install and downloaded and installed a few of them - before it stopped giving unrepairable corrupt file error messages.
3. Making sure that the Windows Update, Windows Installer and Windows Module Installer services are running (see above), run Windows Update (in the normal way by clicking on the Help and Support link in the Start tab), and write down the number of every failed update - or update to be done (same thing when all updates failed) - and search on the Microsoft site for the update in the following way:
"Vista x64 update KB972990" for example - replacing "Vista x64" and the "KB972990" with the OS you are trying to update and the update that won't install. Download them all - then install them one at a time - of the 27 updates that i couldn't get to install, 80% - or more - of them required a restart (and they went though the "configuring update, step 1 of 3, step 2 of 3 and then after the restart, step 3 of 3" - each time - just like a service pack update)
Next - after installing them all 1 by 1 run the sfc /scannow command again - a few times if nesessary, restarting the computer (ALWAYS MAKE SURE DURING THIS ENTIRE PROCESS THAT NO ANTIVIRUS IS RUNNING) (DISK DEFRAG AFTER MANUALLY INSTALLING THE UPDATES MAY HELP, TOO) after each time you run it.
That did it for me - a real hell - but now the Windows Update seems to work - IF i make sure that all 3 essential windows services I mentioned above are running.
UNfortunately, now when i run sfc /scannow - it is finding files it cannot repair once again, but the last windows update worked perfectly ?
Crazy but true.
Good luck