How to fix corrupted files in windows 7. Check and restore the integrity of Windows system files

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 come in handy when diagnosing a faulty Windows operating system. If the system issues blue screen, applications crash or some system functions do not work, the SFC command can help. Even if nothing is fixed after executing the SFC command, this will provide an opportunity to make sure 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 the corrupted files with normal ones, DISM or the System Upgrade Readiness Tool can fix itself operating system and create conditions for the normal execution of the SFC command.

Correcting 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 Command Prompt (Admin). In addition, on all versions of Windows, you can search the Start menu / Start screen for “ command line", click on the desired link right-click and select Run as Administrator.

For full check system, 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, the scan will display the message "Windows Resource Protection did not find any integrity violations."

If the message "Windows Resource Protection found corrupt files but was unable to fix some of them" appears, first try to boot the system into safe mode... In Windows 10, 8.1 or 8, hold down the key while selecting the "Restart" option in the shutdown menu to get to the advanced boot options selection screen. In Windows 7 and earlier, restart your computer and hold down the key during the startup process. Once booted into safe mode, run the sfc / scannow command again.

Troubleshooting SFC Issues with DISM Command

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

To run this tool, open a Command Prompt window as administrator, enter the following command and click. DISM will check the store Windows components for damage and will automatically repair any problems it finds.

DISM / Online / Cleanup-Image / RestoreHealth

Do not close the Command Prompt window until the process is complete. Verification can take up to 10 minutes. If the progress bar stays at 20% for a long time - do not worry, this is normal.

If any changes are made as a result of the DISM command, restart your computer. After that, run the SFC command again and it can replace the damaged files with the correct ones.

There is no DISM command in Windows 7 and earlier. Alternatively can be downloaded from the official website Microsoft Tool a system update readiness checker, which allows you to check the system for problems and try to fix them.

System restore or reset

If problems persist and these tools cannot fix them, more drastic measures can be taken. The System Restore tool allows you to revert Windows to an earlier state, which will solve the problem if the operating system was still healthy in that state.

You can also return Windows to its factory state or reinstall it. On Windows 10, 8.1, and 8, you can use the restore your computer () feature to return Windows to original state... After that, you will have to reinstall all programs, but the user files will not be damaged. On Windows 7 and earlier, you should use the recovery partition created by your computer manufacturer, or simply reinstall Windows from scratch.

If you get other errors while running the commands above, try searching the Internet for their descriptions. Often the output of a command contains information about the log files (logs), which can be used to find more detailed information about specific problems. And in the end, it is not at all necessary to waste time on diagnosing complex problems, when you can simply restore factory condition or reinstall Windows.

The commands described above have other options as well. For example, SFCs can be used to check and repair individual system files. And using DISM, you can perform a quick system check without fixing, or point the utility to a WIM or ESD file containing system Windows files.

Materials (edit)

The problem is unstable Windows work 7 is often associated with damage 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. by standard means OS or manually. We will consider the simplest and most effective options further.

Rollback to the last stable state

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

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

It is very easy to do this in a production environment:

All that remains is to reboot, after which the damaged system files will be replaced with the 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, there is an opportunity to use restore points:


The corresponding utility for selecting a checkpoint will start, and you need to work with it in the manner described earlier.

If the boot options window does not open when you press F8, then you can get into the recovery environment only when using 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 boot options window after pressing F8 and from a running system. The last option is the simplest:


Upon completion of the operation, the SFC will notify you of the results - the corrupted data must be detected and repaired.

Recovering data manually

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

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 C: \ Windows \ System32 folder;
  • for Windows 7 × 64 - in the C: \ Windows \ SysWOW64 directory.

If, when launching an application, a window appears informing about the absence of any DLL, and the installer from the Microsoft website informs about the presence in your system latest version libraries and does not update components, you can simply use search engine... Search the Internet for DLLs and move them to the specified folders.

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

Find out which system information is faulty

To do this, you will need the command line again, 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 something like the image below.

Here we see that the damaged library is Accessibility.dll. It will be necessary to find it on the Web or independently extract it from the existing Windows 7 distribution kit for recovery.

Extracting OS components from the distribution

In addition to the installation disk, you need a small free app 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 USB flash drive. You can replace corrupted data with them using installation / bootable media or LiveCD.

The task of treating damaged Windows 7 files can be solved in several ways. The easiest option is to roll back the system configuration to one of its previous healthy states. However, this is not always feasible, since the corresponding function can be disabled by the user, and checkpoints can be deleted. In addition, the recovery will differ depending on whether the corrupted data allows the system to boot or not.

