How to check system files. How to restore Windows XP system files

The System File Checker built into Windows can check system files for damage and any other changes. If the file has been modified, the utility will automatically replace it with the correct version.

When to use these commands

These commands are useful when diagnosing a faulty Windows operating system. If the system produces a blue screen, applications crash, or some system functions do not work, the SFC command can help. Even if executing the SFC command does not fix anything, this will allow you to verify that the system files are not damaged and you can continue diagnostics in other ways.

The DISM command is not required under normal circumstances. But if the SFC command fails or fails to replace damaged files with normal ones, DISM or System Update Readiness Tool can fix the operating system itself and allow the SFC command to run normally.

Fixing system files with the SFC command

The SFC command must be run as an administrator. To do this, in Windows 10 or 8.1, right-click on the Start icon and select the Command Prompt (Admin) option. Additionally, in all versions of Windows, you can search the Start menu/Start screen for “command prompt,” right-click the link, and select “Run as Administrator.”

To perform a full system scan, enter the following command in the command prompt window and press :

Do not close the window until the command completes. The process can be quite lengthy. If everything is in order, at the end of the scan the message “Windows Resource Protection did not find any integrity violations” will appear.

If you see the message “Windows Resource Protection found corrupt files but was unable to fix some of them,” first try booting your system into Safe Mode. In Windows 10, 8.1 or 8, to do this, hold down the key when selecting the “Restart” option in the shutdown menu to get to the screen for selecting additional boot options. In Windows 7 and earlier versions, restart your computer and hold down the key during startup. After booting into safe mode, run the sfc /scannow command again.

Fixing SFC problems with the DISM command

In Windows 10, 8.1, and 8, you can use the Deployment Image & Servicing Management (DSIM) tool to fix component store corruption that is preventing SFC from working properly.

To run this tool, open a Command Prompt window as an administrator, type the following command, and click . DISM will check the Windows Component Store for corruption and automatically fix any problems found.

DISM /Online /Cleanup-Image /RestoreHealth

Do not close the Command Prompt window until the process is complete. The verification may take up to 10 minutes. If the progress bar stays at 20% for a long time, don’t worry, this is normal.

If any changes are made as a result of running the DISM command, restart your computer. Once done, run the SFC command again and it will be able to replace the corrupted files with the correct ones.

In Windows 7 and earlier versions, the DISM command is not available. Instead, you can download the System Update Readiness Tool from the official Microsoft website, which allows you to check your system for problems and try to fix them.

Restoring the system or restoring it to its original state

If problems persist and these tools cannot correct them, more drastic measures can be taken. System Restore allows you to return Windows to an earlier state, which will solve the problem if the operating system was still working in that state.

You can also reset Windows to its factory state or reinstall it. In Windows 10, 8.1 and 8, you can use the Computer Restore () feature, which allows you to return Windows to its original state. After this, you will have to reinstall all programs, but user files will not be affected. In Windows 7 and earlier, you should use a recovery partition created by your computer manufacturer, or simply reinstall Windows from scratch.

If you encounter other errors when running the commands described above, try searching for their description on the Internet. Often the command output contains information about log files that can provide more detailed information about specific problems. And in the end, you don't have to waste time diagnosing complex problems when you can simply perform a factory reset or reinstall Windows.

The commands described above have other capabilities. For example, you can use SFC to check and fix individual system files. And with DISM, you can perform a quick system scan without fixing it, or point the utility to a WIM or ESD file containing Windows system files.

Materials

The operating system contains a large number of system files that ensure its normal operation. If one or more files are damaged, the OS will not be able to fully function. This can be expressed as errors and failures during operation, for example, Explorer crashing or problems managing Windows components, or the inability of the computer to boot.

There can be many reasons why system files are damaged in the Windows operating system. This could be viruses, tweakers, deliberate modification of files by the user, damage to the hard drive, and so on. Microsoft developers foresaw the possibility of such an event, so they created a system for checking the integrity of Windows system files (System File Checker tool). It allows you not only to identify changes, but also to return everything to its original state automatically, if possible.

The point of the work is to compare system files located in windows folders with reference samples, which are stored in a special windows component storage located in the WinSxS folder. If they differ or the file is missing, it is replaced with the original one from the repository.

To use the System File Checker, you need a command prompt running with computer administrator rights. To check, use the sfc command, which has several keys. To start checking the integrity of all protected files and automatically correcting changed or missing ones, enter the sfc /scannow command and wait for the file verification process to complete. It may take a long time, so be patient. A summary message will be shown at the end.

A full scan with automatic fixing isn't always necessary, so there are a few other keys that might come in handy.

  • /verifyonly - only checks all system files without attempting to automatically restore them
  • /scanfile - scans and restores a specific file, requires specifying the full path to the file
  • /verifyfile - checking a specific file without automatic correction

If everything is in order in the system, the message will notify that Windows resource protection has not detected any integrity violations. Otherwise, the message will differ depending on the situation. If Windows cannot execute this command, then do the same in safe mode.

