Engine Designs LLC, Peter Tihanyi

Troubleshooting Windows Update

January 10, 2015

Normally Windows Update runs just fine, but sometimes installing certain update packages can give you a challenge. The most frustrating thing is when it doesn't give you a reason, just installation failed or an often useless error code like 80070002. Then the awkward dance begins.

Sometimes the issue is with the local content and history of Windows Update, for which Windows provides a fix in Windows 7 and 8, but unfortunately it's missing from Windows Server 2012.

Probably I don't need to point it out that the following commands require Administrator privileges.

Scan and repair system files

The Microsoft Windows Resource Checker can reveal issues so it's worth running it when the situation is grim.

sfc /scannow

This scans the integrity of all protected system files and repairs files with problems when possible. It will take a few minutes but it has a progress indicator.

Troubleshoot and repair Windows Update

Open Troubleshooting from the Control Panel. Select System and Security and from this screen choose Windows Update - Resolve problems that prevent you from updating Windows. It may look a bit different on Windows 7 but it's there.

The utility asks you to run it as Administrator, then it tries to resolve issues it finds. Usually it finds some problems to fix and it might wipe out your Windows Update history, but so be it.

At this point you should just reboot, then try to run Windows Update again to see if it fixed the problem. This is how I managed to install Windows 8.1 Update 1 (KB2919355).

Fixing a rare issue

With the coming of Windows 8, Microsoft no longer assumes that people mess around with the Start Menu by personalizing folders and the location of shortcuts. I use Start8 as a Start Menu replacement and of course I customize things, just like I've done so since Windows 95. When I tried to install Windows 8.1 Update 2 (KB3000850), it just wouldn't work and it provided no explanation why.

Turns out, it was missing some Start Menu folders from their default location, the root folder.

I figured it out by looking into the log file that the Microsoft Windows Resource Checker (sfc.exe) generates; apparently the Update packages use this system utility.


Look for the Error lines with the approximate timestamp when you tried to run the update. You may find something like this:

2014-11-21 14:27:44, Error   CSI   00000d81 (F) STATUS_OBJECT_NAME_NOT_FOUND #9467205# from Windows::Rtl::SystemImplementation::DirectFileSystemProvider::SysCreateFile(flags = (AllowSharingViolation), handle = {provider=NULL, handle=0, name= ("null")}, da = (SYNCHRONIZE|FILE_READ_ATTRIBUTES), oa = @0x9a6770da28->OBJECT_ATTRIBUTES {s:48; rd:NULL; on:[69]"\??\C:\ProgramData\Microsoft\Windows\Start Menu\Programs\System Tools"; a:(OBJ_CASE_INSENSITIVE)}, iosb = @0x9a6770da08, as = (null), fa = 0, sa = (FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE), cd = FILE_OPEN, co = (FILE_SYNCHRONOUS_IO_NONALERT|0x00004000), eab = NULL, eal = 0, disp = Invalid)

It's a handful, but this can give you a hint about what's missing. After you create the folders in the Start Menu (even without shortcuts), the update will install properly.

A more radical solution

In certain situations you may want to go for removing Windows Update related files manually, but probably this should be your last resort.

net stop wuauserv
Delete the contents of C:\Windows\SoftwareDistribution
net start wuauserv

Once you restarted the Windows Update Service, it will re-create some of the folders and files you deleted, then you can try to run Windows Update again.

Here We Go Again

December 1, 2014

Welcome or welcome back, depending on whether you've seen this website before on a very similar domain. I decided to start it all over again, simplified, with different goals in mind.

This space is for me to write about subjects that I find interesting, along with code snippets, system tweaks other nerdy things that you may find useful, but ultimately these are just notes for myself.

Let's begin.