What is sfc. Checking and restoring the integrity of Windows system files


Whenever something goes wrong with your computer or laptop, there are a number of troubleshooting tools you can run to try and fix the problem. Windows 10/8/7 has several built-in commands that you can use to check and repair damaged system files, which cause problems when changed over time. One way to troubleshoot Windows problems is to scan your system and repair system files. It can help with all types of problems such as slow system, blue screen deaths, sudden power failures and system crashes.

Let's take a look at how to run System File Checker in Windows using CMD command line And PowerShell, such teams as sfc /scannow and tools DISM. I would like to note that for Anniversary updates Update Windows 10, it will be better to use methods with PowerShell.

Check and Restore system files via CMD

System File Checker scans your computer for any damage or changes to system files that might otherwise interfere normal operation your PC. From there it replaces the file correct version to ensure smooth operation. Using the command line, you can try to scan and restore system files of later operating systems like Windows 10/8/7/Vista. Let's look at two teams sfc /scannow and DISM using CMD.

1.

  • Run command line(CMD) as administrator. Click "search" and simply write "cmd" or "command line", then follow it right click mouse and run as administrator.
  • Specify the command sfc /scannow and wait for the process to complete.


Note: After scanning your system, one of three results will be returned:

  • There will be no system file errors.
  • There will be system file errors and Windows will repair them automatically.
  • Windows has detected errors but cannot repair some of them.

If option 3 shows you that an error has been detected and the system cannot recover, then repeat the procedure. I advise you to disable encryption and if they are available at the time of checking. Nothing succeeded? Let's move lower.


2. (DISM)

If the above doesn't work in safe mode, there is one last method check for corruption in system files and fix them. We use the Deployment Image and Service Management (DISM) tool. The team works with Windows 8/8.1/10 systems. Open it back and use the following command:

The process may take long time with the percentage scale freezing. When finished, restart your computer and start it back sfc /scannow to make sure there are no errors or the error has disappeared.


Check and Restore system files viaPowerShell

We will use Windows PowerShell to show how to use the maintenance and management service DISM to scan and fix damaged system files in Windows 10. This method will be more effective for updating Anniversary windows 10 than the command line.

1. Using the System File Checker (SFC) tool

  • Run PowerShell on behalf of the administrator. Click "search" and type windows powershell, then right-click and select as admin.

  • Set in the window PowerShell command sfc /scannow. If the scan finds any problems, Windows will try to fix them. If Windows can't fix them, it will warn you that further investigation and action is needed. Move below if errors are found.


2. Using the Deployment Image and Service Management tool (DISM)

The DISM scan detects corrupted system files and Windows will try to fix them and give you a progress report at the end. If Windows is unable to find the files needed to repair damaged system files, you will also be provided with information on what to do next, with a link to Microsoft's website and troubleshooting options. Enter the below command into the PowerShell window.

DISM /ONLINE /CLEANUP-IMAGE /RESTOREHEALTH

If DISM fixed everything or did not reveal any errors, then restart your laptop or computer and run it back to check sfc /scannow.


Read the article about how system checks are carried out. Windows 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. Checking is necessary in cases where system folders exposed to malware or failures due to improper shutdown of the PC. Windows system files are checked different instruments. In most cases you won't even have to install additional programs- we can handle it standard means. 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 the majority Windows versions this can be done using the menu. "Start". In the eighth version of the OS, to call the command line from administrators, you need to call context menu using the Win + X key combination, and then select the desired item from the list.

  1. Enter sfc team/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 easy to use.

Please note that in custom Windows builds this utility will always find errors. This is due to the fact that assemblers often change appearance systems. Therefore, before restoring working system think about whether it's worth doing. It is recommended to rollback to control point or replace files only if you notice critical errors, 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 check will be performed specific file, the system will not restore it.
  3. If you want to check files not in the current folder, but in remote computer or another 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 system administrators. For ordinary users A basic command is enough.

Possible problems

