How to check the integrity of Windows system files and why do it at all. How to check the integrity of Windows system files and why do it at all Checking and restoring Windows 10 files

If you encounter errors in applications or work operating system(especially in tasks related to writing or reading information on a disk), then there is a high probability that the disk contains various annoying errors. They may occur due to improper shutdown (system crash or sudden power outage), physical damage to the disk (shocks, drops, vibration, etc.), improper operation, or too long a period of use. In this case, it is recommended to check the disk for errors. The check may not fix the problem itself, but it will help you navigate the diagnosis of the problem and move in the right direction in trying to return your computer to working condition.

Note: All actions in this instruction are performed on behalf of the Administrator. If your Account does not have the appropriate rights, you will need a password for the Administrator profile.

How to check a disk for errors in Windows 10 via Command Line

You need to run the utility chkdsk. It can check the disk for errors and fix them if necessary. The same procedure starts automatically along with Windows if the system itself detects problems with the partition. You can initiate the scan manually if necessary.

note: team chkdsk Only supports drives formatted in NTFS or FAT32 format. ReFS does not need to be checked at all, since it file system has its own integrity checking mechanisms.

Please note again: If the system is currently using a disk that is being scanned, errors will not be corrected. In this case, Windows will prompt you to schedule an automatic fix after the next reboot.

If Windows finds errors but can't fix them, try using the Check Disk command offline. In this case, the system disables access to the disk for other programs and tries to correct its operation. After the procedure is completed, the disk is activated again and applications will be able to read and write information to it. To check offline on the command line you need to use the command chkdskX:/f/OfflineScanAndFix. In this case X: is the disk that needs to be checked.

To display additional arguments for chkdsk(more steps), enter chkdsk /? . Command Prompt will display a list of available commands.

How to run disk diagnostics in Windows 10

Another option is to use a storage diagnostic utility. In the command line running as Administrator, enter the following command:

stordiag.exe -collectEtw -checkfsconsistency -out X:\XXXX.

Instead of X:\XXXX Enter the location where the system will save the scan results. Please note that after this Windows commands will check all connected drives, so the process may take a little longer. Just be patient and wait for the message that the drive diagnostics have completed successfully.

It must be said that this method only collects information about the status and is unlikely to help the average user fix problems with the disk. However, for a specialist, the collected information can provide a lot of useful information. The diagnostic utility collects information about the results of the test chkdsk and any errors detected, registry files associated with the drives, and the Windows Event Viewer log.

How to Check Hard Drive Errors Using PowerShell

A more modern PowerShell utility uses a separate command to run disk error checking.


When checking a disk for errors, you may need a command that will disable communication between the drive and applications (offline mode), which is why programs will not be able to write information to it. The team is responsible for this procedure Repair-Volume-DriveLetterC-OfflineScanAndFix. Again, instead WITH you must enter the letter of the drive you need.

Checking disk errors in Windows 10 through Explorer

If Command Prompt and PowerShell are not suitable for you, you can use more in a simple way check the disk for errors. IN Windows Explorer All the necessary mechanisms are already built in with a friendly user interface.


How to check a disk for errors through the Control Panel

In Classic Control Panel Windows yet for a long time You'll find options and tools that aren't found in the more modern Settings app. Checking the disk status is one of them.


If, after checking and correcting errors, you continue to observe problems with your computer, then it makes sense to think about troubleshooting elsewhere, or try to replace the media with another one.

As the owner of a computer with Windows 10, you have repeatedly witnessed that the “ten”, although it is constantly being improved, is a rather crude operating system, and a lot of problems arise in it. Developers solve only the most common problems by introducing fixes into service packs or releasing emergency patches (fixes) to get rid of a specific error. So, for example, it happened with When special cases arose relating only to a computer with a certain hardware or software, Microsoft offers an integrated troubleshooting tool.

Launching the Problem Determination Tool

Diagnostics of a computer with Windows 10 begins with launching a tool that contains a lot of tools designed to find and correct errors that have arisen on a PC.