If damaged files are detected and successfully replaced with correct versions, Windows will notify you of this with a corresponding message. At this point, we can consider the operation to check and restore the integrity of the Windows system files to be successfully completed.

Restoring the Component Store

However, it is possible that the storage itself will be damaged or missing. This is especially important for those who like to install custom OS builds instead of original images. In this case, the sfc utility will not work. To solve the problem, you can try to automatically restore the Windows component store using the command available starting from Windows 8:

Dism /Online /Cleanup-Image /RestoreHealth

Owners of 7 who have the KB2966583 update installed can only check the storage with the command:

DISM /Online /Cleanup-Image /ScanHealth

The execution results can be found by looking at the log at C:\windows\Logs\CBS\Checksur.log

Manual recovery of damaged files

However, there may be a situation where the scan shows errors, but Windows Resource Protection will not be able to automatically correct them. Information about them will be contained in the CBS log file located at C:\windows\Logs\CBS\CBS.log which can be opened with any text editor.

Only for this it must be launched with computer administrator rights. The file stores a lot of technical information, but we are interested in the lines containing . You can find them using the search built into the editor by pressing the key combination Ctrl+F or go the other way and run the following command in the command line running as administrator.

Findstr /c:"" c:\windows\logs\CBS\CBS.log >c:\sfcresult.txt

Thus, we tell Windows that it needs to find all the lines containing in the CBS.log file and save the result to drive C in the file sfcresult.txt. Thus, the file will contain filtered information related to the operation of the sfc command. All that remains is to study it carefully, not forgetting to pay attention to the date and time indicated in the line with the time of the scan, so as not to study old results. In this case, the system successfully restored the autoplay.dll file using the reference file from the storage in the WinSxS folder, about which there is a corresponding entry in the log.

2017-02-04 13:30:58, Info CSI 0000032f Repairing 1 components 2017-02-04 13:30:58, Info CSI 00000330 Beginning Verify and Repair transaction 2017-02-04 13:30:59, Info CSI 00000331 Repairing corrupted file "\??\C:\windows\System32"\"autoplay.dll" from store 2017-02-04 13:30:59, Info CSI 00000332 Repair results created: POQ 140 starts: 0: Move File: Source = "\SystemRoot\WinSxS\Temp\PendingRenames\e0b17dc6d17ed201983d0000f415f015._0000000000000000.cdf-ms", Destination = "\SystemRoot\WinSxS\FileMaps\_00000000000000 0.cdf-ms" 1: Move File: Source = "\SystemRoot\WinSxS\ Temp\PendingRenames\3a1480c6d17ed201993d0000f415f015.$$.cdf-ms", Destination = "\SystemRoot\WinSxS\FileMaps\$$.cdf-ms" 2: Move File: Source = "\SystemRoot\WinSxS\Temp\PendingRenames\a29d89c 6d17ed2019a3d0000f415f015. $$_system32_21f9a9c4a2f8b514.cdf-ms", Destination = "\SystemRoot\WinSxS\FileMaps\$$_system32_21f9a9c4a2f8b514.cdf-ms" 3: Hard Link File: Source = "\SystemRoot\WinSxS\amd64_microsoft-windows-autoplay_ 31bf3856ad364e35_6.1.7601.17514_none_04c88123045c625c \autoplay.dll", Destination = "\??\C:\windows\System32\autoplay.dll" POQ 140 ends. 2017-02-04 13:30:59, Info CSI 00000333 Repair complete

If it is not possible to fix the damaged system file automatically, we will have to fix it ourselves. The whole point of the operation comes down to replacing files existing on the computer with known good copies. They can be copied from another computer with a similar version of the Windows operating system and saved to some folder on your machine or to a flash drive.

However, the operating system will not allow you to simply replace files; you will first have to obtain the appropriate permission. This can be done in the graphical interface, as we have already written about. Here we will look at how this can be done using the command line. First we need to take ownership of the damaged file, let's run the following command.

Takeown /f full_path_to_the_file, for example takeown /f C:\windows\system32\autoplay.dll

A useful technique that simplifies this operation. Now let's give the administrators group full access to the problematic file. Let's use the icacls command. In Windows in English you need to replace “ADMINISTRATORS” with “ADMINISTRATORS”.

Icacls full_path_to_file /GRANT ADMINISTRATORS:F, for example icacls C:\windows\system32\autoplay.dll /GRANT ADMINISTRATORS:F

Now we can replace the old file with a new original one. This can be done either by using Windows Explorer or by continuing to work in the command line.

Copy full_path_to_the_new_file full_path_to_the_replaced_file copy D:\new\autoplay.dll C:\windows\system32\autoplay.dll

As a result of all the manipulations, we replaced the damaged system file manually. There is only one final touch left, to insure against possible problems in the future, we need to restore the previous owner of the object in the person of TrustedInstaller and regain our previous rights. Again this can be done using windows explorer or using the following commands:

Icacls C:\windows\system32\autoplay.dll /setowner "NT Service\TrustedInstaller" icacls C:\windows\system32\autoplay.dll /GRANT:r ADMINISTRATORS:RX

