Windows 7 how to restore standard files. Restoring damaged Windows system files using SFC and DISM commands


Checker system files (System File Checker), built into Windows, can check system files for damage and any other changes. If the file has been modified, the utility will automatically replace it with the correct version.

When to use these commands

These commands will be useful when diagnosing a faulty operating room. Windows systems. If the system displays a blue screen, applications crash or some do not work system functions, the SFC team can help. Even if executing the SFC command does not fix anything, this will allow you to verify that the system files are not damaged and you can continue diagnostics in other ways.

The DISM command is not required under normal circumstances. But if the SFC command fails or cannot replace damaged files normal, DISM or System Update Readiness Tool can fix the problem itself operating system and create conditions for the normal execution of the SFC command.

Fixing system files with the SFC command

The SFC command must be run as an administrator. To do this, in Windows 10 or 8.1, right-click on the Start icon and select the Command Prompt (Admin) option. Moreover, in all Windows versions you can search in the Start menu/on home screen according to " command line", right-click on the desired link and select "Run as Administrator".

For full check system type in the command prompt window next command and press :

Do not close the window until the command completes. The process can be quite lengthy. If everything is in order, after the check the message “Protection Windows resources“Windows Resource Protection did not find any integrity violations.”

If you see the message "Windows Resource Protection found corrupt files but was unable to fix some of them", first try booting your system into safe mode. In Windows 10, 8.1 or 8, to do this, hold down the key when selecting the “Restart” option in the shutdown menu to get to the selection screen additional parameters downloads. On Windows 7 and above earlier versions Restart your computer and hold down the key during startup. After booting into safe mode, run the sfc /scannow command again.

Fixing SFC problems with the DISM command

On Windows 10, 8.1, and 8, fix component store corruption that prevents normal operation SFC, you can use the Deployment Image & Servicing Management (DSIM) tool.

To run this tool, open a Command Prompt window as an administrator, type the following command, and click . DISM will check the storage Windows components for damage and will automatically fix any detected problems.

DISM /Online /Cleanup-Image /RestoreHealth

Do not close the Command Prompt window until the process is complete. The verification may take up to 10 minutes. If the progress bar stays at 20% for a long time, don’t worry, this is normal.

If any changes are made as a result of running the DISM command, restart your computer. After that do it again SFC team, and it will be able to replace the damaged files with the correct ones.

In Windows 7 and earlier versions, the DISM command is not available. Instead, you can download from the official website Microsoft Tool checking the system's readiness for an update, which allows you to check the system for problems and try to fix them.

Restoring the system or restoring it to its original state

If problems persist and these tools cannot fix them, you can take more radical measures. System Restore allows you to return Windows to its original state. early state, which will solve the problem if the operating system was still working in that state.

You can also reset Windows to its factory state or reinstall it. In Windows 10, 8.1 and 8, you can use the Computer Restore (Restore) feature, which allows you to return Windows to its original state. After this you will have to reinstall all programs, but user files will not be harmed. In Windows 7 and earlier, you should use a recovery partition created by your computer manufacturer, or simply reinstall Windows from scratch.

If you encounter other errors when running the commands described above, try searching for their description on the Internet. Often the command output contains information about log files that can provide more detailed information about specific problems. And in the end, it is not at all necessary to waste time diagnosing complex problems when you can simply restore factory condition or reinstall Windows.

The commands described above have other capabilities. For example, you can use SFC to check and fix individual system files. And with using DISM can be done quick check system without a patch, or point the utility to a WIM or ESD file containing Windows system files.

Materials

Unstable problem Windows operation 7 is often associated with corruption or deletion of system files, for example, after reinstalling or installing an infected program. This is not the most complex problem- there are many ways to recover data standard means OS or manually. We will consider the simplest and most effective options below.

Rollback to last stable state

By default, in all Windows, protection is active for system partitions. It is responsible for creating special checkpoints containing configuration information and system files of the environment before modifying it - installing applications, drivers and updates. Moreover, restore points are created without such a reason by the system at a certain frequency or by the user himself.

If problems began to appear relatively recently, and you remember the approximate date of their appearance, then The best decision- roll back the OS to the moment when no failures were observed during the operation of the OS.

In a production environment this is very easy to do:

All that remains is to reboot, after which the damaged system files will be replaced with previous working versions.

If Windows won't boot

Even if the damage to system data is so serious that the OS cannot boot on its own, you can use restore points:


The corresponding selection utility will launch control point, which needs to be worked with in the manner described earlier.

If pressing F8 does not open the boot options window, you will only be able to get into the recovery environment if you use the boot/ installation disk.

Using the standard SFC utility

This application checks and repairs basic OS system files. It can also be run on the command line with boot disk, from the window for selecting boot options after pressing F8 and from a running system. The last option is the simplest:


Once the operation is complete, SFC will notify you of the results - the corrupted data should be detected and corrected.

Recovering data manually

Sometimes the methods described above cannot fix the problem. For example, when DirectX update from distributions supplied with various applications, often get lost DLLs. Therefore, always try to update DirectX from the office. Microsoft website, and if trouble has already happened, then if there is new version all DLLs will be updated automatically after installing a fresh component package from the website http://www.microsoft.com/ru-ru/download/confirmation.aspx?id=35.

If there is no new version on the specified page, then any DLL from another source can be transferred to your system yourself. Libraries are stored in the following directories:

  • for Windows 7×32 - in the folder C:\Windows\System32;
  • for Windows 7x64 - in the C:\Windows\SysWOW64 directory.

If, when you launch an application, a window appears informing you that a DLL is missing, and the installer from the Microsoft website reports its presence on your system latest version libraries and does not update components, you can simply use search engine. Find DLLs on the Internet and move them to the specified folders.

Not only DLLs, but also any damaged system files can be extracted from the installation Windows distribution 7. To do this, you just need to know which files are damaged. Often the OS itself informs the user about the absence of a DLL or about an application error, for example, Explorer.exe. You can get the information yourself.

Let's find out what system information is faulty

To do this, you will again need the command line; we have already described how to open it. Write the following command here:

indstr /N:"" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt", where N is the drive letter.

Press Enter, after which sfcdetails.txt will be created on the desktop, which you need to open and carefully review. Its content will be similar to the image below.

Here we see that the Accessibility.dll library is damaged. It is this that you will need to find on the Internet or extract it yourself from the existing Windows 7 distribution to carry out the recovery.

Extracting OS components from the distribution

In addition to the installation disk, you will need a small free application 7-zip. With its help, we will work with the install.wim image located in the sources directory. The order is as follows:


All that remains is to copy them to the desired folder or to a flash drive. You can replace damaged data with them using installation/bootable media or LiveCD.

Hello readers of the blog of the ComService company (Naberezhnye Chelny)!

Recovering Windows 7 or Windows 8/8.1 system files most interesting topic. Especially if the operating system starts to fail, but we don’t have a recovery image and we forgot to turn on system protection so that . In this case, we won’t be able to, we won’t be able to roll back Windows to the created restore point, and we’re also lazy, since it will take the whole day. And right here we have another chance to return Windows to normal condition- try. In this article I will try to fully cover the topic so that we can revive our .

Article structure

1. Recovering system files on a busy system

press Enter and wait for the scan to complete

On virtual machine, from where the above was taken, was, so I was not surprised that system files were found and restored.

3. How to find out the drive letter with Windows installed

If you succeed using the key F8 bring up the window " Additional options download" and select "Troubleshoot computer problems", then we need to find out the drive letter where Windows is installed that was assigned by the recovery environment. This can be done in two ways

1. Call the notepad with the command

Open menu in notepad File and choose Open…

Left click Computer and in front of you there will be disks with letters

You can go to the disk and make sure what and where.

2. Use the utility DISKPART

On the command line enter

diskpart- call the utility for working with disks

list disk- look through the list of disks

select disk- I choose the one I need

detail disk- call up information about this disk

4. Recovering system files manually

If using the sfc utility it was not possible to restore broken files, you need to try to do it manually. In this case, you need to additionally run the command

findstr /c:"" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

and carefully study the file sfcdetails.txt on the desktop.

It should be something similar to the picture below

Once the name of the damaged file is known (Accessibility.dll), I would look for the same one in the distribution and replace it. In this case, naturally you will need to get . And before you boot into Windows and get rights to the files, you can try copying necessary files using notepad launched from the recovery environment (how to do this was written above).

