Recover Windows 7 system files without reinstalling. Recovering damaged files manually


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

Using the Command Line

If the system files have not been damaged so much as to prevent the system from booting, you can try to restore it to full functionality by entering the command line in the standard way:

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

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

This line may not appear due to User Account Control being enabled.

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

To avoid this, you must either disable Windows control accounts, or run the application as an administrator by selecting the appropriate item in the context menu when right-clicking on the command line program icon.

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

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


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

If you can't log into Windows

Damage significant files may be such that log into the OS in the usual way will be impossible. In this case, use the standard environment Windows recovery 7, which can be accessed in the manner already described via F8 or via installation disk or boot. You can create the latter in advance using the OS itself.

A 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 storage is used as follows:

  1. After inserting the disk or bootable USB flash drive, go to boot menu devices. For laptops, this is usually the F12 key, which must be pressed immediately after turning on the power. IN desktop computers these may be buttons F8-12, etc., depending on the motherboard.
  2. In the boot menu window, select the device from which the subsequent boot should be made - optical disk or flash drive. If this function is not available for your device, you will have to change the corresponding BIOS settings.
  3. After selecting your language, click “Next” in the next window.
  4. When using the installation disc in the window Windows installations you need to click on the link at the bottom of the window.
  5. In the options menu, highlight the first option and select your operating system. Surely you only have one installed and you can only select Windows 7 from the list, click “Next”.
  6. In the tool menu that opens, to restore the OS, select the bottom line to open the command line 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 Windows system files are stored.

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

If you don't use boot disk, then in the window for selecting boot options that opens after pressing F8 when turning on the power, you will need to select the first troubleshooting item. After this, you will be taken to the options window discussed above.

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

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

  1. IN command line write down the line notepad, the standard “Notepad” will open;
  2. In the menu at the top, select “File”, in the list, click on the “Open” command;
  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 found out even easier 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 the physical disks installed on the device, each of which will be assigned a number starting from zero.
  3. The select disk command with its serial number 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.

Hello, friends! Recovery system files Windows 7 or Windows 8/8.1 most interesting topic. Especially if operating system It’s starting to glitch, but we don’t have a recovery image and we forgot to turn on system protection to create restore points. 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 condition— 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 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 a DVD-RW (drive for reading optical disks) set the download priority to first place.

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”. Click right click mouse over “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 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 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

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, with this installation flash drive booted into the recovery environment, 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 in social networks. All the best!

Best regards, Anton Dyachenko

Applications that do not work or have errors from Windows Store, problems in the desktop part of Windows and instability of the operating system as a whole are often the result of damage to important system files. The easiest way out of a situation where system files are damaged - or to . But such a move requires the presence of the latter - if not in a fresh edition, then at least in some kind. If there is not even at least some kind of recovery point or backup copy, before resorting to a radical solution to the problem in as Windows, you can try to restore the integrity of its system files. Below we will look at 5 ways to do this, provided that the current Windows yet capable of loading. Directly the methods of restoring integrity Windows files Only two will be proposed; the other three are solutions for situations complicated by the need to restore the storage of system components.

1. Restore the integrity of Windows files

To identify missing or damaged important system files and restore them, Windows provides a standard sfc.exe utility that works using the command line. The utility replaces damaged or missing system files with their originals from a special component storage located in the “WinSxS” folder inside the “Windows” directory on drive C. Run the command line as administrator and enter:

Press Enter. After scanning to identify system files that need to be replaced, they will be restored.

But this is only after successful completion of the operation. If the contents of the storage itself are damaged, the operation will end with a message stating that it is impossible to restore some of the system files. In this case, you must first resort to restoring the storage Windows components, and then carry out the operation to restore files to their working directories.

2. Restoring the system component store: DISM

To restore the storage of the original system files, we will use the maintenance utility Windows images– DISM, also working via the command line. During the storage recovery process, the utility uses the Windows Update service and downloads missing or damaged system files from Microsoft servers. Because the presence of the Internet - required condition for a successful operation.

Launch the command line as administrator and enter:

DISM /Online /Cleanup-Image /RestoreHealth

Press Enter. If the operation is successfully attempted, we will see a corresponding notification.

Now we carry out the operation discussed in paragraph 1 of the article.

It may also happen that the operation process will freeze or fail. A notification about an unsuccessful attempt to perform an operation will, in particular, be accompanied by a proposal to indicate the path from where you can get data to restore the system component storage.

We will consider the process of restoring the storage, indicating the source of data acquisition, a little later, in paragraph 4 of the article.

3. Restoring the system component store: PowerShell

You can restore system components alternative way- by using Windows tool PowerShell. This method is similar to the previous one: the Windows Update service is also used to restore the storage. And, accordingly, in this case an Internet connection is also required. The method using PowerShell will take longer than the previous method using the DISM utility, but the process of restoring the storage itself will be carried out more thoroughly.

Run PowerShell as administrator and enter:

Repair-WindowsImage -Online -RestoreHealth

Press Enter. If the system file storage is successfully restored, we will receive a report like the one shown in the screenshot below, where, in particular, the “Image Health State” parameter will be marked as “Healthy”. And this means that the system file storage has been restored. Now it is necessary to carry out the operation described in paragraph 1 of the article.

4. Restoring the system component store: Windows installation disk

You can resort to restoring the Windows component store indicating the source of data if there is no Internet or the two previous methods did not bring positive results. The source from which data is extracted to restore the system component storage is the installation disk of the corresponding version and edition of Windows. This can be physical installation media - a flash drive or disk, or it can be an ISO image with a distribution kit. The latter must be mounted in a virtual drive by calling on it context menu and selecting the “Connect” command.

We connect a flash drive, disk or image, run PowerShell as administrator and enter a command like:

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

In this command, the drive letter of the installation media is subject to substitution. In our example, this is the letter D, and instead of it, in each individual case you need to substitute your own letter of the flash drive, physical or mounted drive, as they appear in Windows Explorer. After entering the command, press Enter.

Based on the results of the operation, as in the previous case, its successful completion will be indicated by the “Healthy” state of the “Image Health State” parameter.

After restoring the storage, we launch the operation discussed in paragraph 1 of the article.

5. Windows 10 update

You can restore the integrity of damaged Windows 10 system files by updating the system using Media utilities Creation Tool. It can be downloaded from the official Microsoft website. Windows 10 update is the longest and at the same time the most reliable way return the operating system to functionality. The process of updating Windows 10 takes approximately the same time as the process of reinstalling it. As part of this process, all damaged system files will be overwritten, user profile data will be saved, installed programs and the entered system settings, and at the output we will get the latest one, with all installed Windows updates 10 Anniversary Update.

Let's launch Media Creation Tool. We accept license terms.

Select “Update this PC now.”

And wait for the update process to complete.

Have a great day!

System File Checker ( 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 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 in the Start menu/on home screen According to the words “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 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. 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, in which more information can be found. details about certain problems. And in the end, it is not at all necessary to waste time on diagnostics complex problems when you can just 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

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 those designed for this purpose third party programs, 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 on the Windows file system, 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, by 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.







2024 gtavrl.ru.