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

The Windows operating system is in many ways similar to a living organism, which means that sometimes even the smallest damage or deletion of one or more of its files can lead to certain problems. The cause of damage can be the actions of viruses, malfunctions software, a sudden power outage, errors when editing system libraries, and so on.

As a result, the user may encounter various errors when launching programs or the inability to install them, problems with system settings and even blue screens of death. Therefore, when diagnosing problems, the first step is usually to perform a system integrity check. Windows files 7/10. At the moment, there are two main methods of verification and recovery system files- using standard utilities SFC And DISM, run through the command line or the PowerShell console.

The second tool is more powerful and is usually used when the SFC is unable to cope with the task or its launch fails. There are also designed for this purpose third party programs, but for the most part they duplicate the functionality of SFC and DISM, providing more convenient access to them through the use of a graphical interface. In critical cases, when neither SFC nor DISM help, restore the system or its individual components using a pre-created backup.

Using SFCs

SFC utility or otherwise System File Checker present in all Windows versions, since 2000, and is intended for checking the status and restoring system files. SFC can take several arguments, but in this case we are only interested in one. Checking and restoring Windows 7/10 system files with its help is performed as follows. Launch a command prompt or PowerShell console as an administrator and run the following command:

sfc /scannow

The verification process will take some time. If errors are found upon completion, the utility will offer to repair damaged files during the computer restart. If SFC writes that it cannot recover files, make sure that you have EFS and Bitlocker encryption disabled, boot into safe mode, and then repeat the scanning procedure.

To ensure maximum access to the file system, the procedure for repairing corrupted Windows system files can be performed in a bootable environment. There are several ways to get into the recovery environment, but we offer the most universal one. Boot the computer from the Windows installation disc, and when the installation wizard window appears on the screen, click Shift+F10. Since the drive letters are different in the boot environment, you need to determine the drive letter system partition. We execute the following commands:

diskpart
list volume

On MBR disks, the system partition will most likely have the letter D, and the “System Reserved” partition will have the letter C. Knowing the letter labels of the volumes, close Diskpart with the exit command and perform a check:

sfc /scannow /offbootdir=C:/ /offwindir=D:/

Once the scan is complete, Windows will restart normally.

DISM utility

How to check the integrity of Windows 7/10 system files if the method described above does not help or different errors are generated when executing commands? In this case, you can try to resort to a more powerful tool - the utility DISM. Open a command prompt with administrator rights and run the following command:

dism.exe /online /cleanup-image /scanhealth

If the utility reports that the component store is recoverable, restore it with the following command:

dism.exe /online /cleanup-image /restorehealth

If you get errors while running the commands, try repairing the component store using elevated PowerShell by running the Repair-WindowsImage -Online -RestoreHealth command while your computer is connected to the internet.

After the procedures done, you can check sfc /scannow and see if the errors will be repeated. If yes, check if you have the "Windows Modules Installer" service enabled, but in general, it is advisable to do this in advance.

Restoring corrupted files manually

This method is used when it is impossible to recover corrupted SFC files, but in any case, you will need exactly the same operating system installed on another computer or virtual machine or backup. To determine which files you need to restore, run in command line command:

findstr /c: ""%windir%/logs/cbs/cbs.log >"D:/sfc.log"

Information about damaged files will be saved to a log file, in our case this is sfc.log to drive D. The contents of the file can be quite voluminous, look for blocks in it with the key phrase "Cannot repair" (could not be restored) with the corresponding date and time of the scan.

In the attached screenshot, you can see that SFC was unable to repair the Asseccbility.dll file. The same log should contain the path to the unrecoverable file. Copy the original file from another computer and replace the manually damaged one with it. At this stage, it is not uncommon to encounter problems, since the file may either be in use by system processes, or the user will not have rights to it.

To obtain rights and replace such files, you can use regular console utilities takeown with parameter /f And icacls with parameter /grant administrators:f, but there is an easier and more universal way - to use any "live disk" with a built-in file manager, for example, Dr.Web LiveDisk. If the computer boots, it's even easier, just copy the original files to any folder convenient for you on its hard drive.

