To do this, follow these steps:
Determine the Microsoft Knowledge Base article number of the failed update. To do this, do one of the following: View the error code message.
View the error code message.
View the update history on the Windows Update website or on the Microsoft Update website. To do this, follow these steps:
Go to the following Microsoft Update website:
http://update.microsoft.com
Under Options, click Review your update history.
In the Update column, determine the Microsoft Knowledge Base article number of the failed update.
Go to the following Windows Download website:
http://www.microsoft.com/windows/downloads/default.aspx
In the Search box on the Downloads webpage, type the article number that you located in step 1, and then click Go.
Note Do not include the letters "kb" when you type the article number. For example, type "kb123456" as 123456.
Browse through the list of returned content to locate the Knowledge Base article that has a link to the download.
Note You may be prompted to validate Windows. If you are prompted, follow the instructions to validate Windows, and then continue to download the update.
Click Download, and then click Save when you are prompted to save the download. Save the download to your desktop.
After the download is finished, click Open to install the update.
Note The update installation may fail if the update is incorrect for your version of Windows.
Method 3: Restart your computer, and then try to install the updates again
Exit all programs that are running, restart your computer, and then try to install the updates again.
Note Restarting the computer will make sure that all previous installations have finished, and that no remaining processes require a system restart before they can finish.
Method 4: Run the System Update Readiness tool (CheckSur.exe)
Download and run the System Update Readiness tool. This tool runs a one-time scan for inconsistencies that may prevent future servicing operations. For more information about how to download and run the CheckSur.exe tool, see the following article in the Microsoft Knowledge Base:
Fix Windows corruption errors by using the DISM or System Update Readiness tool (
https://support.microsoft.com/kb/947821)
Try to install updates again.
Note After you run the tool, the CheckSur.log file is saved in the following location:
%systemroot%\logs\cbs
Method 5: Run the System File Checker tool (SFC.exe)
To do this, follow these steps:
Open an administrative Command Prompt window.
At the command prompt, type sfc /scannow, and then press Enter.
After the scan is finished, try to install updates again.
Method 6: Reset the content of the Catroot2 folder
To do this, follow these steps:
Open an administrative Command Prompt window.
Type the following commands, and press Enter after each command:
net stop cryptsvc
md %systemroot%\system32\catroot2.old
xcopy %systemroot%\system32\catroot2 %systemroot%\system32\catroot2.old /s
Delete all contents of the catroot2 folder, but do not delete the catroot2 folder.
Type the following command, and then press Enter:
net start cryptsvc
Exit the Command Prompt window.
Method 7: Delete any incorrect registry values
Delete any incorrect values that may exist in the registry. To do this, follow these steps:
Click Start, and then type regedit in the Start Search box.
In the Programs list, click regedit.exe.
Locate and then select the following registry subkey:
HKEY_LOCAL_MACHINE\COMPONENTS
Right-click COMPONENTS.
Click Export.
In the File Name box, type COMPONENTS.
In the Save in box, click Desktop, click Save, and then save the file to your desktop.
In the details pane, right-click PendingXmlIdentifier, and then click Delete. If this value does not exist, go to the next step.
In the details pane, right-click NextQueueEntryIndex, and then click Delete. If this value does not exist, go to the next step.
In the details pane, right-click AdvancedInstallersNeedResolving, and then click Delete. If the value does not exist, go to the next step.
Restart the computer.
Try to install the updates again.
Method 8: Register the Windows Update files
To do this, follow these steps:
Open an administrative Command Prompt window.
At the command prompt, type the following command:
REGSVR32 WUPS2.DLL /S
REGSVR32 WUPS.DLL /S
REGSVR32 WUAUENG.DLL /S
REGSVR32 WUAPI.DLL /S
REGSVR32 WUCLTUX.DLL /S
REGSVR32 WUWEBV.DLL /S
REGSVR32 JSCRIPT.DLL /S
REGSVR32 MSXML3.DLL /S
Try to install updates again.
Method 9: Make sure that your antivirus application does not scan certain files
Make sure that your antivirus application does not scan the files in the %windir% \SoftwareDistribution directory on any computer on which Windows Update Agent is installed.
For computers that are running Windows Server 2003, Microsoft Windows 2000, Windows XP, Windows Vista, or Windows Server 2008, do not scan the following files and folders.
Note These files are not at risk of infection. If you scan these files, serious performance problems may occur because some files may be locked. If a specific set of files is identified by name, exclude only those files instead of the whole folder. Sometimes, the whole folder must be excluded. Do not exclude any of these items based on the file name extension. For example, do not exclude all files that have a .dit extension. Microsoft has no control over other files that may use the same extensions as these files.
Files that are related to Microsoft Windows Update or to Automatic Update
The Windows Update database file or the Automatic Update database file
Note This file (Datastore.edb) is located in the following directory:
%windir%\SoftwareDistribution\Datastore
The transaction log files
Note These files are located in the following folder:
%windir%\SoftwareDistribution\Datastore\Logs
Exclude the following files:
Edb*.log
Note The wildcard character indicates that there may be several files.
Res1.log
Res2.log
Edb.chk
Tmp.edb
Method 10: Rename the SoftwareDistribution folder
To do this, follow these steps:
Open an administrative Command Prompt window.
Run the following commands, and press Enter after each command:
Net stop wuauserv
cd %systemroot%
Ren SoftwareDistribution SoftwareDistribution.old
Net start wuauserv
Try to install updates again.
Important The following issues occur when you use this method:
Updates that are currently downloaded but that have not yet been installed have to be downloaded again by using Windows Update or Microsoft Update.
When you delete the Software Distribution folder, your download history is removed.
If you currently receive updates from Microsoft Update and from Windows Update, you will have to reselect this option from the Windows Update website.
Note If the issue is resolved and you can successfully download and install updates, you can safely delete the SoftwareDistribution.old folder to recover disk space.
Method 11: Clear the BITS queue of any current jobs
To do this, follow these steps:
Open an administrative Command Prompt window.
At the command prompt, type the following commands, and press Enter after each command:
Net stop bits
Net stop wuauserv
Ipconfig /flushdns
cd \documents and settings\all users\application data\microsoft\network\downloader
Del qmgr0.dat
Del qmgr1.dat
Net start bits
Net start wuauserv
Note After you complete these steps, the BITS queue is cleared.
Try to install updates again.
Method 12: Rename Pending.xml
To do this, follow these steps:
Open an administrative Command Prompt window.
At the command prompt, type the following command:
takeown /f C:\Windows\winsxs\pending.xml
Rename the c:\windows\winsxs\pending.xml path by using the following command:
Ren c:\windows\winsxs\pending.xml pending.old
Method 13: Run Chkdsk on the Windows partition
To do this, follow these steps:
Open an administrative Command Prompt window.
At the command prompt, type the following command:
Chkdsk volume: /f /r