Where else can you get original system files?

Copying files from another computer is a fairly convenient and simple method, but you don’t always have another computer with a similar operating system at hand. In this case, you can use a windows distribution disk or a system recovery disk, if you made one.

The difficulty is that the information on them is stored in packed form in a file with the .wim extension and therefore you will have to work a little. In order not to mess around with the command line, we will use the free 7-zip archiver. If you don’t have it on your computer, you can download it here; you’ll probably find it useful for working with archives.

The system files we are interested in are located in an image file named install.wim in the sources folder, and the image may contain several different versions of the operating system in the corresponding folders, be careful. On the recovery disk, the file is named boot.wim.

If your computer won't boot

All of the above referred to the case when the computer could boot and we had the opportunity to perform the check directly in Windows. However, the damage to system files may be so severe that it will not be able to boot. In this case, you can check the Windows system files in the WinRE (Windows Recovery Environment) recovery environment. To do this, boot into the recovery environment, as described here, and launch the command line.

Sfc /scannow /OFFBOOTDIR=X:\ /OFFWINDIR=X:\windows

Here X needs to be replaced with the drive letter on which the OS we want to check is located. The difficulty is that the drive letters in Windows RE may not match the partition letters in Windows itself. To find them out, run the following commands sequentially.

Diskpart List disk Sel disk 0 Detail disk Exit

As a result, we get a list of volumes on the system disk and their corresponding labels. We will substitute the required label instead of X in the command to start scanning system files. However, you can find out the desired disk label in another way, by brute force.

Cd /d C: dir /b

Here we first went to drive C, and then displayed a list of files in this section, by which we can understand which drive it actually is. If you didn’t guess, then move on to the next letter and look at the list again.

Cd /d D: dir /b

Using the “scientific poke” method, sooner or later the system disk will be found. Suppose in the recovery environment the drive with windows has the letter G and we want to check the originality and, if necessary, automatically correct the file “C:\windows\System32\msconfig.exe”, then the command will take the following form:

Sfc /scanfile=G:\windows\System32\msconfig.exe /offbootdir=G:\ /offwindir=G:\windows

We looked at various ways to restore damaged system files in Windows in automatic and manual modes, including using the Windows Recovery Environment. With its help, you can troubleshoot computer problems caused by damaged operating system components.

beginpc.ru

Checking Windows system files for integrity

Why do you need to restore the integrity of Windows system files? Checking the integrity of Windows 10/8/7/XP is needed if you suspect that some of the system partitions have changed or become defective due to the influence of malware.

There are several tools to check the integrity of Windows 10 files. The most common is SFC.exe, DISM.exe is often used. You can also use the Repair-windowsImage function in PowerShell. We recommend using several methods, but one at a time. This is necessary because each option will check the integrity of different files. If you need to perform such a procedure, but do not know how to check the integrity of Windows 10 system files correctly in order to correct them and resume work, carefully read the recommendations below, follow the sequential steps, then you will be able to check and restore the integrity of Windows 10 system files and others versions.


Check the status of system files using Windows tools

Scanning with SCF

Many users use the sfc /scannow command to scan the operating system before restoring lost or damaged files in order to ensure their correct functioning, restore uninterrupted operation, and troubleshoot problems by restoring damaged components. It examines and corrects system partitions of the Windows 10 OS offline.


Check using the command line

  • To activate this command, first open CMD and start with administrator rights. You can activate the utility using the mouse by right-clicking on the main “Start” menu, then selecting “Command Prompt” from the list. In the dialog box, type sfc /scannow and press Enter.
  • A check will begin, defects will be identified, and then they will begin to correct without your intervention, assistance automatically, by the system itself. If no errors are found, you will be informed that no problems were detected by OS resource protection.
  • If you decide to check one specific system file, then specify scf /scanfile=”path to file” on the command line.
  • It should be noted that SCF is not able to correct errors in those partitions that are running at the time of scanning, so it is best to use SFC exclusively when running “Windows 10 Environment Recovery”.

Running SFC using the recovery environment

To properly activate SCF, follow the steps below in sequence.


After completing the above steps, a list of volumes will appear; you need to remember or write down those letters that correspond to the system partition and the “System Reserved” disk.

sfc / /scannow /offbootdir=bootloader partition letter:\ /offwindir=E:\windows (or your path to the windows 10 directory).

As a result, a scan should start checking the integrity of system files, and recovery will be available for all of them. Please note that the check will take quite a significant amount of time; you do not need to turn off or restart your computer during the entire procedure. The last step will need to be performed only when the scan is completed and you close the Command Prompt.

Scanning with DISM.exe

This utility is used to mount images, makes it possible to identify and correct problems that arise with OS partitions as a result of their damage, and perform restoration. It's great for sections that SFC couldn't handle. It can also be used if SFC was unable to detect any problems during scanning. Therefore, do not limit yourself to just one type of scanning and treatment of damaged areas; be sure to carry out this operation when working with system components.

