How To Repair Windows System Files with SFC /Scannow Command
How to repair Windows 10 with System File Checker[ps2id id='How to repair Windows 10 with System File Checker' target=''/]
Warning: This is a gentle warning that altering system files is dangerous, and if done incorrectly, it might cause irrevocable harm to your installation. Before starting, it is advised that you create a temporary complete backup of your PC. To fix a Windows 10 installation using the System File Checker utility, follow these steps:- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to repair the Windows 10 system files and press Enter:
sfc /scannow
- Confirm the command results:
- Windows Resource Protection did not find any integrity violations – indicates that the system does not have any corrupted or missing files.
- Windows Resource Protection could not perform the requested operation – indicates a problem during the scan, and an offline scan is required.
- Windows Resource Protection found corrupt files and successfully repaired them. Details are included in the CBS.Log %WinDir%\Logs\CBS\CBS.log – indicates that the tool detected problems and was able to fix them.
- Windows Resource Protection found corrupt files but was unable to fix some of them. Details are included in the CBS.Log %WinDir%\Logs\CBS\CBS.log – indicates you may need to repair the corrupted files manually.
System File Checker logs
To view the details stored in the CBS.Log file from an SFC scan, use these steps:- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command and press Enter:
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log > C:\sfclogs.txt"
- Open File Explorer (Windows key + E).
- Click on This PC from the left pane.
- Under the "Devices and drives" section, open the Local Disk (the "C" drive).
- Double-click the sfclogs.txt file to open it with the default text editor app.
How to repair Windows 10 with System File Checker offline[ps2id id='How to repair Windows 10 with System File Checker offline' target=''/]
[caption id="attachment_5637" align="alignnone" width="300"] How To Repair Windows System Files with SFC /Scannow Command[/caption] To repair Windows 10 using SFC with the offline option, use these steps:- Open Settings.
- Click on Update & Security.
- Click on Recovery.
- Under the "Advanced startup" section, click the Restart now button.
- Click on Troubleshoot.
- Click on Advanced options.
- Click on Command Prompt. (After selecting the option, the device will reboot.)
- Select your account in the Advanced startup options.
- Confirm the account password.
- Click the Continue button.
- Type the following command to start the diskpart tool and press Enter:
diskpart
- Type the following command to determine the location of the Windows and System Reserved partitions and press Enter:
list volume
- Confirm the current drive letter assignment for the System Reserved partition (the one close to 500MB) and Windows 10 partition, usually the volume with the largest size.
- Type the following command to exit diskpart and press Enter:
exit
- Type the following command to run the System File Checker offline and press Enter:
sfc /scannow /offbootdir=F:\ /offwindir=C:\Windows
In the command, we are using the/offboodir
option to specify the drive letter of the System Reserved partition, which in this case is F. Also, the/offwindir
option specifies the location of the Windows 10 files, which in this case is C:\Windows. - Click the X button to close Command Prompt.
- Click on Continue.
How to repair Windows 10 manually without System File Checker[ps2id id='How to repair Windows 10 manually without System File Checker' target=''/]
Determine corrupted system files
To find out which files need replacing on Windows 10, use these steps:- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command and press Enter:
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log > C:\sfclogs.txt"
- Open File Explorer (Windows key + E).
- Click on This PC from the left pane.
- Under the "Devices and drives" section, open the Local Disk (the "C" drive).
- Double-click the sfclogs.txt file to open it with the default text editor app.
Repair system files manually
You may be able to get excellent functional files to replace in your installation from another device that is running the same edition and version of Windows 10. If you do not know where the damaged file is, you may need to do an internet search using the information in the SFC log file. To repair damaged system files on Windows 10 manually, use these steps:- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to take ownership of the corrupted files and press Enter:
takeown /f C:\PATH\TO\FILE
In the command, replace C:\PATH\TO\FILE with the actual path to the file that you are trying to fix.This example takes ownership of the "acproxy.dll" file:takeown /f C:\Windows\System32\acproxy.dll
- Type the following command to grant full administrator access to the corrupted file and press Enter:
icacls C:\PATH\TO\FILE /Grant Administrators:F
In the command, replace C:\PATH\TO\FILE with the actual path to the file that you are trying to fix.This example grants access to the "acproxy.dll" file:icacls C:\Windows\System32\acproxy.dll /Grant Administrators:F
- Type the following command to replace the corrupted files with a good-known version and press Enter:
copy C:\PATH\TO\SOURCE\GOOD\FILE C:\PATH\TO\DESTINATION\BROKEN\FILE
In the command, replace C:\PATH\TO\SOURCE\GOOD\FILE with the path of the new file and C:\PATH\TO\DESTINATION\BROKEN\FILE with the path of the corrupted file. Quick tip: If you get a message saying you cannot replace the file because another process is using it, then either find and terminate the process or perform this task offline. (See above steps). This example replaces the "acproxy.dll" file in the System32 folder:copy C:\Files\acproxy.dll C:\Windows\System32\acproxy.dll
- Type the following command to verify the integrity of the Windows 10 system files and press Enter:
sfc /verifyonly
- (Optional) Type the following command to verify the integrity of the replacement file and press Enter:
sfc /verifyfile=C:\PATH\TO\REPLACED\FILE
In the command, replace C:\PATH\TO\REPLACED\FILE with the path of the file you replaced.This example verifies the integrity of the "acproxy.dll" file inside the System32 folder:sfc /verifyfile=C:\Windows\System32\acproxy.dll
How to Use SFC /Scannow[ps2id id='How to Use SFC /Scannow' target=''/]
-
Open Command Prompt as an administrator, very often referred to as an "elevated" Command Prompt.
For the sfc /scannow command to work properly, it must be executed from an elevated Command Prompt window in Windows 11, Windows 10, Windows 8, Windows 7 and Windows Vista. -
Type the following command and then press Enter.
sfc /scannow
To use System File Checker from the Command Prompt through Advanced Startup Options or System Recovery Options, see the Executing SFC /SCANNOW From Outside of Windows section below for some necessary changes in how you execute the command.System File Checker will now verify the integrity of every protected operating system file on your computer. It might take a while to finish.
When the verification process completes, you'll see something like this in the Command Prompt window, assuming problems were found and corrected:
Windows Resource Protection found corrupt files and successfully repaired them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For example C:\Windows\Logs\CBS\CBS.log. Note that logging is currently not supported in offline servicing scenarios.
...or something like this, if no problems were found:
Windows Resource Protection did not find any integrity violations.
In some situations, most often in Windows XP and Windows 2000, you may also need access to your original Windows installation CD or DVD at some point during this process. -
Restart your computer if sfc /scannow repaired files. System File Checker may or may not prompt you to restart but even if it doesn't, you should restart anyway.
-
Repeat whatever process caused your original problem to see if sfc /scannow resolved it.
How to Interpret the CBS.log File[ps2id id='How to Interpret the CBS.log File' target=''/]
When you run System File Checker, it creates a LOG file that lists every file that was examined and every repair operation that was performed. Assuming Windows is installed on the C: disk, the log file is located here and may be accessed with Notepad or another text editor:C:\Windows\Logs\CBS\CBS.log
This file could be useful for advanced troubleshooting or as a resource for a tech support person that might be helping you out.
Executing SFC /SCANNOW From Outside of Windows[ps2id id='Executing SFC /SCANNOW From Outside of Windows' target=''/]
When using sfc /scannow from outside of Windows, such as from the Command Prompt accessible when booting from your Windows installation disc or flash drive, or from your System Repair Disc or Recovery Drive, you must provide the location of Windows.
Here's an example:
sfc /scannow /offbootdir=d:\ /offwindir=d:\windows
The /offbootdir= option specifies the drive letter, while the /offwindir= option specifies the Windows path, again including the drive letter.
Depending on how your machine is set, the Command Prompt doesn't always assign drive letters in the same manner that you see them while you're within Windows. In other words, Windows may be at C:Windows when you use it, but D:Windows when you use the Command Prompt in ASO or SRO.
In most installations of Windows 11, Windows 10, Windows 8, and Windows 7, C: becomes D:, however in Windows Vista, C: remains C:. To be sure, search for the disk with the Users folder on it—this is the one on which Windows is installed, unless you have numerous installations of Windows on other drives. Use the dir command to search for directories in Command Prompt.
If Our Method Resolve Your Problem Consider To Share This Post, You can help more People Facing This Problem and also, if you want, you can Subscribe at Our Youtube Channel as Well! https://www.techguruhub.net/2022/06/04/repair-windows-files-sfc-scannow/?feed_id=67728&_unique_id=629b38d54fa01
Comments
Post a Comment