Edit Boot iso image You can use the same Dr.Web LiveDisk in the UltraISO program by creating a folder in it and copying windows files to it.

Now let's look at how to restore Windows 7/10 system files using such a disk. After booting from the media, find your folder with files (in Dr.Web LiveDisk, the mount point is /cdrom), copy the original files to the clipboard, change to the target directory of the folder win and replace the damaged ones.

If the original files are on Windows disk, look for them in the win location, in the partition you placed them in. This method is convenient in that it removes all restrictions file system Windows, allowing you to get exclusive access to it.

Using Third Party Applications

The development of special programs that would allow you to restore damaged and deleted system files does not make sense, since all the functionality necessary for this is available in the system itself. However, there are tools that make it easier to access regular funds using a user-friendly graphical interface. Such, for example, is Microsoft DaRT- a boot disk, which is a set of administrative tools, which also includes a module for scanning and restoring Windows system files. The procedure for such a check is shown in the screenshots below.

For a more convenient launch of SFC, programs are also used. Windows Repair and, only unlike Microsoft DaRT, they start from the working system.

In Windows Repair, to start the check, go to the Pre-Repair Steps section, click on the Step 4 (Optional) tab and click the Check button.

In Glary Utilities, go to the "Modules" tab, select "Tools" in the menu on the left and click "Restore System Files". In both cases, the standard SFC console utility will be launched.

Other ways

As for the question of how to restore completely deleted system files, everything should be clear anyway. If disk space permits, back up your system partition regularly, or at least do not disable system protection so that you can roll back to the previous one if something happens.

And the last thing I would like to draw attention to. If you have downloaded and installed a custom build, be prepared for the fact that SFC will more than likely find corrupted files in it. The reason is very simple - assemblers very often modify their images, replacing, for example, the original icons in libraries and so on. Therefore, before you restore the original files, consider whether you really need it if the system does not experience any problems.

Just like hardware, software also becomes unusable, as it is subjected to significant loads from the user. Therefore, checking the integrity of system files in Windows 10 should be performed periodically, and, if necessary, damaged areas are restored.

Examination

The OS has a built-in utility that detects corrupted files and replaces them with healthy versions.

Good to know! The original OS files are stored on system drive in folder Windows\WinSxS.

Possible problems

OS recovery with sfc /scannow will fail if the source repository itself has been corrupted. In this case, you must first restore the original image using the utility Deployment Image & Servicing Management (DSIM). It is designed to work with Windows images.


Good to know! DISM uses the Update Center when restoring a vault.

Recovery

After running the utility DISM and restore the sources, run the command again in the command line sfc /scannow. This will completely restore the integrity of the system. Please restart your computer to continue. If for some reason the fix fails and you use a radical OS reinstallation method, read how to create bootable flash drive in the article "".

Output

The integrity of Windows 10 files is broken after improper work with them, frequent reinstallation of programs or overwriting of information. To restore, use the built-in utility sfc /scannow, which will do everything automatically using the storage of original files. If the original image is damaged, restore it with Deployment Image & Servicing Management.

Typically, Windows 10 Diagnostic Mode (formerly known as safe mode) starts automatically when the operating system does not shut down correctly, as well as during various Windows failures.

Safe Mode - diagnostic mode of the Windows 10 operating system

I would like to note right away as a Windows installer specialist - this mode has undergone significant changes in 10-ke. There has never been such extensive diagnostics and recovery tools in Windows operating systems.

That is why, let's take a closer look at how to work in diagnostic safe mode in order to be able to restore Windows 10. Preparing for such tasks will always come in handy for advanced users and system administrators.

2 Ways to Start Windows 10 Safe Diagnostic Mode

How to enter safe mode in Windows 10? IN previous versions Windows secure the mode could be launched using the F8 key. And now, in order to start the diagnostic mode in Windows 10 manually, you need to do the following:

In the window that opens, go to the "Recovery" tab, then "Special boot options" and click the "Restart now" button;

Windows 10 is forced to reboot;


Windows 10 diagnostic mode in action