Conclusion

Friends! Everything written above about restoring system files in Windows 7 is also true for. And, I would also apply this command to Windows 8

I haven’t tried this command myself, but if the system doesn’t boot, it certainly won’t get any worse.

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. Damage may be caused by viruses or malfunctions. software, sudden shutdown power supply, errors when editing system libraries, and so on.

As a result, the user may experience various errors when starting 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 check the integrity of Windows 7/10 system files. On this moment There are two main methods for checking and restoring system files - using standard utilities SFC And DISM, launched via the command line or PowerShell console.

The second tool is more powerful and is usually used when SFC is unable to cope with the task or its launch fails with an error. There are also third-party programs designed for these purposes, but they mostly duplicate the functionality of SFC and DISM, providing more convenient access to them by using GUI. In critical cases, when neither SFC nor DISM help, restore the system or its individual components using a previously created backup copy.

Using SFC

SFC utility or otherwise System Files Checker present in all versions of Windows since 2000, and is intended to check the status and restore system files. SFC can take multiple arguments, but in in this case we are only interested in one. Using it, checking and restoring Windows 7/10 system files is done as follows. Launch a command prompt or PowerShell console as an administrator and run the following command:

sfc /scannow

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

To ensure maximum access to the file system, the procedure for repairing damaged Windows system files can be performed in the boot environment. There are several ways to get into the recovery environment, but we offer the most universal one. Boot your 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, use the exit command to close Diskpart and check:

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

Upon completion Windows scan will reboot in normal mode.

DISM utility

How to check the integrity of Windows 7/10 system files if the method described above does not help or if commands are issued various errors? In this case, you can try to resort to more powerful tool– utility DISM. Launch 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 needs to be restored, restore it with the following command:

dism.exe /online /cleanup-image /restorehealth

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

After the completed procedures, you can perform SFC check/scannow and see if the errors continue. If yes, check if you have the Installer service enabled. Windows modules“But in general, it is advisable to do this in advance.

Recovering damaged files manually

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

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

Information about damaged files will be saved to a log file, in our case it is sfc.log to drive D. The contents of the file can be quite large, look for blocks with key phrase“Cannot repair” with the corresponding scan date and time.

The attached screenshot shows that SFC was unable to restore the Asseccbility.dll file. The same log should indicate the path to the unrecoverable file. Copy the original file from another computer and manually replace the damaged one with it. On at this stage Often you have to deal with problems, since the file may be either in use system processes, or the user will not have rights to it.

To obtain rights and replace such files, you can use standard console utilities Takeown with parameter /f And icacls with parameter /grant administrators:f, but there is a simpler and universal method– use any “live disk” with built-in file manager, for example, Dr.Web LiveDisk. If the computer boots, everything is even simpler; just copy the original files to any folder convenient for you on its hard drive.

Edit boot image ISO of the same Dr.Web LiveDisk can be found in UltraISO program by creating a folder in it and copying windows files into 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, go to the target directory of the folder win and replace the damaged ones with them.

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

Using Third Party Applications

Development special programs, which 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 means using a convenient graphical interface. This, for example, is Microsoft DaRT– a boot disk, which is a set of administration tools, which also includes a module for scanning and restoring Windows system files. The procedure for such a check is presented in the screenshots below.

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

In Windows Repair, to start the check, you need to 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 “Service” in the menu on the left and click “System file recovery”. In both cases, the standard SFC console utility will be launched.

Other methods

As for the question of how to recover completely deleted system files, everything should be clear. If the disk size allows, regularly create backups system partition, or at least do not disable system protection, so that if something happens, you can roll back to the previous one.

And the last thing I would like to draw your attention to. If you 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 - collectors very often modify their images, replacing, for example, original icons in libraries and so on. Therefore, before restoring original files, think about whether you really need it if there are no problems with the system.

What to do when for some reason system files have sunk into oblivion and the computer cannot work normally? There is no need to worry, as the situation can be corrected.

Reasons for disappearing system files

