Check and repair Windows system files with sfc scannow

07/15/2014 windows | for beginners | system

Many people know that you can check the integrity of Windows system files using the sfc /scannow command (however, not everyone knows this), but few people know how else you can use this command to check system files.

In this instruction, I will show how to carry out the check for those who are not at all familiar with this command, and after that I will talk about various nuances of its use, which I think will be interesting. See also more detailed instructions for the latest version of the OS: checking and restoring the integrity of Windows 10 system files (plus video instructions).

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:

  1. Copy the required file from a working computer with the appropriate version of Windows 7 and distribute administrator rights to it by executing the command: “takeown /f Location” and press “Enter”, for example, the location can be specified this way: “C:\Windows \system32\jscript.dll";

  2. Next, give the PC owner full access to the old “broken” file. To do this, you need to use the command: “icacls Location /GRANT ADMINISTRATORS:F” and click on “Enter”, for example, the location can be specified this way: “C:\Windows\system32\jscript.dll /grant administrators:F”;

  3. Insert the good file into the directory where the “broken” one is located. To do this, you need to execute the command: “Copy Source_file Location”. For example, enter the following path with the command: “copy E:\temp\jscript.dll C:\Windows\system32\jscript.dll”.

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 resolve the problem, you can try to automatically repair the Windows Component Store using the command available starting in 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

Additional analysis methods via SFC

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

  1. It is possible to carry out a check without a 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.

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.

What to do if you can’t restore the integrity of files through the command line

Here it is worth resorting to extreme measures, for example:

  • reinstall Windows. Whatever one may say, the integrity will have to be restored, otherwise failures in the operation of the operating system cannot be avoided. And using such a system is at least uncomfortable. Therefore, it is better to completely remove the top ten and install it again from a bootable USB flash drive. If the PC has an SSD drive, then the Windows installation process will take a little time;
  • remove the latest installation updates. If some update goes wrong, the command line will not be able to properly scan the files on the system disk. To fix the problem, you need to go to Windows Update and track the downloaded items for the last month by date, and then uninstall them directly in this window or through safe mode;
  • take advantage of third-party software. Naturally, such applications are downloaded from the Internet and can damage the security of the PC;
  • check the hard drive for bad sectors. Perhaps the problem is in the HDD, and it is preventing the scanning process with the “SFC / Scannow” command. Broken sectors are excluded from the operation of the railway.

Note! Alternatively, you can scan your PC for viruses and remove the found malware or service, and then repeat the scan. To do this, you need to download a special program from Internet resources to scan and protect your PC.


Checking the hard drive for bad sectors

How to check Windows 7 for the integrity of system files?

Using standard tools, you can check Windows 7 for the integrity of system files as follows:

  • Press “Win+R” and enter “cmd”.

  • A command prompt will open. In the console, enter “sfc /scannow”.

  • A system scan will start, after which a report on the status of system files will be provided.

In cases where, when running the command, a message appears that “Windows Resource Protection was unable to start the recovery service...”, then you should do the following:

  • Press “Win+R” and enter “services.msc”.

  • The services window will open. Here you need to find and enable “Windows Module Installer”.

  • To do this, double-click to start the service and set the startup type to “Manual”.

  • Then we reboot the system and repeat running the command in the line.

How to perform system file recovery in Windows 7 in different ways?

The “sfc /scannow” command, in addition to scanning, also restores system files. However, if she was unable to “repair” these files, it is worth doing the following:

  • At the command line, enter: findstr /c:"" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfc.txt".

  • A text document “SFC” will appear on the desktop, which will contain a list of files that could not be recovered.

  • We find damaged files in the list and copy their versions from the working PC. After replacing damaged files, the system will work correctly.

You can also scan and restore system files from the recovery environment using the MSDaRT tool. Initially, download and burn an ISO image of the “ERD Commander” system recovery disk. After booting from the installation disk or flash drive, select the appropriate item.

A new window will appear. Select "System File Checker".

