System File Checker: Difference between revisions

Content deleted Content added
Issues: wording update (long past)
History: officially called "Windows Me" not ME by microsoft
Tags: Mobile edit Mobile app edit Android app edit App section source
 
(42 intermediate revisions by 33 users not shown)
Line 1:
{{InfoboxShort description|Windows componentsystem file utility}}
{{Infobox software
| logo =
| screenshotname = sfc
| captionlogo =
| type screenshot = [[System software|System utility]]
| service_namescreenshot size =
| logocaption =
| service_description =
| included_withdeveloper = [[Windows 98Microsoft]] and later
| released = {{Start date and age|1998|06|25}}
| related_components = [[System Restore]]<br />[[Windows Recovery Environment]]<br />[[Windows Resource Protection]]
| latest release version =
| latest release date =
| operating system = [[Microsoft Windows]]
| genre = [[System software|System utility]]
| license = [[Proprietary software|Proprietary]] [[commercial software]]
| website = {{URL|https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/sfc}}
}}
'''System File Checker''' ('''SFC'''<ref>
'''System File Checker''' is a utility in [[Microsoft Windows]] that allows users to scan for and restore corruptions in Windows system files. This utility is available on [[Windows 98]], [[Windows 2000]] and all subsequent versions of [[Windows NT]] family of operating systems. In [[Windows Vista]] and [[Windows 7]], System File Checker is integrated with [[Windows Resource Protection]], which protects [[Windows Registry|registry]] keys and folders as well as critical system files. Under Windows Vista, <code>sfc.exe</code> can be used to check specific folder paths, including the Windows folder and the boot folder.
{{cite book
| last1 = Boswell
| first1 = William
| chapter = Using the System File Checker, SFC
| title = Inside Windows Server 2003
| url = https://books.google.com/books?id=zayrcM9ZYdAC
| series = Inside Series
| year = 2003
| publication-date = 2003
| page = 860
| isbn = 9780735711587
| access-date = 2017-07-23
| quote = You do not need to hack the Registry to change the WFP settings. A command-line utility comes with Windows Server 2003 to set these values. Called the ''System File Checker'', or SFC, the utility can also rebuild the <code>D11Cache</code> directory files if files are accidentally deleted.
}}
</ref>) is a utility in [[Microsoft Windows]] that allows users to scan for and restore corrupted Windows system files.<ref>{{Cite web|url=https://www.computerhope.com/sfc.htm|title=MS-DOS and Windows command line SFC command}}</ref>
 
==Overview==
'''System File Checker''' is a utility in [[Microsoft Windows]]ships that allows users to scan for and restore corruptions in Windows system files. Thisthis utility is available onwith [[Windows 98]], [[Windows 2000]] and all subsequent versions of the [[Windows NT]] family of operating systems. In [[Windows Vista]], [[Windows 7]] and [[Windows 710]], System File Checker is integrated with [[Windows Resource Protection]] (WRP), which protects [[Windows Registry|registry]] keys and folders as well as critical system files. Under Windows Vista, <code>sfc.exe</code> can be used to check specific folder paths, including the Windows folder and the boot folder.
 
[[Windows File Protection]] (WFP) works by registering for notification of file changes in [[Winlogon]]. If any changes are detected to a protected system file, the modified file is restored from a cached copy located in a compressed folder at <code>%WinDir%\System32\dllcache</code>.
 
[[Windows FileResource Protection]] (WRP) works by registeringsetting fordiscretionary notificationaccess-control oflists file(DACLs) changes inand [[Winlogonaccess control list]]s (ACLs) defined for protected resources. If any changes are detected to a protected system file, the modified file is restored from a cached copy located in a compressed folder at <code>%WinDir%\System32WinSxS\dllcacheBackup</code>.<ref [[Windowsname=":0">{{Cite Resourceweb Protection]]|last=stevewhims (WRP)|date=2021-01-07 works|title=Protected byResource settingList discretionary- accessWin32 controlapps lists|url=https://learn.microsoft.com/en-us/windows/win32/wfp/protected-file-list (DACLs) and [[|access-date=2024-03-15 control|website=learn.microsoft.com list]]s (ACLs) defined for protected resources.|language=en-us}}</ref> Permission for full access to modify WRP-protected resources is restricted to the processes using the ''Windows Modules Installer service'' (<code>TrustedInstaller.exe</code>). Administrators no longer have full rights to system files.
 
==History==
Due to problems with Windows applications being able to overwrite system files in [[Windows 95]], Microsoft has since implemented a number of security measures to protect system files from malicious attacks, corruptions, or problems such as [[DLL hell|DLL Hell]].
 
System File Checker was first introduced on [[Windows 98]] as a GUI utility. It offered scanning and restoration of corrupted system files by matching the version number against a database containing the original version number of the files in a fresh Windows 98 installation. This method of file protection was basic. It determined system files by [[file extension]] and [[file path]]. It was able to restore files from the installation media or a source specified by the user. Windows 98 did not offer real-time system file protection beyond [[file attribute]]s; therefore, no preventive or reactive measure was available.
 
All Windows NT-based operating systems since [[Windows 2000]] introduced real-time file protection, called [[Windows File Protection]] (WFP).<ref>{{cite web
|publisher=[[Microsoft]]
|date=2003-12-December 15, 2003
|work=Help and Support
|title=Description of the Windows File Protection Feature
|url=http://support.microsoft.com/kb/222193/
|access-date=August 28, 2006
|accessdate=2006-08-28}}</ref>
|url-status=live
|archive-url=https://web.archive.org/web/20041020015533/http://support.microsoft.com/kb/222193
|archive-date=October 20, 2004}}</ref>
 
In addition, the System File Checker utility (<code>sfc.exe</code>) was reimplemented as a more robust command-line utility that integrated with WFP. Unlike the Windows 98 SFC utility, the new utility forces a scan of protected system files using Windows File Protection and allows the immediate silent restoration of system files from the ''DLLCache'' folder or installation media.
 
SFC did not appear on [[Windows MEMe]],<ref>{{cite web
|first=Lincoln
|last=Spector
|work=[[PC World]]
|publisher=[[International Data Group|IDG]]
|date=2001-02-February 14, 2001
|title=Answer Line: Windows 98 Utilities Missing in Windows Me?
|url=http://www.pcworld.com/article/41022/answer_line_windows_98_utilities_missing_in_windows_me.html
|access-date=December 26, 2011
|accessdate=2011-12-26}}</ref> as it was replaced with [[System File Protection]] (SFP).<ref>{{cite web
|url-status=dead
|archive-url=https://web.archive.org/web/20110605125202/http://www.pcworld.com/article/41022/answer_line_windows_98_utilities_missing_in_windows_me.html
|accessdatearchive-date=June 5, 2011-12-26}}</ref> as it was replaced with [[System File Protection]] (SFP).<ref>{{cite web
|publisher=[[Microsoft]]
|date=2001-12-04December 4, 2011
|title=System File Protection and Windows Me
|url=http://www.microsoft.com/whdc/archive/WinMe_sfp.mspx
|access-date=August 28, 2006
|accessdate=2006-08-28}}
|url-status=dead
|archive-url=https://web.archive.org/web/20040622001805/http://www.microsoft.com/whdc/archive/WinME_sfp.mspx
|archive-date=June 22, 2004}}
</ref> Similar to WFP, SFP offered real-time protection.
 