Note that Windows 10 includes about 20 tools designed to identify problems and then fix them.

The tools are launched through the “Control Panel”.

  • Go to the “Control Panel”.
  • Switch the element visualization type to “Categories”.
  • We launch the “Troubleshooting” applet to open a window with a list of applications for troubleshooting your computer and fixing them.

The principle of operation of any component is as follows: it checks the current system settings and compares them with the default settings. If inconsistencies are detected, the user is notified about this and is asked to return Windows settings 10v the initial state or somehow change automatically to fix the problem. This is how Microsoft diagnoses and fixes problems with running software.

Composition of problem identification tools

The conflict resolution tools are divided into several categories, many of which also include subcategories.

  • Programs – This tool is used to run applications that are experiencing incompatibility issues when launching.

After starting the search for problems, the utility will scan the system and display a list of applications installed on it. In the window you need to select problematic program and click “Next” to run diagnostics to identify the source of the conflict.

  • Hardware and sound – using the tools located in this category, the equipment used on a computer with Windows 10 is diagnosed.

The funds include:

  • device configuration – detection of difficulties in the operation or configuration of a specific computer hardware component;
  • sound – used when problems occur during playback/recording of sound or conversations on Skype and similar programs for Windows 10;
  • network – diagnostics of operation and configuration of networks, including wireless, and network devices;
  • printer – getting rid of conflicts that arise during the printing process;
  • Windows Media – search for reasons that cause problems with playing videos and DVDs;
  • video playback – identifying reasons that prevent video files from being played;
  • background transfer service - diagnose problems that prevent files from downloading in the background;
  • Apps from the store - identifying factors that prevent apps from the Windows Store from functioning properly.

As you can see, the set of tools for identifying problems and returning your computer to normal operation in Windows 10 is large. Another question is their effectiveness. But here the entire responsibility lies on the shoulders of developers with more than 20 years of experience in creating operating systems.

In any case, these tools have more than once saved beginners from performing full reset or completely reinstall it.

For ease of search required application All tools can be displayed in one window without sorting by category. The “View all categories” button is responsible for this.

Working with tools

To use diagnostic tools, absolutely nothing is required from the user. The operation of each element is accompanied by the launch of a wizard window with tips, a couple of buttons and the presence of switches (checkbox, checkbox).

The only thing you should do after identifying the problem is to apply the recommended fix for it.

Be careful, the application will require administrator privileges to change some settings. Such functions are distinguished by the presence of a blue and yellow shield icon.

New opportunities

Windows 10 has new features for identifying and correcting problems in its functioning, which make it possible to detect a problem before the computer starts (in preboot mode).

To open a menu with a list of available tools, restart the computer while holding down the Shift key. After the reboot, on the action selection screen, click “Troubleshooting”.

There are two options available here: returning the PC to its original state (reset Windows 10) and additional options.

In the additional parameters there are tools that allow you to restore the functionality of Windows 10 by:

  • rollback to the previous state;
  • using a system image;
  • return to the previous build;
  • launching tools for restoring downloads of the “tens”;
  • taking advantage of opportunities command line.

As you can see, Windows 10 is distinguished not only by the presence of errors and problems, but also by a set of tools for eliminating them and returning the computer to a working state, sometimes without requiring virtually any activity or knowledge from the user.

(Visited 26,077 times, 1 visits today)

Doesn't work correctly, you can use the SFC command line utility to recover damaged or lost system files.

When you start noticing random errors, system boot problems, or performance issues Windows components, then there is a high probability that this condition is caused by damaged or lost system files.