The System File Recovery Wizard will launch. We follow the instructions.

Let's put o.

A search for damaged files will begin. Afterwards, a window with a report will appear, where you need to put a mark next to the defective element and click “Next”.

After recovery, reboot the PC.

If there are problems with your computer, it’s a good idea to check the OS to determine the integrity of the system files. It is the damage or deletion of these objects that often causes the PC to malfunction. Let's see how you can perform this operation in Windows 7.

Fix sfc.exe errors

  • 1 Information about the file sfc.exe
  • 2 Errors related to the sfc.exe file
  • 3 How to fix errors related to sfc.exe?
  • 3.1 Scan for malware
  • 3.2 System and driver updates
  • 3.3 System File Checker Tool
  • 3.4 System Restore
  • 4.1 List of versions of the sfc.exe file

File information

basic information
File namesfc.exe
File extensionEXE
DescriptionSystem Integrity Check and Repair
Software
programMicrosoft® Windows® Operating System
authorMicrosoft Corporation
details
MIME typeapplication/octet-stream
File typeExecutable application
systemWindows NT 32-bit
Copyright© Microsoft Corporation. All rights reserved.
Character setUnicode
tongue codEnglish (US)

Verification methods

If you notice any errors in the operation of your computer or its incorrect behavior, for example, the periodic appearance of a blue screen of death, then, first of all, you need to check the disk for errors. If this check does not reveal any faults, then in this case you should resort to scanning the system for the integrity of system files, which we will discuss in detail below. This operation can be performed either by using the capabilities of third-party software or by launching the embedded Windows 7 utility “SFC” via the “Command Line”. It should be noted that even third-party programs are used only to activate “SFC”.

Method 1: Windows Repair

One of the most popular third-party programs for scanning your computer for damaged system files and restoring them if problems are found is Windows Repair.

  1. Open Windows Repair. To run a check for damage to system files, immediately in the “Pre-Repair Steps” section, click on the “Step 4 (Optional)” tab.
  2. In the window that opens, click on the “Check” button.
  3. The standard Windows utility “SFC” is launched, which scans and then displays its results.

We will talk in more detail about the operation of this utility when considering Method 3, since it can also be launched by using the operating system tools implemented by Microsoft.

Method 2: Glary Utilities

The next comprehensive program for optimizing computer operation, with which you can check the integrity of system files, is Glary Utilities. Using this application has one important advantage over the previous method. It lies in the fact that Glory Utilities, unlike Windows Repair, has a Russian-language interface, which makes the task much easier for domestic users.

  1. Launch Glary Utilities. Then go to the “Modules” section by switching to the appropriate tab.
  2. Then use the side menu to navigate to the “Service” section.
  3. To activate a check for the integrity of OS elements, click on the “Restore system files” item.
  4. After this, the same system tool “SFC” is launched in the “Command Line”, which we already talked about when describing the actions in the Windows Repair program. It is he who scans the computer for damage to system files.

More information on how SFC works is provided in the following method.

Method 3: "Command Line"

You can activate “SFC” to scan for damage to Windows system files using exclusively OS tools, specifically the “Command Line”.

  1. To call “SFC” using the built-in system tools, you must immediately activate the “Command Prompt” with administrator rights. Click Start. Click All Programs.
  2. Look for the “Standard” folder and go into it.
  3. A list opens in which you need to find the name “Command Line”. Right-click on it (RMB) and select “Run as administrator”.
  4. The Command Line shell is running.
  5. Here you should enter a command that will launch the “SFC” tool with the “scannow” attribute. Enter:
    sfc /scannow

    Press Enter.

  6. In the “Command Line”, checking for problems in system files with the “SFC” tool is activated. You can monitor the progress of the operation using the displayed information in percentages. You cannot close the Command Prompt until the procedure is completed, otherwise you will not know about its results.
  7. After the scanning is completed, a message indicating its completion will be displayed in the “Command Line”. If the tool does not detect any problems in the OS files, then information will be displayed below this inscription stating that the utility has not detected any integrity violations. If problems are still found, their decryption data will be displayed.