Line 47 ⟶ 82:
The System File Checker component included with versions of Windows 2000 earlier than Service Pack 4 overrode patches distributed by Microsoft;<ref>
{{cite web
|date=30 October 30, 2006
|publisher=[[Microsoft Corporation]]
|work=Microsoft Support website
|url=http://support.microsoft.com/kb/814510/
|title=The SFC /SCANNOW Command May Overwrite Hotfix Files
|accessdateaccess-date=1 February 1, 2010
|url-status=dead
|archive-url=https://web.archive.org/web/20061116172152/http://support.microsoft.com/kb/814510
|archive-date=November 16, 2006
}}</ref> this was rectified in Windows 2000 Service Pack 4.
 
==Usage==
In Windows NT-based operating systems, System File Checker can be invoked via [[cmd.exe|Windows Command Prompt]] (with Admin privilege<ref>{{cite web | title=SFC - System File CheckerWindows CMD | website=SS64.com | url=https://ss64.com/nt/sfc.html | access-date=2023-09-12}}</ref>), with the following command:
 
* {{code|sfc /scannow}} (to repair problems)
<source lang="dos">
* or {{code|sfc /verifyonly}} (no repair)
sfc /scannow
</source>
 
If it finds a problem, it will attempt to replace the problematic files from the ''DLL Cache'' (<code>%WinDir%\System32\Dllcache\dllcache</code>). If the file is not in the DLL Cache or the DLL Cache is corrupted, the user will be prompted to insert the Windows installation media or provide the network installation path. System File Checker determines the Windows installation source path from the registry values <code>SourcePath</code> and <code>ServicePackSourcePath</code>.<ref>[{{cite web|url=http://support.microsoft.com/kb/885522 |title=System File Checker does not accept a network ___location that contains the installer CD when you use the scannow switch in Windows XP SP2 or in Windows Server 2003|date=January 13, 2005|work=Support|publisher=[[Microsoft]]|url-status=dead|archive-url=https://web.archive.org/web/20070116014009/http://support.microsoft.com/kb/885522/|archive-date=January 16, 2007}}</ref> It may keep prompting for the installation media even if the user supplies it if these values are not correctly set.<ref>[{{cite web|url=http://support.microsoft.com/kb/900910 |title=You are prompted to insert a Windows XP SP2 CD when you try to run the System File Checker tool on a Windows XP SP2-based computer|date=July 5, 2005|work=Support|publisher=[[Microsoft]]|url-status=live|archive-url=https://web.archive.org/web/20070207090302/http://support.microsoft.com/kb/900910|archive-date=February 7, 2007}}</ref>
 
In Windows Vista and onwards, files are protected using [[Accessaccess control list]]s (ACLs), howeverand if it finds a problem, it will attempt to replace the problematic files from the Windows Side-by-side Backup (<code>%WinDir%\WinSxS\Backup</code>).<ref name=":0" /> However, the above command has not changed.
 
System File Checker in Windows Vista and later Windows operating systems can scan specific individualspecified files. Also, scans can be performed against an offline Windows installation folder to replace corrupt files, in case the Windows installation is not bootable. For performing offline scans, System File Checker must be run from another working installation of Windows Vista or a later operating system or from the Windows setup DVD<ref>{{Cite web|url=http://www.craxworld.com/system-file-checker-tool-windows-11822/|title=Run System File Checker Tool to Repair Windows 10/8/7 files|last=kumar|first=Rohit|date=26 July 2016|website=Craxworld|publisher=Self Published|url-status=dead|archive-url=https://web.archive.org/web/20160911000021/http://www.craxworld.com/system-file-checker-tool-windows-11822/|archive-date=September 11, 2016}}</ref> or a recovery drive which gives access to the [[Windows Recovery Environment]].
 
In cases where the component store is corrupted, athe tool"System calledUpdate Readiness tool" (CheckSUR) can be installed on Windows 7, Windows Vista, Windows Server 2008 R2 or Windows Server 2008, replaced by "[[Deployment Image Service and 7Management Tool]]" (DISM) for Windows 10, whichWindows 8.1, Windows 8, Windows Server 2012 R2 or Windows Server 2012. This tool checks the store against its own payload and repairs the corruptions that it detects by downloading required files through Windows update.<ref>{{cite web |url=https://support.microsoft.com/en-us/help/947821/fix-windows-update-errors-by-using-the-dism-or-system-update-readiness-tool |title=Fix Windows 8Update anderrors laterby integrateusing the functionalityDISM ofor CheckSURSystem intoUpdate Readiness tool |work=Support|publisher=[[DeploymentMicrosoft]]|date=January Image22, Service2017 and|access-date=February Management11, Tool|DISM]].2017}}</ref>
 
==References==
{{reflistReflist}}
 
==Further reading==
*{{Cite book|first=Æleen|last=Frisch|year=2001|title=Windows 2000 Commands Pocket Reference|publisher=[[O'Reilly Media|O'Reilly]]|isbn=978-0-596-00148-3}}
*{{Cite book|author=John Paul Mueller|year=2007|title=Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000|publisher=[[Wiley (publisher)|John Wiley & Sons]]|isbn=978-0470165799}}
 
==External links==
{{Wikibooks|Guide to Windows Commands}}
*[http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/system_file_checker.mspx System File Checker (sfc)]
*[https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/sfc sfc | Microsoft Docs]
*[https://support.microsoft.com/en-us/help/929833/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system Use the System File Checker tool to repair missing or corrupted system files]
*[http://support.microsoft.com/kb/310747 Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe)]