Featured Posts

GTD #Tweekly Highlights Hi All Hopefully some of you managed to join the GTD #Tweekly that I mentioned in the post before this one. If not don't worry read on to see what we went through.   Read...

Readmore

Windows 2008 Certification Path Where To Start Want to learn more about Windows Server 2008 ? Well the best way to do this could by by the Microsoft certification process. Not only do you learn about Microsoft's new server platform but by the end of...

Readmore

Installing Active Directory Lightweight Directory Services Before we get started with installing AD LDS lets have a quick look at why you would want to install and use AD LDS. AD LDS allows you to setup your own customized LDAP database. LDAP is a set of objects...

Readmore

How Kerberos is used in an Active Directory Domain Active Directory is an identity management system. One of the most important parts of an identity system is authenticating users. Authenticating identities is a lovely set of words to describe the process...

Readmore

  • Prev
  • Next

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.

sfc

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: , , , ,

Comments (2)

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

Write a comment