The command line is also used to launch DISM.exe. Activate it as an administrator and then follow the steps:

  • dism /Online /Cleanup-Image /CheckHealth - this function provides information about what defects and damage to various components of Windows 10 are present. A deep check, however, is not performed; only previously found data is used.
  • dism /Online /Cleanup-Image /ScanHealth - scans for possible damage to the component storage. This check often requires quite a lot of time, periodically freezing during the implementation process (usually by 20%).
  • dism /Online /Cleanup-Image /RestoreHealth - a thorough inspection and reconstruction of system files in offline mode, restoration, which also takes a long time.

The utility will help detect and restore damaged files

All logs of actions when executing the above commands are written to the path windows\Logs\CBS\CBS.log, windows\Logs\DISM\dism.log

Similar to the previous utility, DISM is also launched through Windows 10 recovery mode.

Checking the integrity of system files in Windows 7/8 is identical to the same operation in 10. This is done in the same way - via the command line via SFC and the corresponding command. All actions are performed in the same sequence as described earlier. A similar algorithm is used to check the integrity of system files in Windows XP. The command line interpreter starts like this:

  • go to the Start menu;
  • click on the “Run” option;
  • In the dialog box, type the command “cmd”, then Enter on the keyboard.

As a result, a regular command line will open and you can perform all the steps to check OS files for defects.

All of these operations will help restore corrupted, damaged sections of any Windows-class operating system, which will solve the problem of malware interfering with the computer, restore its performance, and avoid extreme measures, such as a full system restore in case of operational problems. You do not need to reinstall the entire OS; it is enough to restore damaged components. Identify them using special commands and utilities, and your computer will continue to function.

NastroyVse.ru

How to perform a system file check in the Windows 7 operating system

As a result of some Windows 7 malfunctions and malware infections, there is a need to analyze the file integrity of the system. Also, files are often damaged due to improper shutdown of the PC and power surges. Therefore, every user of the “Seven” should be able to independently check and resuscitate system files on a computer with Windows 7.

File analysis method

The main tool for checking and analyzing their integrity in “Seven” is the “SFC.exe” application built into the OS, which can also restore defective files. Regular use of the command to perform the “sfc /scannow” scan will ensure the smooth operation of Windows 7. It is recommended to use it at least once every six months.

Analysis procedure

The built-in Windows 7 scan tool is launched as follows:

Note: Do not close the console until the procedure is complete. Upon completion, the results of the completed program will appear.

  1. Restart your computer;
  2. Ready. The system integrity check has been completed and the corrupted files have been fixed.

Sometimes it happens that an application cannot cope with fixing damaged files on its own. In such cases, it is recommended to perform analysis in safe mode, but even if this does not resolve the problem, you need to run: “findstr /c:” “%windir%\Logs\CBS\CBS.log >”%userprofile%\Desktop\sfc .txt".

After this, a “txt” file will appear on the Windows 7 desktop with a list of all files that the program is not able to resuscitate itself. The user needs to copy these files to himself from another computer, but with a working Windows 7, or from an external installation media with a distribution kit of the “Seven” modification that runs on the user’s PC.

Algorithm for restoring a damaged file manually

Now, knowing the exact name and location of the problematic file that the application could not fix automatically, you need to replace it. To this end, it is necessary to take the following sequential steps:


What if the SFC.exe application does not work at all?

It happens that the utility cannot even start. In such a situation, you should analyze the performance of the following applications:

  1. Remote Procedure Call Locator;
  2. Remote procedure call;
  3. Starting DCOM server processes.

If these programs are functioning normally, "SFC.exe" will start.

Also, the utility will not cope with its functions when the manual startup type of the recovery service is activated in the “Windows Module Installer” service.

Additional analysis methods via SFC

If you need, for example, to analyze the integrity of files on a remote OS or solve various other problems, then there are several of the following effective techniques:

  1. It is possible to carry out the check without the subsequent recovery process. To do this, using the algorithm of the instructions given above, you need to use the command “sfc /verifyonly”.
  2. If necessary, you can resuscitate only a specific file by typing in the console: “sfc /scanfile=Location”.
  3. In a situation where you need to analyze Windows installed on another logical partition of the hard drive, the command “sfc /scannow /offwindir=Windows directory location” will help.

Conclusion

Some users, at their own discretion, modify files, change icons in Explorer, and the like. After the application works to analyze and correct the integrity of the OS, all adjustments made will be canceled and will again take the default form. Therefore, such computer owners will need to perform all their system modification operations again after the utility has completed its work.

windowsTune.ru

Checking Windows 7 system files from the WinRE recovery environment

You've probably heard about such a useful utility as sfc. Being part of Windows, it allows you to check system files for discrepancies with the original version, which is very useful when the original system files have been replaced by a crooked installer, an evil virus, or a careless user. Of course, Windows Vista and Windows 7 have taken system security and the protection of your files to a new level and reduced the likelihood of system files being replaced. Reduced, but not eliminated, and it’s very difficult to protect yourself from the inquisitive mind and curiosity of the user.