Using the command line

If the system files were not damaged enough to prevent the system from booting, you can try to restore its full performance by entering the command line in the standard way:

  1. Press Win and R at the same time, in the Run window, write down the cmd.exe command. The line can also be accessed through the start menu.
  2. Enter sfc / scannow, the scan will run.

When the Run window opens, make sure there is a line under the input field notifying the user to run the command with administrator rights.

Due to the enabled User Account Control, this line may not exist.

Then, after running the sfc / scannow command, you can only see a black window for a moment, which will immediately disappear and the check will not be carried out.

To avoid this, you need to either disable User Account Control in Windows, or run the application as administrator by selecting the appropriate item in context menu by right-clicking on the command line program icon.

If the program does not find an error, a corresponding message will be displayed on the screen upon completion of the check. The utility will also notify about the detection of various kinds of errors, which it will try to fix automatically. Then you only need to reboot the device, after which the problems when accessing the system should disappear.

Sometimes the utility cannot normal mode cope with fixing damaged important files. You need to do the following:


The application will most likely be able to fix the problem and the system files will be fixed.

If you can't log into Windows

Damage significant files may be such that it will be impossible to enter the OS in the usual way. In this case, use the standard environment Windows recovery 7, which you can get into in the way described already through F8 or through the installation disk or boot. You can create the latter in advance by means of the OS itself.

Boot disk may be needed in case of serious damage file system, when without it it is impossible to boot not only the system, but also the environment in which the OS can be restored. The emergency drive is used as follows:

  1. Insert a disc or bootable USB drive, go to the boot menu of the device. For laptops, this is usually the F12 key, which must be pressed immediately after turning on the power. In stationary computers, these can be F8-12 buttons, etc., depending on the motherboard.
  2. In the boot menu window, select the device from which the subsequent boot should be made - an optical disk or a flash drive. If this function is not available for your device, then you will have to change the appropriate BIOS settings.
  3. After selecting the language in the next window, click "Next".
  4. When using the installation disc in the Windows installation window, you need to click on the link at the bottom of the window.
  5. In the options menu, highlight the first item and select the operating system. Surely you have only one installed, and in the list you can select only Windows 7, click "Next".
  6. In the menu that opens, to restore the OS, select the bottom line of the command prompt window.
  7. Here you will need to run the same application, but the command will be longer: sfc / scannow / offbootdir = N: \ / offwindir = D: \ windows, where N is the disk partition on which the Windows system files are written.

The program will scan the system and, if necessary, replace all damaged files, after which the system will work normally.

If you are not using a boot disk, then in the window for choosing boot options that opens after pressing F8 at power on, you will need to select the first troubleshooting option. After that, you will be taken to the parameters window discussed above.

How to find out the letter of the system partition if you forgot it

If you suddenly cannot remember the letter of the partition with installed Windows, you can find it out directly from the command line. For this:

  1. In the command line, write down the line notepad, the standard "Notepad" will open;
  2. Select "File" from the top menu, click on the "Open" command in the list;
  3. In this way, you will be taken to the usual explorer, where in "My Computer" you can see all your disks and partitions.

Partition letters can be recognized even more easily using one of the standard commands:

  1. At the command prompt, type Diskpart.
  2. After pressing Enter, write down the list disk command, the screen will show all physical disks installed on the device, each of which will be assigned a number starting from zero.
  3. Use the select disk command with its serial number to select the required drive. If there is only one physical disk, enter select disk 0;
  4. Next, write down the detail disk - it will be displayed detailed information about the disk and all its partitions.

How to repair damaged files in Windows XP:

There are times when you need restore damaged or deleted Windows XP system files. System files can be deleted, corrupted, or replaced by infected files as a result, for example, of viruses. There are frequent cases of defect in system files when the computer is turned off incorrectly (as an option, when the light is turned off) due to errors in the file system.

Below you will receive an answer to the question: How to recover damaged system files without reinstalling the Operating System.

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

If the PC stopped booting after an incorrect shutdown (power outage, turning off the button, pulling the power cord out of the socket), you first need to check HDD for the presence of logical errors.

The recovery process consists in copying from the installation Windows disk XP required system files. The Windows distribution has all the system files. They are located in the I386 folder. Everything required files on the installation disk are recorded in a compressed form and have an extension of the form.dl_ .ex_, etc. That is. the last character is replaced with an underscore.

We will need to unpack the files deleted from the system from the Windows installation disk into the folder where they should be present. In case you don't have windows distribution, can download the archive with the I386 folder for 32-bit Windows versions XP.

