Restoring Windows System Files with WinPE
If your Windows operating system becomes unstable or fails to boot, it could indicate corrupted system files. One of the most effective methods to restore these files is by using the WinPE (Windows Preinstallation Environment). In this guide, we’ll walk you through how to boot with WinPE and restore Windows system files.
What is WinPE?
WinPE (short for Windows Preinstallation Environment) is a minimal version of the Windows operating system used for installation, deployment, and recovery of the main OS. This environment allows you to boot outside of the main OS, providing the capability to diagnose and fix issues that may be unresolvable from within Windows itself.
How to Create a Bootable WinPE Disk
To start, you’ll need a bootable WinPE media. If you don’t have one, follow these steps:
- Download and install the Windows ADK (Assessment and Deployment Kit).
- After installing ADK, open the ADK Command Prompt with administrative privileges.
- Run the command
copype amd64 C:\WinPE
(replaceamd64
withx86
for 32-bit systems). - Write the WinPE image to a USB drive using
MakeWinPEMedia /UFD C:\WinPE E:
, whereE:
is the USB drive letter.
Once you complete these steps, you’ll have a bootable USB with WinPE.
Booting into WinPE and Preparing for Recovery
Now that you have your bootable USB drive, proceed with these steps:
- Connect the USB drive to your computer and restart it.
- Access the Boot Menu using the designated key (such as F2, F12, Esc, or Del depending on your device model).
- Select the option to boot from the USB drive and wait for WinPE to load.
Repairing System Files with WinPE Command Line
After booting into WinPE, open the Command Prompt and use the sfc
(System File Checker) command to repair any corrupted system files:
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
This command checks and restores system files in the specified directory. If system files are corrupted, sfc
will attempt to replace them with their original versions.
Using DISM to Repair the Windows Image
If sfc
doesn’t resolve the issue, you can try using DISM (Deployment Imaging Service and Management Tool):
dism /image:C:\ /cleanup-image /restorehealth
This command will check the integrity of the Windows image and attempt to repair any corrupted files.
Finishing and Verifying the Repair
Once the file check and repairs are complete, reboot your computer without the WinPE disk and try to start Windows normally. If the repair was successful, the OS should boot without any errors.