Therefore, if, as a result of certain actions, your system refuses to boot, and you suspect (or even firmly believe) that the matter is that an important system file has been replaced by a damaged copy, you can check the integrity of system files using WinRE (windows Recovery Environment) , directly on the “fallen” system.

Running the sfc.exe utility from the Windows 7 recovery environment

1. Insert the Windows 7 installation disc into the DVD drive and boot from the DVD. Wait for this window to appear: Set the keyboard layout to "US" and click "Next".

2. In the next window, click "System Restore".

3. Now select the instance of Windows 7 that is damaged from the list and click “Next”. I have one.

4. Launch Command Prompt

To scan and repair one specific file, type sfc /scanfile=X:\windows\explorer.exe /offbootdir=X:\ /offwindir=X:\windows

Replace X: with the letter of the partition where your system is located.

To scan all operating system files completely, run the command sfc /scannow /offbootdir=X:\ /offwindir=X:\windows

You are not being deceived, the verification can really take some time, in my case it lasted about 7 minutes. Upon completion, the utility will display the path to the log of its work and tell you what it did with system files.

Winreview.ru can be found on Vkontakte, Facebook and Twitter. Join us!

winreview.ru

command SFC /SCANNOW - Checking system files in windows 7 - How to do this in windows 7?

1.png 47.21K 81 downloads

2.png 44.34K 51 downloads

When the sfc command is launched in Windows 7, the scan results are written to a LOG file in this file: C:\WINDOWS\LOGS\CBS\CBS.LOGWe are only interested in the lines in this file labeled . To filter out unnecessary lines, you need to open a command prompt as an administrator and insert the following command into it: findstr /c:"" %windir%\Logs\CBS\CBS.log >

3.png 200.96K 54 downloads

It is useful to view the logs and if you see in the scan results that the SFC command was unable to replace some system files, then you can try to do it manually.

Thank you, I completely forgot about this command, that it exists in Windows 7. I used it before, as soon as I installed the system, but then it completely slipped my mind. Now I ran the check, but thank God all the system files are in place. Now I’ll bookmark this topic so I don’t forget.

Very interesting and necessary information, I started checking it now, thank you for this topic on the forum about Windows 7.

How to restore system files in Windows 7

The sfc /scannow (System File Check) command scans all Windows 7 system files and, if it finds changed, damaged or missing files, replaces them with correct versions if possible.

How to run sfc /scannow command in Windows 7?

1) Launch the command line as administrator.

2)In the command line, enter the command sfc /scannow (see screenshot)

1.png 47.21K 81 downloads

3)When the check is completed, I hope that everything will be fine with your Windows 7 system files, just like mine in the screenshot I posted below:

2.png 44.34K 51 downloads

If you know that you have damaged system files, but sfc /scannow did not give any results, then try to restore to a time when you have intact system files. You may have to go through several restore points before you find the point where there were undamaged Windows 7.4 system files) Checking system files takes time (15-30 minutes). After the verification is complete, close the command prompt.

When the sfc command is launched in Windows 7, the scan results are written to a LOG file in this file: C:\WINDOWS\LOGS\CBS\CBS.LOGWe are only interested in the lines in this file labeled . To filter out unnecessary lines, you need to open the command line as an administrator, and insert the following command into it: findstr /c:"" %windir%\Logs\CBS\CBS.log >%userprofile%\Desktop\sfcdetails.txtAfter running this command, a text file named sfcdetails.txt will appear on your desktop, which will contain the results of scanning Windows 7 system files.

3.png 200.96K 54 downloads

It is useful to view the logs and if you see in the scan results that the SFC command was unable to replace some system files, then you can try to do it manually. Tell me how to replace system files manually

Installed Office Tab Enterprise 8.0 on Microsoft Office 2010 v14.0.4763. During the installation process and after installation and activation, it displays (when starting the program itself and any Office application) error 1907: The font cannot be registered. Checking and fixing system files did not help, what should I do? If in this program you uncheck the boxes for using it with Office applications, then the applications launch without problems. With uv. Victor.

Hello! The sfc / scannow command does not start for me. In the start menu, enter "cmd" in the search bar. I run the search result as an administrator and see, as in the first screen, as in the second screen, it doesn’t work. If I enter “sfc / scannow” and run the search result as an administrator, nothing appears. Just for a hundredth of a second, a window pops up and instantly disappears. Tell me the solution. Thank you!

Attached files

Tell me, if I have a third-party hard drive on which I need to check the integrity of the system, how can I do this? By the way, on the laptop to which this disk belonged, the system does not boot at all, as if it were not there, although yesterday everything was fine, the laptop’s battery just ran out and it turned off.

What kind of messages does it write when loading? At what stage does Windows 7 stop loading? Regarding the SFC command - no, it cannot check system files on another drive.

No user is immune from errors in the Windows 10 operating system. They can arise due to its purposeful or accidental interference with the operation of the OS, as well as due to the fault of third-party applications. If the operating system begins to complain about missing files, registry errors, or the inability to read items from the Windows folder, you will need to check the integrity of its components.