If you were unable to recover your files using standard methods, then this can be done manually using a system disk image. Edit virtual disk with system files you can use UltraISO utilities 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 restrictions file system, which overlap 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 boot disk, capable of coping 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 preset 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 hard drive and system, select “System File Checker”.
  6. Next, follow the prompts of the verification wizard. Select auto mode work,

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 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 additional actions. It is suitable for inexperienced users who do not have command line skills. She runs from her shell standard utility SFC.

Glary Utilities

Works similar to the previous one Glary Utilities– it is as simple and understandable as possible. It doesn't have large quantity 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 copy damaged files manually.


Applications that do not work or have errors from Windows Store, problems in the desktop part of Windows and instability of the operating system as a whole are often the result of damage to important system files. The easiest way out of a situation where system files are damaged - or to . But such a move requires the presence of the latter - if not in a fresh edition, then at least in some kind. If there is not even at least some recovery point or backup copy before resorting to a radical solution to the problem in as Windows, you can try to restore the integrity of its system files. Below we will look at 5 ways to do this, provided that current Windows still able to boot. Only two methods for restoring the integrity of Windows files will be offered; the other three are solutions for situations complicated by the need to restore the storage of system components.

1. Restore the integrity of Windows files

To identify missing or damaged important files systems and their recovery Windows provides standard utility sfc.exe, which works using the command line. The utility replaces damaged or missing system files with their originals from a special component storage located in the “WinSxS” folder inside the “Windows” directory on drive C. Run the command line as administrator and enter:

Press Enter. After scanning to identify system files that need to be replaced, they will be restored.

But this is only after successful completion of the operation. If the contents of the storage itself are damaged, the operation will end with a message stating that it is impossible to restore some of the system files. In this case, you must first resort to restoring the storage Windows components, and then carry out the operation to restore files to their working directories.

2. Restoring the system component store: DISM

To restore the storage of the original system files, we will use the maintenance utility Windows images– DISM, also working via the command line. During the storage recovery process, the utility uses the Windows Update service and downloads missing or damaged system files from Microsoft servers. Because the presence of the Internet - required condition for a successful operation.

Launch the command line as administrator and enter:

DISM /Online /Cleanup-Image /RestoreHealth

Press Enter. If the operation is successfully attempted, we will see a corresponding notification.

Now we carry out the operation discussed in paragraph 1 of the article.

It may also happen that the operation process will freeze or fail. A notification about an unsuccessful attempt to perform an operation will, in particular, be accompanied by a proposal to indicate the path from where you can get data to restore the system component storage.

We will consider the process of restoring the storage, indicating the source of data acquisition, a little later, in paragraph 4 of the article.

3. Restoring the system component store: PowerShell

You can restore system components alternative way- by using Windows tool PowerShell. This method is similar to the previous one: the Windows Update service is also used to restore the storage. And, accordingly, in this case an Internet connection is also required. The method using PowerShell will take longer than the previous method using the DISM utility, but the process of restoring the storage itself will be carried out more thoroughly.

Run PowerShell as administrator and enter:

Repair-WindowsImage -Online -RestoreHealth

Press Enter. If the system file storage is successfully restored, we will receive a report like the one shown in the screenshot below, where, in particular, the “Image Health State” parameter will be marked as “Healthy”. And this means that the system file storage has been restored. Now it is necessary to carry out the operation described in paragraph 1 of the article.

4. Restoring the system component store: Windows installation disk

You can resort to restoring the Windows component store indicating the source of data if there is no Internet or the two previous methods did not bring positive results. Source from which data for storage recovery is retrieved system components– this is the installation disk of the corresponding version and Windows edition. This can be physical installation media - a flash drive or disk, or it can be an ISO image with a distribution kit. The latter must be mounted in virtual drive by calling the context menu on it and selecting the “Connect” command.

We connect a flash drive, disk or image, run PowerShell as administrator and enter a command like:

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

In this command, the drive letter of the installation media is subject to substitution. In our example, this is the letter D, and instead of it, in each individual case you need to substitute your own letter of the flash drive, physical or mounted drive, as they appear in Windows Explorer. After entering the command, press Enter.

