Command to check Windows 7 system files. Manually restore system files


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.

Causes of system file corruption operating system there can be many windows. 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. automatic mode, 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 store 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 trying them automatic recovery
  • /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 can't 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 by any text editor.

Only for this it must be launched with computer administrator rights. The file stores a lot 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 execute in command line running as administrator next command.

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 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\_0000000000000000 .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\a29d89c6 d17ed2019a3d0000f415f015. $$_system32_21f9a9c4a2f8b514.cdf-ms", Destination = "\SystemRoot\WinSxS\FileMaps\$$_system32_21f9a9c4a2f8b514.cdf-ms" 3: Hard Link File: Source = "\SystemRoot\WinSxS\amd64_microsoft-windows-autoplay_3 1bf3856ad364e35_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 impossible 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 on English language 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 old file to 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's just one final touch left to secure yourself 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 disk with windows distribution 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, let's use free archiver 7-zip. If you don’t have it on your computer, you can download it here; you’ll probably find it useful for working with archives.

We are interested in system files are located in an image file named install.wim in the sources folder, and the image can contain several different versions operating system in the appropriate 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 recovery environment ( windows 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 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 the Windows 10/8/7/XP OS 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.


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 clicking right click 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 completing the steps described above, 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 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.

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 damaged, 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 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.

NastroyVse.ru

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

As a result of some Windows 7 malfunctions and infections malware there is a need for analysis file integrity systems. Also, files are often damaged due to improper shutdown of the PC and power surges. Therefore, every user of the "Seven" must be able to produce self-check and resuscitation of system files in 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 commands to perform the scan “sfc /scannow” 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 working Windows 7, or from an external installation media with the 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 “Installer” service windows modules» activated manual type start the recovery service.

Additional analysis methods via SFC

If you need, for example, to analyze the integrity of files on a remote OS or solve other various 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 of this useful utility, like sfc. Entering windows composition, 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, evil virus or by a careless user. Undoubtedly, Windows Vista and windows 7 have brought system security and the protection of their files to 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. Paste installation disk windows 7 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 LOG file to this file: C:\WINDOWS\LOGS\CBS\CBS.LOGWe are only interested in the lines in this file labeled . To filter not required lines you need to open a command line 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 now, thank you for this topic on the forum about Windows 7.

How to restore system files in Windows 7

Command sfc /scannow ( System check files) 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 check is completed, 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 commands will appear on your desktop text file with the name sfcdetails.txt, 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 the program 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 its use from Office applications, then 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.

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 some kind of restore point or backup copy, before resorting to a radical solution to the problem in the form of 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 on it context menu 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 the Media Creation Tool utility. 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, installed programs and entered system settings, and at the exit we will get the freshest, with all installed updates Windows 10 Anniversary Update.

Launch the Media Creation Tool. We accept license terms.

Select “Update this PC now.”

And wait for the update process to complete.

Have a great day!

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

When you start to notice random errors, problems during system startup, or problems with the performance of 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 the files that are essential for your computer to function properly, some apps, drivers, or even Windows updates can cause your system to become unstable. Like previous versions of Microsoft systems, Windows 10 includes a system file checker (SFC) - a compact but powerful utility command line that can perform a system integrity scan and replace damaged or missing files with the original version.

In this guide, we will present steps to use System File Checker (SFC) to automatically repair corrupted system files while the operating system is running. We’ll also look at 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 working with SFC utility it is recommended to make a complete backup copy 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:

  • Windows Resource Protection detected no 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 repaired 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 downloaded to 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 section “ Special options download” 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 indicate to the SFC where the setup files Windows. 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 repair 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 getting additional 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 for launch SFC Device administrator rights are required.
  • 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 corrupted files by 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 working version file, and C:\Path-DESTINATION-and-File-Name must 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 were corrected, you can check the integrity of each separate 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.

Found a typo? Highlight and press Ctrl + Enter

Just like hardware, software also deteriorates because 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 should be repaired.

Examination

The OS has a built-in utility that identifies damaged files and replaces them with working versions.

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

Possible problems

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


Good to know! When restoring storage with the DISM utility, the Update Center is used.

Recovery

After running the utility DISM and restore the sources, run the command again on the command line sfc /scannow. In this case, the integrity of the system will be completely restored. To continue working, restart your computer. If for some reason the correction failed and you use radical method reinstalling the OS, read how to create bootable USB flash drive in the article “Creating a Windows 10 installation flash drive in various ways.”

Conclusion

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

). In this case, some begin to worry and look for all sorts of reasons and ways to eliminate freezes.
I will not repeat myself and write why this happens, because... The article is not about this and I have already given a link to solving problems above.
I’d rather show you one interesting way that will help you check your system for errors.

Few people know, but in Windows OS there is one useful “little thing” that can search And correct errors in the system itself. Moreover, it will not touch third-party programs, but will only check its system files. This is useful and interesting because many do not think that the reason may be hidden in the system itself, but feverishly begin, and so on. All in all . Yes, it is useful and can lead to good result, but with all these actions it is good to remember something else that I will write about below.

I already wrote a little about this function in the article, which can also arise due to a failure in system files, which are often forgotten. But still, within the framework of this article, I will repeat...

So, let's run:

and enter it into sfc /scannow:


The system check will begin:


All you have to do is wait.

For those interested, here is a description of the command and keys.

sfc
Where:
/scannow – immediately scans all protected system files.
/scanonce – scans all protected system files once at the next system boot.
/scanboot – scans all protected system files at every boot
/REVERT – Sets the initial parameters to default.
/ENABLE – Enable normal operation of Windows file protection
/PURGECACHE – Clear file cache and check files immediately
/CACHESIZE=x – Sets the file cache size

In the command line (Start -> Run -> cmd) we write the command sfc / and the desired key.

After the check is completed, the system will report the results and ask you to reboot.

That's all I have. Thank you all for your attention.







2024 gtavrl.ru.