The Windows 10 operating system provides 2 methods for analyzing file integrity - through the SFC.exe and DISM.exe tools. The commands do not replace each other, but complement each other, checking various system libraries for file integrity. That is why it is recommended to do not one of them, but both. The tools will allow you to check the integrity of Windows 10 files and replace damaged or modified elements with original ones.

Important: If the computer user previously made reasonable changes to the system files of the operating system, they will be canceled. Windows tools will replace the changed items with the original ones, even if the problem with your computer or application is not caused by their actions.

How to check file integrity in Windows 10 using SFC

It is recommended to start checking the integrity of operating system files with the SFC command. It allows you to find errors in key files and fix them. You can perform a check using SFC either in the familiar Windows 10 interface via the command line or through the recovery environment; both of these methods are described below.

Via the command line in the Windows interface

It is better to start checking using SFC through the standard Windows interface using the command line. Most often this is enough. To check the integrity of the files you need to do the following:


If there are no problems with the Windows system files, after checking the user will see a message that “Windows Resource Protection did not detect an integrity violation.” In such a situation, you can proceed to checking files using DISM.

However, in some situations, files that are responsible for displaying the Windows graphical interface may not work correctly, and the system will not be able to fix them, since they are active. In such cases, it is necessary to check the SFC through a recovery environment that does not require loading a graphical interface and is capable of working with these files and also changing them if necessary.

Please note that if you suspect that the system failure is related to a specific file, you do not need to perform a full SFC check. Just enter the command sfc /scanfile=”address to file”, and it will be replaced instantly with the original version if changes were previously made to it or it works with an error.

Via recovery environment

To check the integrity of files using the SFC command through the recovery environment, you will need to perform the following steps:

Click on the Start button in the lower left corner and go to Settings:


diskpart list volume

After executing the second command, a list of available volumes will be displayed. Here you need to pay attention to the disk that is reserved by the system and to the system partition with the operating system. Next, you will need to manipulate them.

Continue typing the commands:

Exit sfc /scannow /offbootdir=C:\ /offwindir=E:\Windows

The last command requires you to specify the drives that were noted above. That is, in the example command, drive C is the partition with the bootloader, and drive E is the place where the Windows 10 operating system is installed.

Attention: There is a high chance that your drive letters will differ from those given in the example, so the command will vary.

  1. After entering the last of the four commands, an integrity scan of the operating system files will begin.

The advantage of working through the recovery environment is the ability of the SFC tool to replace the files that are needed to boot the Windows GUI. The check in this case will take a little longer than when working through the command line in the operating system interface. In this case, the command line in the recovery environment will not graphically notify the user about the speed of the process. You can determine that the computer is working properly and the file integrity check has not frozen by the blinking underscore icon.

At the end of the scan, the user will see information that no integrity violations were detected or were successfully resolved. After this, you can move on to the second verification method - using the DISM tool.

How to check file integrity in Windows 10 using DISM

As noted above, after checking using SFC, it is recommended to start analyzing the system with the DISM tool. During the scan, it will examine other directories (and will once again “go through” the files that were scanned by SFC).

Scanning with the DISM tool is slightly different from analyzing the system using SFC. The user has the opportunity to select one of three commands to check the system. Each of them has a different level of impact.

Dism /Online /Cleanup-Image /CheckHealth

When executing this command, the system checks the records made by diagnostic utilities to detect changed or problematic files in the system. The command is executed quickly, but there is no verification, and all data is based on previously recorded information.

Dism /Online /Cleanup-Image /ScanHealth

This command is aimed at analyzing all system components to identify errors and damaged elements in them. In this case, only a check is carried out, and the user is notified of the presence or absence of problematic files. Such a scan can take from several minutes to several hours, depending on the speed of the hard drive, its load and the degree of interference with the operating system files.

Dism /Online /Cleanup-Image /RestoreHealth

This command, unlike the previous one, not only checks the files, but also immediately replaces them with intact ones. It will also take from several minutes to several hours to complete.

Important: Please note that the last two commands that run the Windows 10 file integrity check may freeze at a certain percentage during execution (usually around 20). In no case should you reboot the system at this moment, since this situation is typical, and interest will continue to “drip” after some time.

Read the article about how to check Windows system files. Why check integrity, how to restore in Windows 10, 8, 7 and XP.

Users are advised to periodically check system files for integrity. Almost no one does this, which leads to the need to reinstall the operating system. It is necessary to carry out a check in cases where system folders have been exposed to malware or crashes due to improper shutdown of the PC. Windows system files are checked using different tools. In most cases, you don’t even have to install additional programs - you can handle it using standard tools. Utilities will be needed to restore the system if you do not have backup copies of yours.

Checking the integrity of Windows system files using SFC

You can run System File Check on any version of Windows, starting with XP. All you have to do is go to the command line. In most versions of Windows, this can be done using the menu. "Start". In the eighth version of the OS, to call the command line as an administrator, you need to call the context menu using the keyboard shortcut Win + X, and then select the desired item from the list.

  1. Enter the command sfc /scannow.
  2. Press Enter.
  3. Wait until the scan is completed and evaluate the result.