It often happens that Windows system files disappear. Their absence interferes with the normal operation of the system or, even worse, prevents Windows from starting. The reasons for this may be different:

  • the system file was deleted by a virus or blocked by an antivirus;
  • accidentally, due to the fault of the computer user himself;
  • due to Windows updates (if updates occur constantly over a long time, they begin to block each other).

Of course you can go to extreme measures and reinstall the system. But this is not a solution if there are working documents saved on the desktop or folders on the system drive that cannot be lost, because after reinstallation they will definitely disappear. Before doing this, you should still try to run Windows 7 files.

How viruses work

It often happens that a virus got on the computer, after which the system file became damaged and was deleted. In this case, you need to look at the antivirus logs. It will indicate how the file was deleted, when and what virus it was infected with.

Sometimes it happens that the antivirus itself blocks important data after updating the OS. In this case, you need to go to the "Quarantine" section of the antivirus and find the missing files, then restore them and add them to White list or change your antivirus program.

Recuva

On Windows 7, system file recovery can be performed third party program, for example, Recuva. It is completely free and easy to use even for those who will be doing it for the first time. Download it and install it. Having launched it, the first thing you need to do is go to advanced mode (the button on the top right), and then select the directory to scan ( Windows folder) and start scanning.

After the system file check is completed, files with multi-colored circles next to them will appear (green - yellow - damaged, red - cannot be recovered). If the check shows that the desired object is in excellent condition, you can easily restore it by selecting the checkbox and clicking on “Restore”.

Let's rollback

A rollback restores the operating system using a checkpoint that was created before the error occurred. The operating algorithm is as follows: Start / All Programs / Accessories / System Tools / System Restore. Select an OS restore point that was created before the loss of important data. We launch a rollback, after which Windows system files and folders will be restored. However installed programs will be deleted afterwards. You can view the estimated losses by clicking on the “Search for affected programs” button.

Troubleshooting

If on Windows 7 restoring system files using third party program is impossible and a rollback cannot be done, you need to scan your computer for damaged and missing data. It will help in this matter

Open it as an administrator. You can do this in several ways:

  1. Start/All Programs/Accessories, right button mouse on cmd (command line) -
  2. Go to the system drive, Windows folder, System32, right mouse button on cmd - “Run as administrator”.
  3. In the Start search, enter cmd and press Shift+Ctrl+Enter.

In the window that appears, write sfc /scannow, after which the Windows 7 system files will be checked for integrity and restored if some of them malfunction.

After recovery, you need to make a point to restore the OS so that next time you can rollback it, rather than restore individual data. The algorithm is as follows: open the “Properties” section in “My Computer”, on the right side select the “System Protection” section. In the “Protection Settings” section on system disk protection must be enabled. If it’s not there, select it, click “Configure” and put a dot next to “Restore system parameters and previous versions files". Choosing a place for disk space(1.5-2 GB is enough). Click OK. Next, click “Create” and give it a name.

Now you can make files on Windows 7.

system file recovery

While loading the OS, you need to constantly press F8 until a list appears and the words “Last good configuration" Click on it, after which the system should start from the moment Windows successfully loaded into last time. If that doesn’t work, select “Troubleshoot computer problems.” In the list, click on “Startup Repair”. Windows 7 system files will begin checking for errors and faulty data, after which we restore them by clicking “Fix and restart”.

Also, if a restore point was previously created, you can return the OS to its previous state using a rollback.

Boot disk

If the operating system does not boot due to data loss, you can return it to normal using a boot disk or flash drive. We insert the disk or flash drive into the computer and reboot it. Further bootable media needs to be prioritized first. You can do it like this:

  1. IN BIOS settings. Go to the BIOS (F2, F11 or del key) and look for Boot Manager. There we set the flash drive or disk drive to first place as a priority. If the flash drive is not displayed, you need to activate USB support in the settings. For each BIOS version these settings look different.
  2. Before starting the OS, press the boot menu key (F8, F11 or F12), after which Boot Manager will appear with a list of drives, from which we select the one we need. If bootable Windows is on a flash drive and it is not displayed, you need to activate USB support in the BIOS settings.

If the desired drive is selected, it will start Windows installation 7. After selecting the language, click “Next”, and then select “System Restore” at the bottom left side. In the window that appears, select “Startup Repair” or “System Restore”. The next steps are already familiar.







2024 gtavrl.ru.