After we launched forced reboot computer in special version booting, the Windows 10 system does not boot, but a blue “Choose an action” window appears, where we need to decide and choose from the options:

  • "Continue" - in this case, we exit the diagnostic mode, the Windows 10 system boots;
  • "Troubleshooting" - by choosing this particular tab, we will be able to carry out a complete diagnosis of the system;
  • "Turn off the computer" - accordingly, in this case, the computer is turned off.

We open the 2nd tab, the "Diagnostics" window opens in front of us. Here we can also select tasks from 2 options: "Reset the computer to its original state", "Advanced options". Consider all cases of the development of events, first select "Return the computer to its original state";

Everything is clear here without comments, so we proceed to study the “Advanced Options” tab, to select which we press the button with the arrow in the upper left corner.

There are a lot of options in the "Advanced Options" tab. useful utilities, using which you can revive operating system Windows 10. Let's take a closer look at this whole gentleman's set of system diagnostics!

  • System Restore - This tab is used to restore the system to a specific point in time. To use this feature, a restore point must be created. Restore points are created automatically (when this option is enabled on the disk) in certain moments(for example, after installing the program or windows updates), you can also create such points manually. A very useful option! I advise, from time to time, to create points in manual mode.

Now let's open the System Restore tab and see what's there. So we choose account, under which we want to open the recovery process, in the next window we enter the password and click the "Continue" button, the "Restore system files and settings" window opens. And we see that there are no restore points on the system drive. By default, "System Restore" is disabled, it must be enabled in the "System Protection" tab, which I will discuss in detail in the overview article "System Restore".


  • Restoring a system image - when choosing this option, you also need to select the account under which the restoration will be performed, then Windows looks for a system image on the disk and displays messages requiring you to specify the location of the backup. We will consider this option in the near future. Follow the news on the site and in the group in VK!

  • Startup Repair - When you select this option, the system tries to fix problems that prevent Windows 10 from booting;

  • Command Prompt - Selecting this tab opens the Command Prompt Windows environment 10, from where you can perform many manipulations with the system (for example, run a check Chkdsk disk, open the Diskpart hard drive utility and much more);


  • Boot Options - By selecting this mode, you can boot Windows 10 in safe mode, which turns on debug mode, logs the boot, and disables automatic reboot of the system when the system crashes. Start Windows 10 Safe Mode with the specified useful options very simple. You just need to select one of the options using the F4-F6 keys. Next comes Windows boot 10 in safe mode;

Remember how Windows 10 flew after clean install– a pleasure: fast start-up, normal multitasking. Over time, the speed of user requests decreases. This is a long and imperceptible process, but at one moment you realize that the "ten" slows down a lot. There are two ways to solve the problem - to demolish the system and reinstall it, or to find and fix errors.

Reinstalling the system when any problems occur is unwise, 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 there was a distribution kit at hand.

Registry check

Due to the frequent installation and removal of programs, unnecessary information accumulates in the registry - this is one of the main, but not the only cause of errors. The registry is especially bad after an incorrect removal of the program, when instead of a full-fledged uninstallation, the user erases the folder with files. In this case, a lot of empty keys remain in the registry. To fix these errors, use the built-in registry scan tools:

  1. Run a command prompt with administrator privileges.
  2. Execute " scanreg /fix».

The disadvantage of the built-in utility is that many registry errors remain untouched after the check. To eliminate them, you need to use programs from third-party developers - for example, . This utility can quickly detect and fix errors without touching anything extra.

To check and troubleshoot:


Similarly, the registry cleaning is performed in Glary Utilities And Wise Registry Cleaner. Even if the errors are not visually noticeable, it is recommended to perform a check periodically - at least once every 2-3 months. This will keep Windows running smoothly and allow you to fix problems before they seriously affect your computer's performance.

Integrity scan

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

To get started, you can apply standard utility SFC which conducts superficial analysis.

The utility will immediately fix the identified errors. But wait to rejoice - this is only a diagnostic analysis, it does not solve problems with the files that are currently being used by the system. If the “ten” is brought to such a state that programs start with a clearly audible creak, then a stronger tool is required to correct errors - the utility DISM. This will be unobtrusively told to you by a message with a text like "Corrupted files were found that the program could not recover."

Using the DISM utility

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

