Recover deleted Windows 7 system files. Recover damaged Windows system files using SFC and DISM commands

This article shows the steps by which you can recover damaged Windows system files using the SFC utility

If operating system is unstable and various errors have been noticed in its operation, then to troubleshoot problems you can use the SFC command line utility to restore the integrity of damaged system files.

SFC (System File Checker) - system Windows tool to check and restore system integrity, which scans and checks all protected Windows system files for errors and replaces damaged or missing files with a copy Windows files, located in the WinSxS directory.


How to check and repair damaged system files using the SFC utility

To scan and repair damaged system files, run the following command as an administrator:

Depending on the scan results, you will see one of the following messages:

Protection Windows resources did not detect any integrity violations. This means that no damaged or missing files were found on the system.

Windows Resource Protection cannot perform the requested operation. This message means that an error occurred during scanning. If you encounter this issue, try running the command sfc /scannow

Windows Resource Protection detected corrupted files and successfully repaired them. See CBS.Log WinDir%\Logs\CBS\CBS.log for information. This message appears when the SFC utility was able to correct the problem. Detailed information You can see about the files that were recovered in the log file stored in C:\Windows\Logs\CBS\CBS.log

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 that Windows case Could not fix some files. Again, you can see the list of files in the log file stored in C:\Windows\Logs\CBS\CBS.log. In this case, the user will have to manually replace the missing or corrupted files.

You can also check and restore damaged system files using open as administrator.

How to check and repair damaged system files if the system does not boot

If the operating system does not boot, then you can also use the tool to restore the integrity of damaged system files, since the SFC utility supports offline scanning and recovery of damaged system files.

To do this you will need a (disk) with . Boot from the installation media and on the regional settings selection screen, launch the command line by pressing the key combination Shift + F10

Now you need to find out the letter of the partition on which the Windows operating system that needs to be checked is installed. This must be done because the drive partition letters in the boot environment are often different from those used in the running system.

There are several ways to do this, such as diskpart, wmic or the dir command, but we will use another method.

IN command line run the following command:

In the Notepad window that opens, select from its main menu File - Open...

In the Explorer window, you will see the available sections and the letters assigned to them. In this example, the partition on which the operating system is installed has the letter C. The Explorer and Notepad windows can now be closed.

Knowing the letter of the partition on which the operating system is installed, run the following command at the command line:

sfc /scannow /OFFBOOTDIR=C :\ /OFFWINDIR=C :\Windows

Unstable problem windows work 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 difficult 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 control point selection utility will launch, which you need to work 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 DLLs are often lost from distributions that come with various applications. 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 installation distribution windows 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 flash drive. You can replace damaged data with them using installation/bootable media or LiveCD.

Replacing damaged files with new ones

To load the environment, we will use the same installation drive from which we took the data we needed:


These steps allow you to get into a fully functional explorer. Here you first need to specify that the program displays all file types. This is done below in the drop-down list. Next, all that remains is to transfer the copied files from the flash drive or from another folder to the place of the damaged ones and reboot. In this way, without reinstallation, you can fix problems caused by damaged system data.

recoverit.ru

How to restore windows 7 without reinstalling

To all owners desktop computers or laptops, sooner or later you have to reinstall the OS, be it Windows 7 or any other modification. There are many reasons for damage to the operating system (malware infection, incorrect installation of drivers, accidental deletion of system data, etc.). However, if in system partition The PC (for example, on the desktop) contains information that is important to you; after removing the operating system, it will also be deleted. To prevent this, instead of reinstalling, you can perform a Windows restore.

Ways to restore Windows 7 without reinstalling

The developers of this operating system took care of its reliability, equipping the product with many protective functions, among which the most useful is the recovery procedure. This software tool allows you to restore the functionality of the OS without completely reinstalling it.

There are several ways to initialize the Windows reanimation process:

  • using last known known configuration;
  • using the Chkdsk program;
  • via a restore point;
  • via BISO.

To complete the task you do not have to look for any software or use additional devices.

