Geeks in Phoenix

Geek Blog


Troubleshooting Windows Update problems

When it comes to repairing Windows based computers, there seems to be a couple of problems that I get allot of requests for help with. One of them is when a computer cannot get updates to Windows. So here are a few of my favorite resources for fixing Windows Update.

Troubleshooting Windows Update problems

There are several reasons why Windows Update can fail. There could be corrupted files and/or folders, the different services that Windows Update require are not starting, registry errors, etc.. The following is a list of some of the procedures I use in repairing Windows Update.

Note : Remember to always restart your computer after running any of these procedures before try Windows Update again.

Windows Update Troubleshooters

This is probably the easiest and most common way to repair Windows Update. Microsoft has a Windows Update troubleshooter for every version of Windows. The following link is a general page for troubleshooting Windows Update. Just select the version of Windows you are trying to repair and then click on the Windows Update Troubleshooter link. If you are prompted to run or save the file, I recommend saving it to your hard drive. That way if you need to run it again, you will already have it ready to go.

Repair Windows Update

So if the Windows Update Troubleshooter (repair) did not fix the issue, you can try resetting all of the Windows Update components. The following link has both the automatic Microsoft Fixit troubleshooter and manual instructions for resetting Windows Update components. I recommend using an automatic troubleshooter unless you are comfortable with going through all the of manual procedures. Again, when prompted to run or save the troubleshooter, I recommend that you save it to your hard drive, just in case you need to run it again.

Reset Windows Update components

Check your drive for errors

Now, if you have run both of the Windows Update troubleshooters (repair / reset) and Windows Update is still not functioning correctly, it's time to do some general system checks. Sometimes there can be an error(s) with the file system that is not allowing the troubleshooters to fix the issue(s). I have had this problem many times before. Nothing worse than feeling like a dog chasing his own tail. At this point, I recommend checking your hard drive for errors by running checkdisk.

Check your hard disk for errors in Windows Vista

Check your hard disk for errors in Windows 7

Check your hard drive for errors in Windows 8

Check your hard drive for errors in Windows 10

Once you are done with a checkdisk, go ahead and run the Windows Update Troubleshooters again. First run the repair troubleshooter and try checking for updates. If it doesn't fix it, run the reset troubleshooter. If Windows Update still won't work, then it is time to check to system files.

Check system files

SFC

Windows has a built-in program called System File Checker (SFC) that can check system files for corruption and incorrect versions. SFC is run inside of an administrative command prompt. Just follow the link below for your version Windows for instructions on how to bring up an admin command prompt.

Open a Administrative Command Prompt in Windows Vista / Windows 7

Open a Administrative Command Prompt in Windows 8 / Windows 8.1

Open a Administrative Command Prompt in Windows 10

SFC is basically the same in all of the currently supported versions of Windows, Here is the link to the most detailed instructions for SFC (Windows 10).

Check Windows 10 system files with System File Checker

Once you are done running SFC and have corrected any problems it may have found, go ahead try running Windows Update. If it still won't work, try running the troubleshooters (repair / reset) one at time, running Windows Update in between. If you still cannot run Windows Update successfully, it may be time to run the most advanced system corruption repair tools.

DISM (Windows 8/8.1, Windows 10) / SUR (Windows Vista, Windows 7)

Deployment Image Servicing and Management (DISM) and System Update Readiness tool (SUR) are the most complete way of checking for file corruption in Windows. The link to the instructions on how to run both is below. DISM and SUR are meant to be used by advanced users, so if you don't feel comfortable running either one of these programs, please contact a local computer repair technician for assistance.

Fix Windows Update errors by using the DISM or System Update Readiness tool

After running either DISM or SUR check again to see if Windows Update will work. If Windows Update still will not work, it may be time to reset or reinstall Windows. The instructions on how to do this can be found online. If you require assistance with this process, please contact a local computer repair technician.

Check Windows 10 system files with System File Checker