To check the operating mode hard drive, right-click Start and go to Power Management. Open the settings for the schema you are using.

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

After completing the preparation, you can start correcting errors:

  1. Run the command "DISM.exe /Online /Cleanup-image /ScanHealth".
  2. Wait for the scan to complete without taking any action.

At 20%, the scan will freeze - this is normal, do not worry. After 10-15 minutes, the analysis will be completed and you will receive a message that the component store can be restored. To perform a restore, enter the following command - " DISM.exe /Online /Cleanup-image /RestoreHealth».

Recovery will also hang at 20% and take about 15 minutes. After the process completes successfully, a message will appear stating that everything is in order. But this is not always the case - 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 the "top ten".

But the problem can be not only 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.

Analysis of the state of the hard drive

If an HDD is installed on the computer, then for the normal functioning of the system, it is necessary to periodically defragment the disk. Owners of SSD drives are exempted from such work due to the nature of the technology. On the HDD, data is written in the form of fragments into sectors, which can be damaged during disk operation. To prevent a hard drive from working with bad sectors and organize the information, you need to perform a 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 a lot of time, so it is recommended to run it at night. After the defragmentation of one partition is completed, run the error correction on the other - and so on until you optimize the drive completely.

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

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

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

  1. Launch command prompt with administrator rights.
  2. Run the "chkdsk C: /F /R" command, where C is drive, F is troubleshooting, and R is data recovery from bad sectors.

If the disk partition is currently in use, a notification will appear stating that it cannot be verified. There are two options - restart the computer and scan the partition in use, or cancel the scan and analyze another volume. You can choose any path, the main thing is not to forget to check all disks.

Instead of a 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 on 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".

After the test is complete, test other partitions and drives by replacing the "C" in the syntax. If you get the message "NoErrorsFound", then no errors were found.

Checking RAM

The hard drive is in order, it remains to check the RAM - what if all the problems were due to it? To do this, use the built-in Windows memory tester. It's called that - you can easily find the utility through the search. After starting the utility, you will be prompted to reboot and check. Close all programs and agree to this workflow.

After a 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 type of check with several passes to increase efficiency.

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

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

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

It is recommended to check the memory modules one by one. They left one bar, checked for errors, put the next one - this approach allows you to identify a failed module. If the program has found many errors on one bar, and they greatly interfere with the operation of the computer, then it is easier to replace the board, although cleaning the contacts helps in some cases.

Is it possible to do without checks?

You can not check Windows 10 for errors, but there will definitely come a time when they accumulate so much that the only solution is to reinstall the system. There is nothing wrong with the fact of reinstallation, given the possibility of creating a backup copy of the data. But unnecessary work can be avoided if you monitor the state of the system and troubleshoot in a timely manner - all the more, there is nothing complicated in this, as it becomes clear after a detailed study of the issue.

After installing a new massive program, you may get the impression that the system began to malfunction: there were system errors, lags, notifications of obscure content periodically appear. A situation may arise that by installing a new application, you thereby violated the integrity of the operating system. In this case, you need to know how checking the integrity of system files in Windows 10 in order to protect the OS from subsequent problems. In today's article, we'll talk about how this check, and from what problems it will protect you.

The top ten has two mechanisms for checking the integrity of the system and protected file objects, as well as their automatic reconstruction to a working form if any damage is found - these are SFC and DISM. As an addition to them, it is possible to run the Repair-WindowImage key for the system PowerShell language, which uses the DISM mechanism in its work. As a rule, experts recommend using both of them in turn. This behavior can be explained by the fact that the list of files for testing has a number of profound differences. Below I will describe how to use both of these tools, as it is necessary for safe and comfortable work in Windows 10.

Important note: the actions described in the article will not cause system conflicts or critical errors in your OS, however, if you have previously performed any operations related to the modification of the contents or the complete replacement of system work objects, the cancellation of all previously performed operations will take effect during the reconstruction.

How to use the SFC mechanism, which allows you to check the integrity of files and correct file objects in Windows 10

Many users have already dealt with the key, designed to determine whether the objects of the system are complete and complete, sfc /scannow. By default, this key scans the HDD for the presence of Win 10 file protected objects and automatically corrects them.