The team will independently attempt to correct minor errors. This is the easiest way to work with system files. The advantage of SFC is that it has additional features and is easy to use.

Please note that this utility will always find errors in custom builds of Windows. This is due to the fact that builders often change the appearance of the system. Therefore, before restoring a working system, consider whether it is worth doing this. It is recommended to rollback to a checkpoint or replace files only if you notice critical errors, a virus attack, or other problems.

Additional SFC Features

The built-in SFC utility can be launched with several parameters. In addition to checking Windows, you can:

  1. If you do not want to fix errors in system files, then enter the command sfc /verifyonly.
  2. If you know exactly which system file is damaged by the virus, then you can tell which one: sfc /scanfile=path_to_file. If you replace the word scanfile with verifyonly, only the specific file will be checked, the system will not restore it.
  3. If you want to check files not in the current folder, but on a remote computer or other hard drive, then you need to enter a command in the following form: sfc /scannow /offwindir=path_to_windows_folder.

Most often, these features are used by system administrators. For ordinary users, a basic command is enough.

Possible problems

If you were unable to restore files using standard methods, you can do this manually using a system disk image. You can edit a virtual disk with system files using the UltraISO utility or similar programs. System recovery occurs according to the following algorithm:

  1. Go to the folder with the image files. By default, LiveDisk uses /cdrom.
  2. From there, copy the files you need to your clipboard and then move them to win.

This method is good because the utility removes all file system restrictions that are imposed by the Windows system. You can work with system components, move them, replace them with new ones.

Manual recovery is good for advanced users. For those who are not confident in handling a computer, it is best to use utilities that work in automatic mode. There are also programs that can make working with built-in services easier.

Microsoft DaRT

This is not just a utility, but a boot disk that can cope with the task of restoring system files. Set up boot disk before starting your PC and insert the boot disk. You can download Microsoft DaRT, and then use Nero software to burn it to media. System files are checked and restored according to the instructions:

  1. Select a utility from the boot disk menu to check your version of the system.
  2. From the actions presented in the next menu, stop at the “Diagnostics” item.
  3. Then you need to select the item Diagnostics and Recovery Toolset.
  4. After preliminary setup, all that remains is to select the target operating system. Most users have only one.
  5. The menu will offer you several options for working with your hard drive and system; you need to select “System File Checker”.
  6. Next, follow the prompts of the verification wizard. Select automatic operating mode,

The utility will do the rest for you. After it works, all that remains is to restart the PC. The advantage of this utility is that it can be used even when the Windows operating system is not working.

Windows Repair

This utility starts from the working environment. You need to work according to the instructions:

  1. Go to the Pre-Repair Steps section.
  2. Select the Step 4 (Optional) tab.
  3. Click the Check button.

This utility is simple - you don't need to do any additional steps. It is suitable for inexperienced users who do not have command line skills. It runs the standard SFC utility from its shell.

Glary Utilities

Glary Utilities works similarly to the previous one - it is as simple and understandable as possible. It doesn't have a lot of tabs. The advantage of this program is that it is Russified. All commands are clear to users. Through it you can not only check, but also restore the system.

Follow the instructions:

  1. Go to the "Modules" tab.
  2. In the left side menu, select “Service”.
  3. On the right side of the window, click "System Files Recovery".

The work of this simple utility is also based on interaction with the console SFC. If you cannot restore the files, you will have to use more complex means - through a boot disk or copying damaged files manually.


Restoring system files in Windows 7 or Windows 8/8.1 is an interesting topic. Especially if the operating system starts to fail, but we don’t have a recovery image and we forgot to turn on system protection so that recovery points can be created. In this case, we will not be able to restore the system from the image, we will not be able to roll back Windows to the created restore point, and we are also too lazy to reinstall the system, since this will take the whole day. And right here we have another chance to return Windows to normal - try to restore system files. In this article I will try to fully cover the topic so that we can revive our computer in any situation.

1. Recovering system files on a busy system

If our computer somehow turns on, then we do the following. (if it does not turn on, see section 2 of this article)

Open the Start menu. In the search field we write “Com”. On the element " Command line"Right-click and select " Run as administrator»

In the command line that opens we write

sfc /scannow

We wait a little

If your system is ok, you will see the following image

If your Windows was broken, you will see the following

System files were successfully restored. We reboot and immediately turn on system protection to create restore points so that next time we can simply roll back the state of the computer to a couple of days ago and that’s it.

It happens that when scanning the system, the sfc.exe utility found damaged files, but could not fix them. In this case, I would restore system files in Safe Mode. If the same thing happens in safe mode, read the last paragraph 4 of this article.

If your computer does not boot at all, as discussed at the very beginning of the article, then read the next paragraph.

If our computer does not want to boot at all, then we use the recovery environment. You can load into it:

  1. Pressed when turning on the computer F8 several times
  2. Booting from a boot (installation) disk or flash drive

