Experiencing frequent crashes, unexpected errors, or the infamous blue screen on your Windows 11 PC can be alarming. These issues are often caused by corrupted or missing system files. Such corruption can result from power outages, malware infections, hardware failures, or unsuccessful updates. Fortunately, Windows 11 provides several tools to help you repair or replace these problematic files and restore your system's stability.
Run DISM Commands to Restore Corrupted Files
The Deployment Image Servicing and Management (DISM) tool is a powerful utility that can scan and repair damaged system files by downloading the necessary replacements from Microsoft's servers. This method is particularly effective when the System File Checker (SFC) fails to fix the issues.
Step 1: Open Command Prompt with administrative privileges. Click the Start menu or search icon, type Command Prompt
or cmd
, and select Run as administrator.
Step 2: In the Command Prompt window, type the following command and press Enter
to initiate a health scan:
DISM /Online /Cleanup-image /Scanhealth
Step 3: After the scan completes, execute the following command to restore any corrupted files:
DISM /Online /Cleanup-Image /RestoreHealth
Allow the process to finish uninterrupted. DISM will connect to Windows Update servers to download and replace damaged files. Once completed, restart your computer to apply the changes.
Note: If you lack an internet connection, you can perform an offline repair using a Windows installation media. Insert the media and adjust the command to specify the source:
DISM /Online /Cleanup-Image /RestoreHealth /Source:F:\Sources\Install.wim:1 /LimitAccess
Replace F:
with the drive letter of your installation media.
Scan for Corrupt Files and Fix Them
The System File Checker (SFC) is a built-in Windows utility that scans for and repairs corrupted system files by replacing them with cached copies.
Step 1: Open Command Prompt as an administrator. Search for Command Prompt
or cmd
, right-click it, and select Run as administrator.
Step 2: Type the following command and press Enter
to start the scan:
sfc /scannow
The SFC tool will scan all protected system files and replace any corrupted ones it finds.
Step 3: Wait for the scan to complete. Depending on your system, this may take some time. Upon completion, you'll receive one of the following messages:
- "Windows Resource Protection did not find any integrity violations."
- "Windows Resource Protection found corrupt files and successfully repaired them."
- "Windows Resource Protection found corrupt files but was unable to fix some of them."
If corrupted files were repaired, restart your computer. If issues remain, consider using the DISM tool as described earlier.
Different Parameters
The SFC command offers various parameters for specific scenarios:
sfc /verifyonly
: Scans for issues without repairing.sfc /scanfile=<file>
: Scans and repairs a specific file.sfc /verifyfile=<file>
: Verifies a specific file without repairing.sfc /offbootdir=<bootdir> /offwindir=<windir>
: Performs offline repair.
View and Analyze System File Checker Logs
SFC generates a log file with details of the scan and any repairs made.
Step 1: Navigate to C:\Windows\Logs\CBS\CBS.log
using File Explorer.
Step 2: Open CBS.log
with Notepad to review the scan results.
You can filter the log for relevant entries using:
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log > "C:\SFClogs\sfclogs.txt"
Run System File Checker (SFC Scan) in Safe Mode
Running SFC in Safe Mode can help if third-party applications are interfering with the repair process.
Step 1: Press Windows+R
, type msconfig
, and press Enter
to open System Configuration.
Step 2: In the Boot tab, check Safe boot, click Apply, and then OK.
Step 3: Restart your computer to boot into Safe Mode.
Step 4: Once in Safe Mode, run the sfc /scannow
command from an elevated Command Prompt.
Step 5: After the scan, revert to normal boot mode by unchecking Safe boot in System Configuration and restarting your PC.
Use Startup Repair to Fix Corrupted Files
If your system struggles to boot due to corrupted files, the Startup Repair tool can diagnose and resolve issues preventing Windows from starting correctly.
Step 1: Open Settings by pressing Windows+I
, navigate to System, and select Recovery.
Step 2: Under Advanced startup, click Restart now.
Step 3: In the Windows Recovery Environment, select Troubleshoot.
Step 4: Choose Advanced options, then select Startup Repair.
Step 5: The tool will attempt to repair any issues affecting the startup process.
Run an SFC Scan Before Windows Starts
When SFC can't repair files while Windows is running, try running it from the recovery environment.
Step 1: Boot into the Windows Recovery Environment. You can force this by interrupting the boot process three times or using installation media.
Step 2: Select Troubleshoot, then Advanced options, and choose Command Prompt.
Step 3: Use the following command to identify the drive letters, as they may differ in recovery mode:
wmic logicaldisk get deviceid, volumename, description
Step 4: Run the SFC scan, replacing X:
and F:\Windows
with your boot and Windows directories:
sfc /scannow /offbootdir=X:\ /offwindir=F:\Windows
Step 5: After the scan, restart your computer.
Perform System Restore
System Restore can roll back your system files and settings to a previous state, potentially resolving corruption issues.
Step 1: Search for Create a restore point and open it.
Step 2: In the System Protection tab, click System Restore.
Step 3: Choose a restore point from before the issues began and click Next.
Step 4: Confirm your selection and click Finish to start the restoration.
Manually Replace the Corrupted Files
As a last resort, you can manually replace corrupted files with healthy copies.
Step 1: Identify the corrupted files from the SFC log located at C:\Windows\Logs\CBS\CBS.log
.
Step 2: Obtain a known good version of the file from another Windows 11 PC or a trusted source.
Step 3: Take ownership of the corrupted file by running:
takeown /f path\filename
Example:
takeown /f C:\Windows\System32\MUI\0409\mscorees.dll
Step 4: Grant full permissions:
icacls path\filename /grant administrators:F
Example:
icacls C:\Windows\System32\MUI\0409\mscorees.dll /grant administrators:F
Step 5: Replace the corrupted file with the healthy copy:
copy source path\filename destination path\filename
Example:
copy C:\Users\User\Downloads\mscorees.dll C:\Windows\System32\MUI\0409\mscorees.dll
Confirm the overwrite when prompted.
Step 6: Verify the integrity of the replaced file:
sfc /verifyfile=C:\Windows\System32\MUI\0409\mscorees.dll
Check for Windows Updates
Updating Windows can fix known issues and vulnerabilities.
Step 1: Open Settings (Windows+I
) and select Windows Update.
Step 2: Click Check for updates and install any available updates.
Step 3: Restart your PC if prompted.
Run System Maintenance Troubleshooter
This troubleshooter can fix common system problems.
Step 1: Open the Control Panel and set the view to Large icons.
Step 2: Select Troubleshooting, then click View all on the left.
Step 3: Choose System Maintenance and run it as an administrator.
Run Check Disk Command (CHKDSK)
CHKDSK scans the file system and fixes logical file system errors.
Step 1: Open Command Prompt as administrator.
Step 2: Execute the command (replace C:
with your drive letter):
chkdsk C: /f /r /x
Step 3: If prompted, type Y
to schedule the scan on the next restart, and then reboot your PC.
Perform a Check on the Drive Using the Error Check Function
You can also check for errors using the drive properties.
Step 1: In File Explorer, right-click the drive and select Properties.
Step 2: Under the Tools tab, click Check.
Step 3: Follow the prompts to scan and fix errors.
Reset Your Windows 11 PC
If persistent issues remain, resetting Windows reinstalls the operating system, potentially fixing deep-seated problems.
Step 1: Open Settings, go to System, and select Recovery.
Step 2: Under Reset this PC, click Reset PC.
Step 3: Choose to either Keep my files or Remove everything.
Step 4: Select Cloud download to obtain the latest version of Windows 11.
Step 5: Follow the instructions and click Reset to begin the process.
By utilizing these methods, you can effectively repair corrupted system files on your Windows 11 PC, ensuring smoother performance and enhanced stability.
Member discussion