Error Applying Update Operation after installing Service Pack 1

After installed Service Pack 1 for Windows 7, on the Windows 7 loading screen it shows "Applying update operation XXXX of XXXX". After a certain number it says "Error applying operation XXXX of XXXX", and then the system proceeds to hang on that screen.

With pressing F8, I can get into Safe Mode half way and try the computer's Last Known Good Configuration lead me nowhere..

Solution: according to this link :

01. Reboot your computer while it's starting up.
Fatal Error Startup Menu02. When your computer starts up again, choose the option "Launch Startup Repair" 
03. When the Startup repair starts, click cancel. The current repair operation cannot be cancelled.
wait for a while, system might reshut down again. Try same procedure then.
Startup Repair send information, fatal error04. After you click cancel it will show a box. Click "Don't Send" 

05. Click the link "View advanced options for recovery and support"
fatal error, choose recovery tool06. In the new window click Command Prompt at the bottom.

07. In Command Prompt type this and press enter: %windir%\system32\notepad.exe
I have to manual change directory to there:

08. Notepad will open. In notepad go to File-->Open.
fatal error, open file for edit09. Change the type of files notepad views from .txt to All Files (see pic)
10. Now in Notepad, go to C:\Windows\winsxs\ (or whichever drive Windows is installed on, sometimes D:\ )
11. In that folder, find pending.xml and make a copy of it
12. Now open the original pending.xml (it will load really slow because the file is huge)

13. Press CNTRL+F and search for the following exactly: 0000000000000000.cdf-ms
fatal error, editing xml for recovery14. Delete the following text (yours will be a little different):
Your PC might not have all 3 sections of code (). Just make sure you delete section "Checkpoint" and whatever other sections have "000000000000000.cdf-ms". They will be right next to eachother.
15. Save the file, close notepad, close command prompt, restart your computer.

Windows 7 finally back to life.
Windows 7 SP1 still not installed with this error message:
error: error invalid parameter(0x80070057)
Another post from MS:

The update might have tried to install automatically and failed to install, that is why it’s showing the message and reverting back.
Step 1: First you may try to delete pending.xml and reboot.xml from the following location:
c:\windows\winsxs and Right click on pending.xml and reboot.xml and select delete or you may trydeleting from the command prompt:
1) Click the Start, click "All programs", and click "Accessories".
2) Right-click "Command Prompt" and click "Run as administrator".
3) In "Administrator: Command Prompt" window, type in “c:\windows\winsxs” (without the quotes) and press Enter.
4) Type del pending.xml and press Enter.
5) Type del reboot.xml and press Enter.
6) Restart the computer and check.
Step 2: You may also check the update history to find out the recently failed updates.
See which Windows updates are installed
Step 3: You may try to disable automatic update temporarily and try to download and install the updates manually:
You may follow the link to disable automatic updates.
Step 4: Download the failed updates from Microsoft download center.
You may try to download and install the standalone package of the failed update by following the link:
Step 5: Put the Computer in Cleanboot before Installing Standalone Package of the update:
You may refer the following KB article to perform Cleanboot:
1. Click Start, type msconfig in the Start Search box, and then press ENTER.
2. If you are prompted for an administrator password or for a confirmation, type the password, or click Continue.
3. On the General tab, click Selective Startup. Under Selective Startup, click to clear the Load Startup Items check box.
4. Click the Services tab, click to select the Hide All Microsoft Services check box, and then click Disable All. Click on Apply and then OK. When you are prompted, click Restart.
5. Try installing the standalone package of the update.
Step 6: After installing the standalone package of the update, put the computer back to Normal modeand enable windows updates:
1. Click on Start, type msconfig in the Start Search box.
2. In the General Tab, select "NORMAL STARTUP". Click on Apply and then OK. When you are prompted, click Restart.
You may also refer the following link for more information:
Troubleshoot problems with installing updates
Hope this information is helpful.
There was an error in this gadget
There was an error in this gadget
There was an error in this gadget