I was thinking the other day about what program I use the most in doing computer repair. The one program I use the most on Windows based computers would have to be System File Checker (SFC). SFC checks for system files that may have gotten corrupt or replaced with incorrect versions. Here's how to check Windows 10 system files with System File Checker.

Check Windows 10 system files with System File Checker

SFC has been included in every version of Windows since Windows XP. In fact, you can also build it into the Microsoft Diagnostics and Recovery Toolset (DaRT). There is no shortcut or link to SFC in Windows 10, as it runs inside of an Administrative Command Prompt.

How to open a Command Prompt with Administrator privileges in Windows 10

SFC running inside of Windows 10 Administrative Command Prompt

The following is the syntax and switches for SFC. The most commonly used syntax / switch is: sfc /scannow.

SFC [/SCANNOW] [/VERIFYONLY] [/SCANFILE=<file>] [/VERIFYFILE=<file>] [/OFFWINDIR=<offline windows directory> /OFFBOOTDIR=<offline boot directory>]

/SCANNOW (Scans integrity of all protected system files and repairs files with problems when possible.)
/VERIFYONLY (Scans integrity of all protected system files. No repair operation is performed.)
/SCANFILE (Scans integrity of the referenced file, repairs file if problems are identified. Specify full path <file>.)
/VERIFYFILE (Verifies the integrity of the file with full path <file>. No repair operation is performed.)
/OFFBOOTDIR (For offline repair specify the location of the offline boot directory.)
/OFFWINDIR (For offline repair specify the location of the offline windows directory.)

Examples

sfc /scannow sfc /verifyfile=c:\windows\filetobereplaced.dll sfc /scanfile=d:\windows\filetobereplaced.dll /offbootdir=d:\ /offwindir=d:\windows sfc /verifyonly

Once SFC is done scanning the system files, it will give one of four possible results:

  • Windows Resource Protection did not find any integrity violations.
    All system file are fine and you're good to go.
  • Windows Resource Protection could not perform the requested operation.
    There may be another program preventing SFC from running. In this case boot the system up into safe mode and run SFC from there.
  • Windows Resource Protection found corrupt files and successfully repaired them.
    All system files are now correct and you're ready to go. If you want to view the repair details, see below.
  • Windows Resource Protection found corrupt files but was unable to fix some of them.
    If you get this message, SFC found a file or files that it wasn't able to repair. The next thing you will need to do is find out what the name of the file(s) are. Using the Find String utility, you can filter out the SFC results with only the components that were scanned and create a text file with that information on your Desktop called sfcdetails.txt. Just copy the following code into an Administrative Command Prompt:
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

Manually replacing a corrupt system file in Windows 10

Note: To replace a corrupt system file, you will need to have a known good copy of the file(s) in question. A good source for files is another computer or virtual machine running Windows 10. Since I do computer repair for a living, I have all of the versions of Windows that are still supported by Microsoft running inside of Oracle VirtualBoxes.

First thing to do is make note of the location (path) and name of the file(s) that need to be replaced from the sfcdetails.txt file. Once you have another copy of the corrupt file(s), you will need take administrative ownership of the file(s). To do this, modify the following command with the path\filename of the file you want to replace and then type it into an Administrative Command Prompt:

takeown /f path\filename

Example: takeown /f C:\Windows\FileToBeReplaced.dll

Next you will have to grant administrators full access to file(s) being replaced. To do this, modify the following command with the path\filename of the file you want to replace and then type it into an Administrative Command Prompt:

icacls path\filename /grant administrators:F

Example: icacls C:\Windows\FileToBeReplaced.dll /grant administrators:F

Third thing to do is copy over the new file(s) and replace the corrupt one(s).To do this, modify the following command with the path\filename of the file you want to replace and then type it into an Administrative Command Prompt:

copy path\filename path\filename

Example: copy C:\Temp\FileToBeReplaced.dll C:\Windows\FileToBeReplaced.dll

Check the protected system files in Windows with System File Checker