The only thing you need to prepare is a DVD with Windows 7 OS of the exact build that was installed on your computer. The ideal option is to use the same disk.

Restoring the last good configuration

Every time you exit the system, all the important data necessary for the launch and operation of the operating system is entered into the registry. It is this information that the recovery procedure uses.

To activate it you need:

  1. Remove all additional storage devices from the computer (CDs, DVDs, flash drives, memory cards, floppy disks), and then restart it.
  2. During windows loading hold down the F8 key. This will take you to the Additional Download Methods window.
  3. Select Last Known Good Configuration.

If the system boots after completing the above steps, it is recommended that you important information, saved in the system partition (“My Documents”, drive C, desktop), copy it to another drive. After that, check your PC for malware and, if possible, perform a full system diagnostic.

Using this recovery procedure, you will not be able to recover lost personal data (music, videos, etc.), since it only works with system files. To restore such information, you need to use additional programs.

Restoring Windows using the Chkdsk application

Chkdsk (from the English “check disk”) is a program built into the operating system that searches for damaged system files on the hard drive and restores them.

Another useful property of this tool is diagnosing storage media for mechanical damage to sectors and blocking access to them, thereby speeding up the operation of the system.

There are two ways to initialize Chkdsk:

  • via graphical interface;
  • from the command line.

In the first case it is necessary:


To run Chkdsk from the command line:


After this, the Windows system will be restarted and diagnosed for damage.

Applying a restore point

A restore point is an OS element that stores a copy of system files, drivers and installed programs recorded at a certain time. In Windows, such points are created automatically at regular intervals, as well as after installing and updating programs.

To use a restore point, you need to:


Restoring a Windows system via BIOS

If it is impossible to start the OS, restoring using the methods described above will not work. In this case, you can use the BIOS to resuscitate Windows without reinstalling it.

The procedure will be as follows:


All available methods for restoring a Windows system do not provide a complete guarantee of a successful outcome. Therefore, if one method does not work, you need to use another.

recoverit.ru

Recovering deleted or corrupted Windows XP and Windows 7 system files

There are times when you need to restore damaged or deleted Windows XP system files. System files have every chance of being deleted, corrupted, or replaced with infected files as a result, for example, of viruses. There are frequent cases of defective system files when the computer is turned off incorrectly (as an option, when the lights are turned off) due to errors in file system.

Below you will get the answer to the question: How to restore damaged system files without reinstalling the Operating System.

The method is suitable for cases where it is known which system files will need to be returned.

If the PC stops booting after an incorrect shutdown (power outage, turning off with a button, unplugging the power cord from the outlet), you first need to check HDD for the presence of logical errors.

The recovery process involves copying from the installation windows disk XP required system files. The windows distribution contains all the system files. They are located in the I386 folder. All necessary files on the installation disk are written in compressed form and have an extension of the form .dl_ .ex_, etc.. I.e. the last character is replaced with an underscore.

We will need to unpack the files removed from the system from the windows installation disk into the folder where they should be present. If you do not have a windows distribution, you can download the archive with the I386 folder for the 32-bit version of Windows XP.

To return system files you need to boot from a bootable CD, for example ERD Commander. You can download the disk image here. You can burn a disk image using free program ISO Burner (you can download it from this link)

Let's look at how to unpack system files from a Windows installation disk using the example of restoring the file C:\windows\System32\userinit.exe, which is often replaced with banners blocking Windows. The process of restoring damaged system files from the installation disk is not fundamentally different for other files. The main thing is to know in which folder this or that file is located.

Boot from the ERD Commander disk. Select download ERD Commander 5.0 for windows XP. In the window that appears at the end of the download, select the path to the installed Windows OS and click OK.

Open My Computer. Insert the windows installation CD. From the I386 folder, copy the required system files with the extension dl_ or ex_ to the folder where they should be present in the installed system. For us, this is the USERINIT.EX_ file. Copy USERINIT.EX_ from the I386 folder to the C:\windows\System32\ folder. To achieve the desired result, right-click on the USERINIT.EX_ file and in context menu select Copy to.