Even though Windows 10 does a great job of protecting files that are essential for your computer to function properly, some apps, drivers, or even Windows updates may cause loss of system stability. Like previous versions of Microsoft systems, Windows 10 includes a System File Checker ( System File Checker (SFC) is a compact but powerful command line utility that can perform a system integrity scan and replace damaged or missing files with the original version.

IN this manual we will present the steps to use System File Checker (SFC) to automatic recovery damaged system files while the operating system is running. We will also consider how to run the utility in Safe Mode command line and how to manually repair damaged system files that are causing problems.

Warning: Before you start using the SFC utility, it is recommended that you make a full backup of your system or create a system restore point. In case something goes wrong, you can return the system to its original state.

The following command allows you to perform a full scan of protected files on your computer and fix files that are causing problems while running Windows 10.

Command line

Sfc /scannow

3. Once the scan is complete, you will see one of the following messages:

  • Protection Windows resources did not detect any integrity violations. This means that there are no damaged or lost files found on the system.
  • Windows Resource Protection cannot perform the requested operation. This message means that an error occurred during scanning and you need to scan offline.
  • Windows Resource Protection detected corrupted files and successfully restored them. See CBS.Log WinDir%\Logs\CBS\CBS.log for information. This message appears when SFC was able to correct the problem. You can view the magazine for detailed information.
  • Windows Resource Protection has detected corrupted files, but is unable to repair some of them. See CBS.Log %WinDir%\Logs\CBS\CBS.log for information. In this case, you need to manually fix the damaged files.
Advice: To correct all problems, you may need to go through the integrity check procedure about three times.

To view information about the operation of the integrity checker in the CBS.Log file, you need to create a readable copy of the file on your desktop:

1. Search for Start menu Command line, right-click on the link that appears and select Run as administrator.

2. Type the following command and press Enter

Findstr /c:"" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfclogs.txt"

3. Open the sfclogs.txt file located on your desktop using Notepad. The file will contain detailed information about system scans and files that could not be recovered.

Note: detailed information is available only when performing a scan in Windows 10, but not when running the utility in Safe Mode in the Command Prompt.

Sometimes protected system files that need to be restored are already loaded into RAM during Windows works 10. In this case, you can use the System File Checker during system startup to correct the detected problems.

  • 1. Use a keyboard Windows combination+ I to open the Settings app.
  • 2. Select the “Update and Security” section.
  • 3. From the menu, select the “Recovery” option.
  • 4. In the “Special Boot Options” section, click the “Restart Now” button.

  • 5. Select “Troubleshooting”.
  • 6. Go to “Advanced Settings”.
  • 7. Click “Command Prompt” to boot your computer into command line mode.


  • 8. After rebooting, you will need to enter your username and password.
  • 9. You need to tell SFC where the Windows installation files are located. At the Command Prompt, enter the following command to recognize the location of Windows 10 files and system reserved partitions:

  • 10. Type the following command and press Enter:
sfc /scannow /offbootdir=C:\ /offwindir=D:\Windows

Note that the example uses the /offboodir switch to specify the drive letter of the system-reserved partition. In this case, this is drive C, and the /offwindir switch specifies the path to the Windows files, which in our case is D:\Windows.

You need to remember that when you boot your computer in command line mode, the drive letters may be different, so you need to use the command specified in step 9. However, in most cases when working with Windows 10, drive D is used for installation, and drive C is reserved system partition(System Reserved partition).

  • 11. After scanning is completed, close the command prompt.
  • 12. Click “Continue” to exit and boot into Windows 10 as usual.

How to manually restore system files in Windows 10

If System File Checker fails to fix one or more files, you will have to restore them manually.

Open the sfclogs.txt file to determine which files were corrupted. Do a regular search to find file locations, or use search engine for more information. Then follow the instructions below to replace the damaged files.

Advice: You may be able to find working versions of system files on another computer that has the same version of the operating system as the original computer.

  • 1. Search for Start menu Command line, right-click on the link that appears and select Run as administrator because device administrator rights are required to run SFC.
  • 2. At the Command Prompt, type the following command and press Enter:
takeown /f C:\Path-and-File-Name

Note: Replace C:\Path-and-File-Name with the path of the damaged file. For example:

C:\Windows\System32\appraiser.dll

  • 3. Allow full access(administrator access) to the damaged files using the following command and pressing Enter.
icacls C:\Path-and-File-Name /Grant Administrators:F
  • 4. Replace the problematic file with a working copy, enter the following command and press Enter:
copy C:\Path-SOURCE-and-File-Name C:\Path-DESTINATION-and-File-Name

Note: Replace C:\Path-SOURCE-and-File-Name with the path and name of the working version of the file, and C:\Path-DESTINATION-and-File-Name should be replaced with the path and name of the damaged file. For example:

Copy D:\Files\appraiser.dll C:\Windows\System32\appraiser.dll

  • 5. Type “Yes” and press Enter to confirm the overwrite.

After replacing the file, you can enter the SFC /verifyonly command and press Enter at the Command Prompt to verify the integrity of all system files to ensure that the problem has been resolved. Additionally, if only some files have been corrected, you can verify the integrity of each individual file using the command sfc /VERIFYFILE=C:\Path-and-File-Name . For example:

Sfc /VERIFYFILE=C:\Windows\System32\kernel32.dll

Keep in mind that System File Checker can be used not only in Windows 10, but also in previous versions operating system. However, depending on the OS version, some features may differ. At the Command Prompt, enter the command sfc /? to view all available options.

Remember how Windows 10 flew after clean install- pure pleasure: quick start, normal operation in multitasking mode. Over time, the speed of executing user requests decreases. This is a long and imperceptible process, but at one point you realize that the “ten” is very slow. There are two ways to solve the problem - demolish the system and install it again, or find and fix errors.

It is unwise to reinstall the system if any problems occur, so let's still figure out how to check Windows 10 for errors. And you will always have time to demolish and reinstall the “top ten” - if only you had the distribution kit at hand.

Registry check

Due to the frequent installation and uninstallation of programs, unnecessary information accumulates in the registry - this is one of the main, but not the only, causes of errors. The registry is especially bad after incorrect uninstallation of a program, when instead of a full uninstallation the user erases the folder with files. In this case, there are many empty keys left in the registry. To fix these errors, use the built-in registry scanning tools:

  1. Launch Command Prompt with administrator privileges.
  2. Execute " scanreg /fix».

The disadvantage of the built-in utility is that many registry faults remain untouched after scanning. To eliminate them, you must use programs from third party developers- For example, . This utility can quickly detect and correct errors without touching anything unnecessary.

To check and troubleshoot:


The registry is cleaned in the same way. Glary Utilities And Wise Registry Cleaner. Even if errors are not visually noticeable, it is recommended to check periodically - at least once every 2-3 months. This will ensure Windows runs smoothly and allows you to fix problems before they significantly affect your computer's performance.

Integrity scan

System files have one unpleasant property - they are constantly damaged, changed and lost. Depending on the user’s experience, these processes occur more often or less frequently, but no one is immune from them. Therefore, you need to remember the command to scan the system for integrity as well as your own name.

To get started, you can use the standard utility SFC, which conducts a superficial analysis.

The utility will immediately correct any detected errors. But wait, rejoice - this is only a diagnostic analysis, it does not solve problems with files that are used by the system in this moment. If the “ten” has been brought to such a state that programs are launched with a clearly audible creak, then to correct errors a stronger tool is required - a utility DISM. A message with text like “Damaged files were detected that the program could not recover” will tell you this unobtrusively.

Using the DISM utility

If SFC can be launched without preparation, then DISM requires more careful attention.
Before running the verification utility:

To check the operating mode hard drive, right-click on “Start” and go to “Power Options”. Open the settings of the scheme you are using.

You need additional power settings, among which there is a sub-item “ HDD" Set a longer time value for it - at least 30 minutes for operation on mains and battery power.

After completing the preparation, you can start correcting errors:

  1. Run the command “DISM.exe /Online /Cleanup-image /ScanHealth”.
  2. Wait until the scan completes without taking any action.

The scanning will freeze at 20% - this is normal, don’t worry. After 10-15 minutes, the analysis will be completed and you will receive a message indicating that the component store can be restored. To perform the restore, enter the following command – “ DISM.exe /Online /Cleanup-image /RestoreHealth».

The recovery will also freeze at 20% and take about 15 minutes. Once the process completes successfully, a message will appear indicating that everything is ok. But this does not always happen - in difficult cases, DISM reports that the source files could not be found. In this case, there are two ways - try to restore individual files from a previously saved clean Windows image 10 or reinstall ten.

But the problem may not only be in the system, but also on the hard drive. Therefore, it should also be checked - using built-in utilities and programs from third-party developers.

Hard drive health analysis

If a HDD is installed on your computer, then for normal operation of the system it is necessary to periodically defragment the disk. Owners of SSD drives are exempt from such work due to the nature of the technology. On HDD data are written in the form of fragments on sectors that can be damaged during disk operation. To prohibit hard drive to Work with damaged sectors and organize information, you need to perform defragmentation.

This can be done in different ways.

  1. Open Computer.
  2. Right-click on the drive and go to its properties.
  3. Go to the Tools tab and click Optimize.
  4. Select one section and click “Optimize”.

The procedure takes quite a long time, so it is recommended to run it overnight. After defragmenting one partition is complete, run error correction on another - and so on until you have fully optimized the drive.

If you want to know state of hard disk, click the “Check” button in its properties on the “Service” tab. To view the test result:

  1. Open Security and Maintenance Center (search for it using the built-in Windows search).
  2. Expand the Maintenance section.
  3. View the result of the last check.

If you need to fix errors in work hard disk without restoring the sector order, use the command line.

  1. Launch Command Prompt with administrator rights.
  2. Run the command “chkdsk C: /F /R”, where C is the drive, F is troubleshooting, and R is recovering data from bad sectors.

If the disk partition is currently in use, you will be notified that it cannot be scanned. There are two options - restart the computer and scan the partition in use, or cancel the scan and scan another volume. You can choose any path, just remember to check all drives.

Instead of the command line for hard checks disk you can use Power Shell. This is a more powerful utility that can quickly perform actions that are impossible from the command line. For example, when using Power Shell, there is no need to reboot to scan the partition in use.

  1. Launch Power Shell with administrator rights.
  2. Execute "Repair-Volume -DriveLetter C".

Once the scan is complete, check other partitions and drives by replacing the letter "C" in the syntax. If the message is "NoErrorsFound", then no errors were found.

Checking RAM

The hard drive is fine, all that remains is to check the RAM - what if all the problems were caused by it? To do this, we use the built-in checker Windows memory. That’s what it’s called – you can easily find the utility through the search. After launching the utility, you will be prompted to reboot and check. Quit all programs and agree to this operating procedure.

After the reboot (which will take a little longer), the scan will start. You can press the F1 button and change its parameters - for example, set a wide scan type with multiple passes to increase efficiency.

After the scan is completed, the computer will reboot. When the system starts, a notification will appear with the results of the scan. If there is no information, look at Windows events:

  1. Search for the Event Viewer tool through Windows Search.
  2. Expand the Windows Logs - System section.
  3. Find MemoryDiagnostics-Results and see the result.

If there are problems with RAM more serious than you expected, use the program to check Memtest 86+. On the website memtest.org you will find a kit for creating an installation flash drive. The scan starts automatically after booting from the created installation media.

It is recommended to check memory modules one at a time. We left one bar, checked for errors, installed the next one - this approach allows us to identify the faulty module. If the program has detected many errors on one board, and they greatly interfere with the operation of the computer, then it is easier to replace the board, although in some cases cleaning the contacts helps.

Is it possible to do without checks?

You don’t have to check Windows 10 for errors, but there will definitely come a time when so many of them accumulate that the only solution is to reinstall the system. There is nothing terrible in the fact of reinstallation, given the possibilities of creating backup copy data. But unnecessary work can be avoided if you monitor the condition of the system and troubleshoot problems in a timely manner - especially since there is nothing complicated about this, as it becomes clear after a detailed study of the issue.