To get the system files back, you need to boot from the bootable CD, for example ERD Commander. ... You can burn a disc image using free software ISO Burner(you can download by this link)

Let's look at how to unpack system files from the Windows installation disk using the example of recovering the C: \ Windows \ System32 \ userinit.exe file, which is often replaced by banners blocking Windows. The process of restoring damaged system files from the installation disk is fundamentally the same for other files. The main thing is to know in which folder a particular file must be located.

Booting from disk ERD Commander... Choosing a 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 dl_ or ex_ extension to the folder where they should be present in installed system... As applied to 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 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 performed using the expand command.

Command syntax: expand [source file] [target file]

To execute the command, you will need to run the command line. 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 performed, 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 is restored in the same way.

How to recover 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 must select the version for Windows 7) Disk image.

In the network settings window, select "Skip", and confirm the reassignment of the disks. Next, choose the path to system folder Windows.

Launch "recovery tools" MSDaRT.

Choose from the menu System File Checker

We press "Dalee "

Selecting an item "Scan and prompt before fixing"- click "Further"

As a result, it will start the process of searching for damaged or deleted Windows 7 system files... It can last for about 5 minutes. When the process is completed, a list of damaged or deleted Windows files... We tick the files that we want to recover and click "Further".

Will begin Windows 7 system file recovery process, after the end of which, a window will appear recovery results... Click "Further" and in the next window - "Ready".

Keep in mind!

You need to be careful when choosing files to recover , especially when using a pirated version, or assembly Windows.

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

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

Specific Windows system files are listed here, 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, it is most likely a virus! (excluding the folder c: \ windows \ system32 \ dllcache).

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

What to do when system files for some reason have sunk into oblivion and the computer cannot function normally? Do not worry, as you can fix the situation.

Reasons for the disappearance of 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, through the fault of the computer user himself;
  • due to Windows updates (if updates occur continuously for a long time, they begin to block each other).

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

Virus work

It often happens that a virus got on the computer, after which the system file was 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 with what virus it was infected.

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 and add them to White list or change antivirus software.

Recuva

On Windows 7, System File Restore can third party program e.g. Recuva. It is completely free and easy to use, even for those who do it for the first time. Download it, install it. Having launched it, the first thing you need to do is go to the advanced mode (the button on the top right), and then select the directory for scanning ( Windows folder) and start scanning.

After the system file check is over, files with colored circles next to it will appear (green - yellow - damaged, red - impossible to recover). If the check showed that the desired object is in excellent condition, you can easily restore it by selecting the checkbox and clicking on "Restore".

Doing a rollback

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

Troubleshooting

If on Windows 7 it is impossible to restore system files using a third-party program and you cannot rollback, you need to scan your computer for damaged and missing data. In this matter, it will help

We open it as an administrator. This can be done in several ways:

  1. Start / All programs / Accessories, right mouse button on cmd (command line) -
  2. We go to the system drive, the Windows folder, System32, right-click on cmd - "Run as administrator".
  3. In the search for Start, enter cmd and press Shift + Ctrl + Enter.

In the window that appears, we write sfc / scannow, after which the check of the Windows 7 system files for integrity and restoration in the event of a malfunction of some of them will begin.

After restoring, you need to make a point to restore the OS, so that next time you can do a rollback, and not 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 this is not the case, select it, click "Configure" and put a dot in front of "Restore system settings and previous versions of files." Choosing a place for disk space(1.5-2 GB is enough). Click OK. Then click “Create”, give 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 inscription “Last good configuration”. Click on it, after which the system should start from the moment when Windows successfully booted the last time. If it didn’t work, select “Computer troubleshooting”. In the list, click on "Startup Recovery". This will start checking the Windows 7 system files 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 rollback.

Boot disk

If, due to the loss of data, the operating system does not boot, you can return it to its normal state using a boot disk or USB flash drive. We insert the disk or USB flash drive into the computer, reboot it. Further bootable media must be put in first place in priority. You can do it like this:

  1. V BIOS settings... We go into the BIOS (key F2, F11 or del) and look for Boot Manager. There we put a USB flash drive or floppy drive in the first place in 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 the Boot Manager will come out with a list of drives, in which we select the desired one. If the bootable "Windows" is on the USB flash drive and it is not displayed, you need to activate USB support in the BIOS settings.

If the desired drive is selected, the Windows installation 7. After choosing the language, click "Next", then at the bottom on the left side, select "System Restore". In the window that appears, select "Startup Restore" or "System Restore". The next steps are already familiar.

Share this