In the window that appears, select the path C:\windows\System32 and click OK.

After the file is copied to the system folder, you will need to unpack it. Unpacking system files with the dl_ or ex_ extension from the windows installation disk is done using the expand command. The command syntax is: expand [source file] [target file] To execute the command, you will need to launch the Command Prompt. From the Start menu, select Run. In the window that appears, enter the cmd command and press Enter.

In the command line window, enter the command to unpack our file: expand c:\windows\system32\userinit.ex_ c:\windows\system32\userinit.exe and press Enter.

Unpacking will be completed, as indicated by the text: “c:\windows\system32\userinit.ex_: 11863 bytes expanded to 26624 bytes”. System file recovery was successful. Now you can restart your PC.

Any other windows system file can be restored in the same way.

How to restore corrupted Windows 7 system files without reinstalling the system.

Now let's look at how to restore system files in Windows 7.

We boot from the "ERD-Commander" disk (in the menu on the disk when loading, you need to select the version for Windows 7) Download the disk image here.

In the network settings window, select “Skip” and confirm the reassignment of disks. Next, select the path to the windows system folder.

Launch the MSDaRT recovery tools.

Select "System File Checker" from the menu

Select the item “Scan and request before fixing” - click “Next”

As a result, the process of searching for damaged or deleted Windows 7 system files will begin. It can last about 5 minutes. When the process is completed, a list of damaged or deleted files windows. We tick the files that we want to restore and click “Next”.

The process of restoring Windows 7 system files will begin, after which the recovery results window will appear. Click "Next" and in the next window - "Done".

Keep in mind!

You need to be careful when selecting files to recover, especially when using pirated version, or windows builds.

Perhaps certain system files will be changed in it so that Windows does not ask for activation. The recovery tool may consider these files corrupted and replace them with the original ones, which is why Windows may display a message during its boot process about an unlicensed version of your Operating System. In case of restoring system files after removing the banner, select files to restore from the table below.

Windows system files and the folders in which they should be located:

Here are certain Windows system files, as well as the folders in which they should be located. By the way, if you find a certain file, but in a different folder, most likely it is a virus! (except for the c:\windows\system32\dllcache folder).

File Folder
explorer.exe c:\windows
iexplorer.exe c:\windows
regedit.exe c:\windows
notepad.exe c:\windows
userinit.exe c:\windows\system32
taskmgr.exe c:\windows\system32
taskman.exe c:\windows\system32
cmd.exe c:\windows\system32
logonui.exe c:\windows\system32
winlogon.exe c:\windows\system32

kampc-help.ru

How to restore Windows 7/8/8.1 system files

Hello, friends! 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 recovery points can be created. In this case, we will not be able to restore the system from the image, we will not be able to roll back windows to the created restore point, and we are also too lazy to reinstall the system, since this will take the whole day. And right here we have another chance to return Windows to normal - try to restore system files. In this article I will try to fully cover the topic so that we can revive our computer in any situation.

Recovering system files on a busy system

If our computer somehow turns on, then we do the following (if it doesn’t turn on, see section 2 of this article).

Open the Start menu. In the search field we write “Com”. On the “Command Line” element, click right click mouse and select “Run as administrator“.

In the command line that opens, write:

We are waiting a little...

If your system is fine, you will see the following image.

If your windows was broken, you will see the following.

System files were successfully restored. We reboot and immediately turn on system protection to create restore points so that next time we can simply roll back the state of the computer to a couple of days ago and that’s it.

It happens that when scanning the system, the sfc.exe utility found damaged files, but could not fix them. In this case, I would restore system files in Safe Mode. If in safe mode read the same last point 4 of this article.

If your computer does not boot at all, as discussed at the very beginning of the article, then read the next paragraph.

Recovering system files in the recovery environment

If our computer does not want to boot at all, then we use the recovery environment. You can load into it:

  1. Pressing F8 several times when turning on the computer
  2. Booting from a boot (installation) disk or flash drive