The first option will work if we have a boot partition that the system created when partitioning the disk when we installed the system. Boot partition size:

  • Windows 7 - 100 MB.
  • Windows 8 - 350 MB.

In any case, try pressing F8 several times during boot. A window should appear with additional download options. Choose Troubleshooting computer problems.

In the next window, select the keyboard input method. Select the language in which you have set the administrator password (if there is no password, you can immediately click Next >).

Select a user with administrative rights and enter a password if you have one. If there is no password, just click OK.

Select the command line.

If you are unable to enter the recovery environment using the F8 key, you will need to boot from the installation (bootable) flash drive or disk. You can boot from disk in the same way. Only in this case you need to put the DVD-RW (optical disc reader) first in the boot priority.

I like to boot from removable media using the boot menu. On ASUS motherboards it is usually also called by the key F8.

After booting from a flash drive or disk, I saw the following picture. I choose Windows Setup- Windows installation.

We wait until all installed Windows are found.

We choose the one that does not turn on for us. And here CAREFULLY! We remember the letter that the recovery environment assigned to your system (in the Folder column). I have this D.

Select Command Line.

Enter the command

sfc /scannow /offbootdir=D:\ /offwindir=D:\windows

Instead of D, you substitute your letter. Press Enter and wait for the scan to complete

The virtual machine from which the screenshot above was taken had a blue screen, so I was not surprised that system files were found and restored.

3. How to find out the drive letter with Windows installed

If you succeed using the key F8 call up the “Advanced boot options” window and select “Troubleshoot computer problems”, then we need to find out the drive letter where Windows is installed that was assigned by the recovery environment. This can be done in two ways

1. Call the notepad with the command

Open menu in notepad File and choose Open…

Left click Computer and in front of you there will be disks with letters.

You can go to the disk and make sure what and where.

2. Use the utility DISKPART

On the command line enter:

diskpart- call the utility for working with disks.

list disk- look through the list of disks.

select disk- I select the hard drive I need.

detail disk- I call up information about this disk.

4. For Windows 8/8.1

If the sfc utility was unable to restore damaged system files, then you need to try to restore the storage of these system files. The place where copies of working system files should be located. As I understand it, it is located at C:\Windows\WinSxS. That is, we must first fix the file storage, and then use the “SFC / Scannow” command to restore Windows system files.

4.1. Recovering storage using Windows Update

1. Launch Windows PowerShell with administrator rights. To do this, open the Start menu or home screen and click on the “Search” icon. In the search box we write “PowerShell”. Right-click on “Windows PowerShell” and select “Run as administrator” or “Run as administrator”.

2. In the window that opens, write

Dism /Online /Cleanup-Image /RestoreHealth

and wait. If the storage is intact or it was restored using Windows Update, you will see the following picture.

If Image Health State: Healthy - everything is fine. Reboot the computer and try SFC /SCANNOW again.

4.2. Restoring storage using an image

If we have problems with Windows Update, then this method will do.

1. Download the original Windows 8/8.1 image of the same bitness as your system. How to find out the bit depth of the installed system - .

2. Connect or mount the downloaded image. Right-click on the image and select “Connect” or “Mount”.

3. In the command line with administrator rights, we look at what editions there are in the image with the command

Dism /Get-WimInfo /WimFile:F:\sources\install.wim

I have 2 editions in my image. It’s hard to understand which one I need based on these distinctive signs. Let's use the first one. If it doesn’t work, the second one.

4. Launch Windows PowerShell with administrator rights and set the command

Repair-WindowsImage -Online -RestoreHealth -Source F:\sources\install.wim:1

where F is the drive letter to which we connected the image, 1 is the Windows edition number in the image.

5. Recovering system files manually

If using the sfc utility it was not possible to recover damaged files, you need to try to do it manually. In this case, you need to additionally run the command

findstr /c:"" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

Findstr/c: ""%Windir%\Logs\CBS\cbs.log>sfcdetails.txt

and carefully study the file sfcdetails.txt on your desktop or %windir%\Logs\CBS\.

It should be something similar to the picture below.

After the name of the damaged file is known (Accessibility.dll), we look for it on another computer with the same system as yours. If this is not an option, then I would download the original Windows image and install it on the virtual machine. I found the file I needed and copied it to a bootable or installation flash drive. Then, from this installation flash drive, I booted into the recovery environment and launched the command line. From the command line I would open notepad. I opened the menu File > Open - and now I have an almost full-fledged explorer. We copy and replace the working file from the flash drive, reboot and everything should work.

If the option of installing a virtual machine does not suit you, then you can include the install.wim file in the folder. Then go to this folder and copy the necessary files.

1. Create a folder. For example, "Win8.1Pro" in the root of drive D.

2. Copy the install.wim file to the root of drive D.

3. Mount the install.wim file into the created folder.

Dism /Mount-Wim /Index:1 /WimFile:D:\install.wim /MountDir:D:\Win8.1Pro

Go to the created folder and copy the necessary files.

Disable the image

Dism /Unmount-Wim /MountDir:D:\Win8.1Pro /Discard