Attention! In order for SFC to not only check the integrity of system files, but also restore them if errors are detected, it is recommended to insert the operating system installation disk before starting the tool. This must be the exact disk from which Windows was installed on this computer.

There are several variations of using the SFC tool to check the integrity of system files. If you need to scan without restoring missing or damaged OS objects by default, then in the Command Prompt you need to enter the command:

sfc /verifyonly

If you need to check a specific file for damage, you should enter a command that matches the following pattern:

sfc /scanfile=file_address

There is also a special command to check an operating system located on a different hard drive, that is, not the OS in which you are currently working. Its template looks like this:

sfc /scannow /offwindir=Windows_directory_address

Lesson: Enabling Command Prompt in Windows 7

Problem launching "SFC"

When trying to activate “SFC”, a problem may occur that a message will be displayed in the “Command Prompt” indicating that activation of the recovery service was unsuccessful.

The most common cause of this problem is disabling the Windows Module Installer system service. To be able to scan your computer with the SFC tool, it must be turned on.

  1. Click “Start” and go to “Control Panel”.
  2. Go to "System and Security".
  3. Now click “Administration”.
  4. A window will appear with a list of various system tools. Click “Services” to go to the “Service Manager”.
  5. A window opens with a list of system services. Here you need to find the name “Windows Module Installer”. To make your search easier, click on the name of the “Name” column. The elements will be built according to the alphabet. Having found the desired object, check what value it has in the “Launch type” field. If it says “Disabled”, then you should enable the service.
  6. Right-click on the name of the specified service and select “Properties” from the list.
  7. The service properties shell opens. In the General section, click on the Startup Type area, which is currently set to Disabled.
  8. A list opens. Here you should select the “Manual” value.
  9. Once the required value is set, click “Apply” and “OK”.
  10. In the “Service Manager” in the “Startup Type” column in the line of the element we need, the value is set to “Manual”. This means that you can now run "SFC" via the command line.

As you can see, you can run a scan of your computer for the integrity of system files either using third-party programs or using the Windows Command Line. However, no matter how you run the check, the system tool “SFC” still performs it. That is, third-party applications can only make launching the built-in scanning tool easier and more intuitive. Therefore, specifically in order to carry out this type of check, there is no point in downloading and installing software from third-party manufacturers. True, if it is already installed on your computer for general system optimization purposes, then, of course, you can use these software products to activate SFC, since this is still more convenient than operating traditionally through the Command Line.

We are glad that we were able to help you solve the problem. Thank the author and share the article on social networks. Describe what didn't work for you. Our specialists will try to answer as quickly as possible.

Why sometimes files cannot be recovered

How to check and update drivers on Windows 10

It’s rare, but it still happens that the command line cannot automatically fix file integrity violations after scanning the operating system. There are many reasons for this error. Only the most common of them are described below:

  • the system cannot scan the found file and automatically displays a message about violations of its integrity. In this situation, the problem is in the file itself. Perhaps its extension or size is to blame;
  • problems with the operating system. Sometimes Windows misjudges scan results, producing a false message. This circumstance may be caused by viruses or hardware failure;
  • Insufficient rights to restore. It is for this reason that the command line should always be launched with superuser rights, i.e. as an administrator, in order to give more scanning rights in advance;
  • inability to scan some system files. This is also not news. It’s not always possible to even delete something from the system disk. Uninstallation again requires administrator permission.


Checking file integrity on Windows 7

Note! To get more rights and remove system software, you can remove the administrator account from the operating system.

Checking system files for errors

It happens that the system begins to “stupid” or “slow down” (what to do if your computer slows down). 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 Windows OS has one useful “little thing” that can search for 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 to remove programs, remove unnecessary things from startup, and so on. In general, clean the registry and the system as a whole. Yes, this is useful and can lead to good results, but with all these actions it is good to remember what I will write about below. I already wrote a little about this function in the article Error when initializing and launching an application, which can also occur due to a failure in system files, which are often forgotten. But still, within the framework of this article, I will repeat myself... So, we launch the command line as an administrator:

and enter sfc /scannow into it: The system scan will begin: All you have to do is wait. For those interested, here is a description of the command and keys. 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.

The registry is a huge data repository that contains all sorts of parameters that allow the Windows 7 OS to work stably. If you make incorrect changes to the system database or damage any registry sectors (for example, when your computer turns off spontaneously), various types of malfunctions may appear in the system. operation of the system. In this material we will figure out how to restore the system database.

The most common problems with the sfc.exe file

There are several types of errors associated with the sfc.exe file. The sfc.exe file may be located in the wrong file directory on your device, may be missing from the system, or may be infected with malware and therefore not function properly. Below is a list of the most common error messages associated with the sfc.exe file. If you find one of the following (or similar ones), consider the following suggestions.

  • sfc.exe is corrupted
  • sfc.exe cannot be located
  • Runtime error - sfc.exe
  • sfc.exe file error
  • The file sfc.exe could not be loaded. Module not found
  • unable to register sfc.exe file
  • The file sfc.exe cannot be loaded
  • The file sfc.exe does not exist

sfc.exe

The application failed to start because sfc.exe is missing.
Reinstall the application to resolve the issue. Problems with sfc.exe can be resolved in a variety of ways. Some methods are only for advanced users. If you are not confident in your abilities, we advise you to consult a specialist. Correcting errors in the sfc.exe file should be approached with extreme caution, since any errors can lead to an unstable or incorrectly functioning system. If you have the necessary skills, please continue.

Restoring the registry

PC malfunctions are also possible after installing software solutions that require changes to be made in the system database. There are also situations when a user accidentally deletes an entire registry subsection, which leads to unstable operation of the PC. To fix such problems, you need to restore the registry. Let's look at how this can be done.

Method 1: System Restore

A time-tested method for troubleshooting registry problems is a system restore, which will work if you have a restore point. It is also worth noting that various data that was recently saved will be deleted.

  1. To perform this operation, go to the “Start” menu and move to the “Standard” tab, open “System” in it and click on “System Restore”.
  2. In the window that opens, put a dot in the “Recommended recovery” option or select the date yourself by specifying the “Select another recovery point” option. You must indicate the date when there were no problems with the registry. Click on the “Next” button.

After this procedure, the process of restoring the system database will occur.

conclusions

Obviously, the sfc utility is not a panacea for all types of problems that arise in the Windows operating system. There are often cases when sfc cannot find any damage in system components, or it finds and fixes them, but the errors occur again. This behavior hints that the component mechanism itself in the Windows operating system is rather “crude” and is in permanent “beta”, which the developers prefer to remain silent about, simply maintaining it in a more or less working state and improving it as best they can from version to version. versions. This guess is confirmed by a large number of errors that cannot be corrected by automated system tools. In this case, as in the case when the sfc utility did not detect damaged components in the system, if the tendency towards unstable operation of the system persists, it is worth considering other diagnostic methods.

System recovery programs

The following programs are suitable for restoring the functionality of Windows OS due to virus damage to system files and settings:

  1. AVZ is an antivirus utility for protecting the OS, detecting and removing malware.

  1. Recuva is a program for recovering deleted files from hard drives.
  1. Wise PC 1stAid is an application for identifying and correcting OS errors and eliminating the consequences of computer virus infection.

Launching the console via the installation flash drive

You can restore Windows 7 startup via the Command Line without access to the desktop, using a pre-prepared installation flash drive. Before you begin, you will need to configure the BIOS to start the computer from a flash drive.

Need to:

  1. Connect the bootable USB flash drive and restart the PC.
  2. In the installer window, select your preferred language and click Next.

  1. Click on “System Restore” to open a list of available tools.

  1. In the new menu, select the first recovery option and click Next.

  1. Launch Command Prompt.

Rating
( 2 ratings, average 5 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]