The first option will work if we have a boot partition that the system created when partitioning the disk when we installed the system. Boot partition size:

  • windows 7 - 100 MB.
  • windows 8 - 350 MB.

In any case, try pressing F8 several times during boot. A window should appear with additional download options. Select Troubleshoot computer problems.

In the next window, select the keyboard input method. Select the language in which your administrator password is set (if there is no password, you can immediately click Next >).

Select a user with administrative rights and enter a password if you have one. If there is no password, just click OK.

Select the command line.

If you are unable to enter the recovery environment using the F8 key, you will need to boot from the installation (bootable) flash drive or disk. How to boot from a flash drive - here. You can boot from disk in the same way. Only in this case you need a DVD-RW (drive for reading optical disks) set the download priority to first place.

I like to boot from removable media using boot menu. IN motherboards ASUS it is usually also called by the F8 key.

After booting from a flash drive or disk, I saw the following picture. I choose windows Setup - Installing windows.

Select System Restore.

We wait until all installed windows are found.

We choose the one that does not turn on for us. And here CAREFULLY! We remember the letter that the recovery environment assigned to your system (in the Folder column). I have this D.

Select Command Line.

Enter the command:

sfc /scannow /offbootdir=D:\ /offwindir=D:\windows

Instead of D, you substitute your letter. Press Enter and wait for the scan to complete

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

How to find out the drive letter with windows installed

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

1. Call the notepad with the command

In Notepad, open the File menu and select Open...

On the left, click Computer and in front of you will be disks with letters.

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

2. Use the DISKPART utility

On the command line enter:

diskpart - call the utility for working with disks.

list disk - view the list of disks.

select disk - select the hard drive I need.

detail disk - call up information about this disk.

For windows 8/8.1

If the sfc utility was unable to restore damaged system files, then you need to try to restore the storage of these system files. The place where copies of working system files should be located. As I understand it, it is located at C:\windows\WinSxS. That is, we must first fix the file storage, and then use the “SFC / Scannow” command to restore the windows system files.

Restoring storage using windows update

1. Launch windows PowerShell with administrator rights. To do this, open the Start menu or home screen and click on the “Search” icon. In the search box we write “PowerShell”. Right-click on “Windows PowerShell” and select “Run as administrator” or “Run as administrator”.

2. In the window that opens, write

Dism /Online /Cleanup-Image /RestoreHealth

and wait. If the storage is intact or it was restored using Windows Update, you will see the following picture.

If Image Health State: Healthy - everything is fine. Reboot the computer and try SFC /SCANNOW again.

Restoring storage using an image

If we have problems with Windows Update, then this method will do.

1. Download the original Windows 8/8.1 image of the same bit size as your system. How to find out the bit depth installed system- here.

2. Connect or mount the downloaded image. Right-click on the image and select “Connect” or “Mount”.

3. In the command line with administrator rights, we look at what editions there are in the image with the command

Dism /Get-WimInfo /WimFile:F:\sources\install.wim

I have 2 editions in my image. It’s hard to understand which one I need based on these distinctive signs. Let's use the first one. If it doesn’t work, the second one.

4. Launch Windows PowerShell with administrator rights and set the command

Repair-windowsImage -Online -RestoreHealth -Source F:\sources\install.wim:1

where F is the drive letter to which we connected the image, 1 is the Windows edition number in the image.

Recovering system files manually

If using the sfc utility it was not possible to recover damaged 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"

Findstr/c: ""%Windir%\Logs\CBS\cbs.log>sfcdetails.txt

and carefully examine the sfcdetails.txt file on your desktop or in %windir%\Logs\CBS\.

It should be something similar to the picture below.

After the name of the damaged file is known (Accessibility.dll), we look for it on another computer with the same system as yours. If this is not an option, then I would download the original windows image and install it on the virtual machine. I found the file I needed and copied it to a bootable or installation flash drive. Then, from this installation flash drive, I booted into the recovery environment and launched the command line. From the command line I would open notepad. I opened the menu File > Open - and now I have an almost full-fledged explorer. We copy and replace the working file from the flash drive, reboot and everything should work.

