Launch Win2K's System File Checker to troubleshoot Add/Remove Programs tool

In this Daily Drill Down, Greg Shultz shows you how the Windows System File Checker tool works and how to use it to revive the Add/Remove Programs tool.

You’re troubleshooting a network problem on a Windows 2000 Professional system and want to install the Simple Network Management Protocol (SNMP) from the Windows Component Wizard in the Add/Remove Programs tool. So, you access the Control Panel and double-click the Add/Remove Programs icon. Nothing happens.

Thinking you might not have actually double-clicked the icon, you try again. Nothing happens. The Add/Remove Programs window simply doesn’t appear and there is no error message. However, you did notice a brief period of disk activity, so you launch Task Manager, select the Processes tab, and discover that the process associated with the Add/Remove Programs tool, Mshta.exe, is indeed listed. So, you’re off on another troubleshooting expedition, but which way do you go?

Well, when the Add/Remove Programs tool begins behaving in this manner, it’s a sure sign that a crucial Windows system file is missing or corrupt. As such, the best tool for the job is the Windows System File Checker (SFC) tool.

Works for both versions
The Windows System File Checker tool procedure described here applies to both Windows 2000 Professional and Windows 2000 Server. For my example, I’ll be performing the operation on Windows 2000 Professional.

What about the Windows File Protection feature?
As you read this introduction, your first thought may have been, “How could a crucial Windows system file be missing or corrupt when Windows 2000 employs the Windows File Protection (WFP) feature, which is intended to protect critical Windows system files? Wouldn’t WFP prevent such a situation from occurring in the first place?"

Well, under normal circumstances, WFP is designed to run in the background and automatically monitor specific protected directories for changes to any of the files in those directories. More specifically, it looks for delete operations, which can occur if an installation program overwrites a system file with its own version or if a user accidentally deletes the file.

In the case of an overwrite operation, WFP looks up the file signature in its catalog to determine if the new file is the correct version. If it isn't, WFP replaces the new file with the file from the cache folder. In the case of an outright delete operation, WFP replaces the file with a copy from the cache folder that contains backups of the original files. (The cache folder can be found at %systemroot%\system32\dllcache.)

While this part of the WFP system offers a high degree of protection for Windows system files, it’s not foolproof. For instance, there could have been a problem with the area of the hard disk on which the cache folder is stored, and the files were corrupted during the repair operation. In another scenario, if the operation that prompted WFP to go into action could also cause the operating system to hiccup or lock up, the replacement file could very likely be corrupted. Such a situation could also prevent WFP from replacing the file. As a result, you could very well end up with a corrupt or missing system file.

Fortunately, the automated portion of WFP is backed up by a manually run portion—a command line tool called the Windows System File Checker. (If you want more detailed information on WFP, check out Microsoft Knowledge Base article 222193, “Description of the Windows File Protection Feature.”)

Using the Windows System File Checker tool
The Windows System File Checker tool is a companion to the automated Windows File Protection feature. SFC is designed to perform maintenance operations in support of the overall goal of the Windows File Protection feature. Let’s take a closer look.

To fix the problem with the Add/Remove Programs tool not launching properly due to a missing or corrupt Windows system file, you’ll use SFC to perform a two-part operation that actually completes three tasks. In the first part, SFC will delete all the files in the cache folder and then repopulate it. You’ll need to have your Windows 2000 CD on hand.

In the second part, SFC scans all the protected system files. Since SFC is a command line tool, you’ll first need to open a command prompt window. Then, run SFC’s executable file along with the /purgecache parameter. You'll see two Windows File Protection dialog boxes appear on the screen in succession, as shown in Figure A. Insert your Windows 2000 CD and click the Retry button. You’ll then see the progress of the rebuild operation in the first dialog box.

Figure A
Once SFC purges the cache, it will prompt you to insert your Windows 2000 CD and will begin rebuilding the cache.

When you think about rebuilding the cache from the Windows 2000 CD, you may also wonder about those system files that have been legitimately updated via service packs, hot fixes, and Windows Update. However, you needn’t worry, since SFC takes that fact into account and makes sure that the most current version of any system file that has been updated is placed in the cache folder. SFC consults its catalog file to compare version numbers. If the system file on the CD has been superceded by a newer version, SFC taps into a hidden folder in the %Systemroot% folder called ServicePackFiles and copies that version of the file to the cache folder.

Once SFC has rebuilt the cache, it’s time to rescan all of your files. Run SFC’s executable file along with the /scannow parameter. You'll see a Windows File Protection dialog box that shows you the progress of the operation. When the operation is complete, remove the Windows 2000 CD and restart the system. If the operation was a success, you should be able to access the Add/Remove Programs tool and use it as you normally would.

Using an in-place upgrade
In most cases, using SFC to replace the corrupt or missing Windows system files will allow you to access the Add/Remove Programs tool. However, if the operation isn’t successful, your only alternative is to perform an in-place upgrade. Of course, this can be a lengthy operation and, at the end, you’ll have to download and reinstall all of the service pack and hot fix updates. You'll find detailed instructions on performing an in-place upgrade in Windows 2000 in my recent article “Rescue a Windows 2000 installation with an in-place upgrade.”


About Greg Shultz

Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

Editor's Picks