Windows File Protection Blues
Posted on : 07-10-2008 | By : sporg | In : 1.Beginners, Guides
2
Windows File Protection or WFP for short is a part of Windows that prevents system files from being replaced. This should help against a whole load of problems and in some case prevent viruses from causing too much trouble. WFP works by keeping a copy of the windows system files in a safe place and if the normal file is changed WFP will replace the changed file with the original version. But when the original file gets damaged or corrupted WFP becomes a bit of a nightmare.
That’s where the Sfc.exe command may be able to save the day. Sfc stands for Windows File Checker and this command console program has the ability to check all the protected system files on your computer. Sfc can also clear out the copies of the system files and make new copies from you windows install CD.
If you are interested in giving sfc a go the first thing we will need to do is to open a command prompt window. To do this you will need to click on the start button, then go to all programs then accessories and you will find the command prompt link in the list that is displayed. Click on it to open the command prompt.
Once you have the command prompt window open you are faced with a few choices on how to run Sfc. Here is the command line help information but have a look after this info for some simple examples of how to use Sfc:
System File Checker Tool Syntax
Sfc [/Scannow] [/Scanonce] [/Scanboot] [/Revert] [/Purgecache] [/Cachesize=x]
/Scannow: Scans all protected system files immediately and replaces incorrect versions with correct Microsoft versions. This command may require access to the Windows installation source files.
/Scanonce: Scans all protected system files one time when you restart your computer. This command may require access to the Windows installation source files when you restart the computer. The SfcScan DWORD value is set to 2 in the following registry key when you run this command:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
/Scanboot: Scans all protected system files every time you start your computer. This command may require access to the Windows installation source files every time you start your computer. The SfcScan DWORD value is set to 1 in the following registry key when you run this command:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
/Revert: Returns scan to the default setting (do not scan protected files when you start the computer).The default cache size is not reset when you run this command. This command is equivalent to the /Enable switch in Windows 2000.
/Purgecache: Purges the file cache and scans all protected system files immediately. This command may require access to the Windows installation source files.
/Cachesize=x: Sets the file cache size to x megabytes (MB). The default size of the cache is 50 MB. This command requires you to restart the computer, and then run the /purgecache command to adjust the size of the on-disk cache. This command sets the SfcQuota DWORD value to x in the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Here are a few examples:
Before using Sfc please make sure you have your windows install CD close by for when Sfc requires it
If you want Sfc to check the system file next time you reboot the computer type:
- Sfc /Scanboot
If you would like Sfc to check the system file straight away type:
- Sfc /Scannow
If you suspect there is a problem with the origonal files that Wfp stores type this command to replace all the files with the ones on your install CD:
- Sfc /Purgecache
Hope this helps. Please let me know if you use this solution by adding a comment to this post.
Technorati Tags: Sfc, Wfp, Windows File Protection, System File Checker, System Files







This doesn’t work in Vista x64! Some of the parameters aren’t there.
Hi there,
Thanks for that, Any idea what extra parameters are needed ?
I hope to be installing Vista x64 on my home machine soon so hopefully will be able to find out what else is needed.
By the way. Anyone found this command to be of use. I have tried it a few time but so far it has not been able to sort out a lot of the problems I come across ?
Regards
Sporg