If the option of installing a virtual machine does not suit you, then you can include the install.wim file in the folder. Then go to this folder and copy the necessary files.

1. Create a folder. For example, “Win8.1Pro” in the root of drive D.

2. Copy the install.wim file to the root of drive D.

3. Mount the install.wim file into the created folder.

Dism /Mount-Wim /Index:1 /WimFile:D:\install.wim /MountDir:D:\Win8.1Pro

Go to the created folder and copy the necessary files.

Disable the image

Dism /Unmount-Wim /MountDir:D:\Win8.1Pro /Discard

Conclusion

This is how I will try to restore system files in Windows 7/8/8.1. Write questions and suggestions in the comments. Thank you for sharing the article on in social networks. All the best!

Best regards, Anton Dyachenko

YouPK.ru

How to restore system files in Windows 7

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 hinders normal operation system or even worse - it does not allow Windows to start. 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 restore system files for Windows 7.

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 the white list or change the 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 - excellent condition, 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 the 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 it is impossible to restore system files on Windows 7 using a third-party program and a rollback cannot be done, you need to scan your computer for damaged and missing data. The command line will help in this matter.

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

  1. Start / All Programs / Accessories, right mouse button on cmd (command line) - “Run as administrator”.
  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", with 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 restore system files on Windows 7.

Windows 7 won't boot, system file recovery

While loading the OS, you need to constantly press F8 until the list and the words “Last Known Good Configuration” appear. Click on it, after which the system should start from the moment when Windows successfully booted up the 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. Next, the bootable media needs to be set to first place as a priority. 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. These settings look different for each BIOS version.
  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 selected required drive, 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.

The 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 produces a blue screen, applications crash, or some system functions do not work, the SFC command 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 fails to replace damaged files with normal ones, DISM or System Update Readiness Tool can fix the operating system itself and allow the SFC command to run normally.

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 the Start menu/Start screen for “command prompt,” right-click the link you want, and select “Run as Administrator.”

To perform a full system scan, enter the following command in the command prompt window and press :

Do not close the window until the command completes. The process can be quite lengthy. If everything is in order, at the end of the scan the message “Windows Resource Protection did not find any integrity violations” will appear.

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. In Windows 7 and 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

In Windows 10, 8.1, and 8, you can use the Deployment Image & Servicing Management (DSIM) tool to fix component store corruption that is preventing SFC from working properly.

To run this tool, open a Command Prompt window as an administrator, type the following command, and click . DISM will check the Windows Component Store for corruption and automatically fix any problems found.

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. Once done, run the SFC command again and it will be able to replace the corrupted 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 correct them, more drastic measures can be taken. The System Restore tool allows you to return Windows to an earlier 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 function () which allows you to return Windows to original state. After this, you will have to reinstall all programs, but user files will not be affected. 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, in which more information can be found. details about certain problems. And in the end, there's no need to waste time diagnosing complex problems when you can simply perform a factory reset 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 systems without fixing or point the utility to WIM file or ESD containing Windows system files.

Materials

Hello, friends! Restoring system files in Windows 7 or Windows 8/8.1 is an 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 recovery points can be created. In this case, we will not be able to restore the system from the image, we will not be able to roll back Windows to the created restore point, and we are also too lazy to reinstall the system, since this will take the whole day. And right here we have another chance to return Windows to normal - try to restore system files. In this article I will try to fully cover the topic so that we can revive our computer in any situation.

In the command line that opens, write:

sfc /scannow

We are waiting a little...

If your system is fine, you will see the following image.

If your Windows was broken, you will see the following.

System files were successfully restored. We reboot and immediately turn on system protection to create restore points so that next time we can simply roll back the state of the computer to a couple of days ago and that’s it.

It happens that when scanning the system, the sfc.exe utility found damaged files, but could not fix them. In this case, I would restore system files in Safe Mode. If in safe mode the same thing, read the last of this article.