Based on the results of the operation, as in the previous case, its successful completion will be indicated by the “Healthy” state of the “Image Health State” parameter.

After restoring the storage, we launch the operation discussed in paragraph 1 of the article.

5. Windows 10 update

You can restore the integrity of damaged Windows 10 system files by updating the system using Media utilities Creation Tool. It can be downloaded from the official Microsoft website. Windows 10 update is the longest and at the same time the most reliable way return the operating system to functionality. The process of updating Windows 10 takes approximately the same time as the process of reinstalling it. As part of this process, all damaged system files will be overwritten, user profile data will be saved, installed programs and contributed system settings, and at the exit we will get the freshest, with all installed updates Windows 10 Anniversary Update.

Let's launch Media Creation Tool. We accept license terms.

Select “Update this PC now.”

And wait for the update process to complete.

Have a great day!

Windows? 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 available 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 of the options will check the integrity 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 scan the operating system before recovering lost, damaged files, performed in order to correct functioning, resuming uninterrupted operation, troubleshooting by restoring damaged components, use the sfc /scannow command, it is in offline mode examines and corrects system partitions of Windows 10 OS.

  • To activate this command, first open CMD, 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 “Recovery” Windows environment 10".

Running SFC using the recovery environment

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

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

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

As a result, a scan should run that checks 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. Last action will only need to be executed when the scan is complete 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 are present different components Windows 10. A deep scan, 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.

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 damaged, damaged sections of any Windows-class operating system, which will solve the problems of malware interfering with the computer, restore its performance, and avoid extreme measures, such as full recovery systems in case of malfunctions. You do not need to reinstall the entire OS; it is enough to restore damaged components. Identify them using special teams and utilities, and your computer will continue to function.

System File Checker allows you to check the versions of all protected files. If System File Check reveals that a protected file has been modified, it is replaced with its original version.

SFC in Windows environment

To perform a similar check in Windows, just launch a command prompt with administrator rights and run:

Sfc /scannow

Below is a table with the syntax of the utility and an explanation of the meanings of the keys used.

Table 1 - Syntax of the sfc.exe utility

SFC

/SCANNOWChecking the integrity of all protected system files and, if possible, restoring problematic files.
/VERIFYONLYChecks the integrity of all protected system files. File recovery is not possible.
/SCANFILEIntegrity check specified file and its restoration when problems are detected. In the parameter<файл>the full path must be specified
/VERIFYFILEChecking the integrity of a file whose full path is specified in the parameter<файл>. File recovery is not possible.
/OFFBOOTDIROffline download directory location for offline recovery
/OFFWINDIRLocation of autonomous Windows directory for offline recovery
For example:
sfc /SCANNOW
sfc /VERIFYFILE=c:\windows\system32\kernel32.dll
sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows
sfc /VERIFYONLY


SFC in Windows RE

The incomprehensible behavior of the utility prompted me to start writing this article. sfc. exe in Windows RE when booting from installation disk or a recovery disk, namely a proposal to reboot the system and run the scan again.

Figure 1 - Running the utility in a recovery environment without keys and requiring a reboot

This behavior has a completely logical explanation: for the Windows RE environment, the disk partition with the operating system, is a standalone directory. Therefore, running the utility with the keys /OFFBOOTDIR And /OFFWINDIR required. Next we will find out the meanings of these keys.

The location and letters of the partitions in Windows Explorer or Disk Management may differ from the letters assigned to the partitions in the Recovery Environment. Please note that in the pictures below the system section is lettered WITH.

Figure 2 - System section in Windows Explorer

Figure 3 - System partition in Disk Management

Vadim Sterkin proposed a wonderful way to determine partition letters in the recovery environment. There is another way - use the utility DISKPART. Boot into the recovery environment from the installation Windows disk, enter the command line and execute sequentially:

DISKPART List disk Sel disk 0 Detail disk







2024 gtavrl.ru.