There may come a time when your Windows based computer starts to run improperly. Installing and uninstalling software, viruses and malware are just a few things that can corrupt the integrity of system files. When it comes to computer repair on a system running Windows, I always like to check for corrupt system files. You can too with Windows built-in System File Checker (SFC).

System File Checker running in Command Prompt inside of Windows 8
System File Checker running in Command Prompt inside of Windows 8

SFC scans the integrity of all protected system files and replaces incorrect versions with correct Microsoft versions. Everything SFC does is documented in the CBS.log file. So, if SFC finds any files that it cannot repair, check the CBS.log for more information. See the bottom of command line syntax(s) and parameter(s) for details on how to view the CBS.log.

Running SFC in Windows Vista, Windows 7 and Windows 8

To ensure that SFC runs with administrator privileges on Windows Vista, Windows 7 and Windows 8, you will need to run it at an administrative Command Prompt.

  1. Open a Command Prompt with Administrative privileges
    How to open a Command Prompt with Administrator privileges in Windows Vista and Windows 7
    How to open a Command Prompt with Administrator privileges in Windows 8
  2. Use the following command line syntax(s) and parameter(s) to run SFC:

sfc [/scannow] [/verifyonly] [/scanfile=<file>] [/verifyfile=<file>] [/offwinddir=<offline windows directory>/offbootdir=<offline boot directory>]

/scannow Scans integrity of all protected system files and repairs files with problems when possible.
/verifyonly Scans integrity of all protected system files. No repair operation is performed.
/scanfile Scans integrity of the referenced file, repairs file if problems are identified. Specify full path <file>.
/verifyfile Verifies the integrity of the file with full path <file>. No repair operation is performed.
/offbootdir For offline repair specify the location of the offline boot directory.
/offwinddir For offline repair specify the location of the offline windows directory.
/? Displays help at the command prompt.

You can view the CBS.log file in Notepad by using the following code at the same administrative Command Prompt used to start SFC.
notepad %systemroot%\Logs\CBS\CBS.log

Running SFC in Windows XP

To use SFC, you will need to open a Command Prompt.

  1. Click the Start button, then Programs, then Accessories, then click on Command Prompt
    or
    Press Windows logo key + R. This will bring up the Run dialog box. Type CMD and click OK
  2. Use the following command line syntax(s) and parameter(s) to run SFC:

sfc [/scannow] [/scanonce] [/scanboot] [/revert] [/purgecache] [/cachesize=<x>]

/scannow Scans all protected system files once.
/scanonce Scans all protected system files once.
/scanboot Scans all protected system files every time the computer is restarted.
/revert Returns the scan to its default operation.
/purgecache Purges the Windows File Protection file cache and scans all protected system files immediately.
/cachesize=<x> Sets the size, in MB, of the Windows File Protection file cache.
/? Displays help at the command prompt.

When SFC is done, you can view the log file in Notepad by using the following code at the same Command Prompt used to start SFC.
notepad %systemroot%\Logs\CBS\CBS.log

Customer service is #1

Here at Geeks in Phoenix, we take pride in providing excellent customer service. From computer repair, virus removal and data recovery, we aim to give the highest quality of service.

Bring your computer to us and save

Our in-shop computer repair service  is based on the time we work on your computer, not the time it takes your computer to work!

Contact us

Geeks in Phoenix
4722 East Monte Vista Road
Phoenix, Arizona 85008
(602) 795-1111

Like Geeks in Phoenix on Facebook

Follow Geeks in Phoenix on Twitter

Watch Geeks in Phoenix on YouTube

Geeks in Phoenix is an IT consulting company specializing in all aspects of Computer Repair / PC Repair / Laptop Repair. Since 2008, our expert computer repair technicians have been providing outstanding Computer Repair, Virus Removal, Data Recovery, Photo Manipulation and Website Support.

Geeks in Phoenix have the best computer repair technicians providing computer repair and service in Phoenix, Scottsdale and Tempe Arizona. We offer In-Shop, On-Site and Remote (with stable Internet connection) computer repair service.

Copyright © 2016 Geeks in Phoenix LLC