If you are unable to enter the recovery environment using the F8 key, you will need to boot from the installation (bootable) flash drive or disk. How to boot from a flash drive - . You can boot from disk in the same way. Only in this case you need to put the DVD-RW (optical disc reader) first in the boot priority.

I like to boot from removable media using the boot menu. On ASUS motherboards it is usually also called by the key F8.

After booting from a flash drive or disk, I saw the following picture. I choose Windows Setup— Installation of Windows.

We choose the one that does not turn on for us. And here CAREFULLY! We remember the letter that the recovery environment assigned to your system (in the Folder column). I have this D.

Enter the command:

sfc /scannow /offbootdir=D:\ /offwindir=D:\windows

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

  1. Using 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 select the hard drive I need.

For Windows 8/8.1

If the sfc utility was unable to restore damaged system files, then you need to try to restore the storage of these system files. The place where copies of working system files should be located. As I understand it, it is located at C:\Windows\WinSxS. That is, we must first fix the file storage, and then use the “SFC / Scannow” command to restore Windows system files.

Recovering storage using Windows Update

  1. Let's launch Windows PowerShell with administrator rights. To do this, open the Start menu or home screen and click on the “Search” icon. In the search box we write “PowerShell”. Right-click on “Windows PowerShell” and select “Run as administrator” or “Run as administrator”.
  2. In the window that opens we write

Dism /Online /Cleanup-Image /RestoreHealth

and wait. If the storage is intact or it was possible to restore it using Windows Update, then you will see the following picture.

If Image Health State: Healthy - everything is fine. Reboot the computer and try SFC /SCANNOW again.

Restoring storage using an image

If we have problems with Windows Update, then this method will do.

  1. Download the original Windows 8/8.1 image of the same bit size as your system. How to find out the bit depth of the installed system - .
  2. Connect or mount the downloaded image. Right-click on the image and select “Connect” or “Mount”.

    In the command line with administrator rights, we look at what editions there are in the image with the command

I have 2 editions in my image. It’s hard to understand which one I need based on these distinctive signs. Let's use the first one. If it doesn’t work, the second one.

  1. Launch Windows PowerShell with administrator rights and issue the command

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

where F is the drive letter to which we connected the image, 1 is the number Windows edition in the image.

Recovering system files manually

If using the sfc utility it was not possible to recover damaged 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

Findstr /c: %Windir%\Logs\CBS\cbs.log>sfcdetails.txt

and carefully study the file sfcdetails.txt on your desktop or %windir%\Logs\CBS\.

It should be something similar to the picture below.

After the name of the damaged file is known (Accessibility.dll), we look for it on another computer with the same system as yours. If this is not an option, then I would download the original Windows image and install it on the virtual machine. I found the file I needed and copied it to a bootable or installation flash drive. Then, from this installation flash drive, I booted into the recovery environment and launched the command line. From the command line I would open notepad. I opened the menu File > Open - and now I have an almost full-fledged explorer. We copy and replace the working file from the flash drive, reboot and everything should work.

If the option of installing a virtual machine does not suit you, then you can include the install.wim file in the folder. Then go to this folder and copy the necessary files.

  1. Let's create a folder. For example, “Win8.1Pro” in the root of drive D.
  2. Copy the install.wim file to the root of drive D.

    Mount the install.wim file into the created folder.

Go to the created folder and copy the necessary files.

Disable the image

Dism /Unmount-Wim /MountDir:D:\Win8.1Pro /Discard

Conclusion

This is how I will try to restore system files in Windows 7/8/8.1. Write questions and suggestions in the comments. Thank you for sharing the article on social networks. All the best!

Best regards, Anton Dyachenko

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

Restoring system files in Windows 7 or Windows 8/8.1 is an 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 - 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

The virtual machine from which the above was taken was installed, 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 call up the “Advanced boot options” window 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 recover damaged 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 obtain rights to the files, you can try to copy the necessary files using Notepad launched from the recovery environment (how to do this was described 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.