To run the command indicated earlier, you will need to use the console running in admin mode. To launch it, right-click on the start button "Start" and select "Command Prompt (Administrator)" from the list. So, the console mode is started, now we set the parameter in the cmd environment sfc /scannow and finally press Enter.

After specifying the request specified earlier, testing of the OS will be put into effect, after which the found errors related to the lack of completeness, relevant for correction, will be corrected accordingly, and if none of them are found, a message will appear on the display with a message stating that that the desired integrity problems were not found in the operating system, which will give a positive impetus to try other search methods.

If you want to check the full form of not all file objects in the operating system, but only a certain one, specific object stored on the drive, use the key sfc /scanfile=”path_to_file”.

An important note about the operation of the SFC key: the specified command is not able to correct full-form errors found in files used by the OS during the current time period of the OS operation. To solve this problem, the OS has the option to run SFC in the restoration environment, and again through the console mode.

How to boot into Win 10 recovery mode and use the SFC command there?

Windows 10 has a number of methods to boot into restoration mode. Here are a few of them:

- take the disk with the OS distribution kit and insert it into the laser disc drive, then boot from it. The disk function can also be performed by a USB stick inserted into the appropriate USB slot. When booting from a blank or flash drive, click the mouse in the lower left area of ​​​​the display on the “System Restore” control;

- burn the OS recovery disk to a disc and boot from it;

- When the display shows the login screen of the Axis, click on the "On" icon. at the bottom right of the display, then hold down the Shift button and click Restart.

When one of the options is put into action, click on the menu item "Identify and fix errors" -\u003e "Advanced options" -\u003e "Command line". If you chose the last of the options described above, you will also be required to specify the admin password used in the operating system.

If cmd mode is enabled, run the following commands:

- list volume.

By entering the second of the specified parameters, the display will show a list of logical devices. Pay special attention to the letters of the devices reserved by the operating system and boot volumes. Since the recovery mode functions independently from the OS, the volume letters may differ significantly from those presented in the standard functional environment.

When you remember the letters that belong to the system boot volumes in the HDD structure, it is worth asking a few more queries on the command line:

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

Here, volume C: is bootable, which we can verify by looking at the last screenshot above. In your case, the letter boot disk may be different from what we have. As a result, the integrity check of system files in Windows 10 will be launched, but this time using the SFC key it will be possible to check even the files occupied by the operating system, which we have been striving for so long. It can take a good half an hour or even longer to check. If you are worried that your computer may freeze, check the cursor during testing: if it blinks, then the verification procedure continues. When the process completes, exit console mode and restart your PC.

Checking the integrity of system files in Windows 10 using the DISM utility

The DISM Win-image processing and scaling service provides the ability to identify and fix those problems with corrupted OS files that the SSF service could not detect. In addition to that, DISM is definitely worth resorting to if SFC hasn't found file object completeness violations in the operating environment, but you're pretty sure that they are there.

To use DISM, start cmd mode again as admin, and after that you should use the following queries:

- dism /Online /Cleanup-image /CheckHealth - allows you to get information about the status and possible damage to the component services of the Win-environment. Moreover, this command does not perform the check itself, but only checks the previously specified values.

- dism /Online /Cleanup-image /ScanHealth - checks for faults and completeness of the component storage. This check can take quite a significant amount of time, but it's worth it. It is also possible to “freeze” the procedure at an indicator of 20%.

- dism /Online /Cleanup-image /RestoreHealth - performs both testing and reconstruction of OS system objects. Like the previous command, it takes a significant amount of time and may stop in the process.

You can also use the DISM command in the PowerShell program environment activated in admin mode using the Repair-WindowImage key. Let's take the following commands as examples:

- Repair-WindowsImage -Online -ScanHealth - check the integrity of system files in Windows 10.

- Repair-WindowsImage -Online -RestoreHealth - testing and correcting damage.

As you can see for yourself, checking the integrity of system files in Windows 10 is a simple and unpretentious procedure that even a beginner can handle. Once again, we remind you that it is better to use all the mentioned tools in combination, and not separately. This will help create the desired effect and achieve a certain result in the verification process.