0% found this document useful (0 votes)
51 views16 pages

OS Repair Commands

Dos commands for os repair

Uploaded by

singhvirat77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views16 pages

OS Repair Commands

Dos commands for os repair

Uploaded by

singhvirat77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

MENU

How to use SFC to repair missing or corrupt Windows files


in CMD
TUTORIAL by Codrut Neagu published on 05/10/2022

When you have problems with your computer, Windows system files may
become corrupted or go missing. This might be caused by sudden power
drops, hardware malfunctions, a hard disk or solid-state drive
approaching its end of life, and so on. If Windows reports that it can’t start
because some of its files are corrupted or missing, you should use the
System File Checker (SFC) tool in the Command Prompt. You should do the
same when Windows starts to blue screen on you with weird corruption
related errors. SFC scans all the Windows system files on your computer,
identifies those that are corrupt or missing, and tries to fix the problems it
finds. Here's how to use it:

Advertisement

UP
MENU

NOTE: This tutorial applies to both Windows 10 and Windows 11, and it
also works for older Microsoft operating systems such as Windows 7.

1. How to use SFC in CMD to repair missing or


corrupted system files when Windows can’t boot
If Windows doesn't load because of missing or corrupt system files, you’ll
have to launch Command Prompt before the boot process. So, first, do
that by following any of the methods in this tutorial: How to open
Command Prompt when Windows doesn't boot (3 ways).
Then, once the Command Prompt is up and running, use the SFC
command with the following three additional parameters:

/scannow - checks the integrity of all protected system files and


attempts to repair them when possible.
/offbootdir - specifies the drive or partition that contains the system
files required for booting Windows; in most cases, this would be the C:
drive.
/offwindir - designates the location of the Windows directory, which,
in most situations, is the C:\Windows folder.

So, if your computer or device uses a standard Windows installation, you


will need to run this command: UP
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows\
MENU

… and then press Enter on your keyboard.

Running the SFC command before Windows boot

What you’re basically telling Windows to do when you run the SFC
command with the parameters we’ve shown you is: scan the Windows
folder located on the boot partition C: and fix any missing or corrupt
system files encountered. Unless you’re using a fast SSD as your boot
drive, now would be a good time for you to arm yourself with some
patience. That’s because running the SFC command will take quite a bit of
time.

UP
MENU

Scanning and repairing missing or corrupt system files

When the process finishes, you are notified whether issues have been
found and resolved or not. For example, if everything is fine with your
system files, you will receive a message saying that “Windows Resource
Protection did not find any integrity violations.” Or, if problems were found
and repaired, System File Checker will tell you that “Windows Resource
Protection found corrupt files and successfully repaired them.”

UP

The system file check finished and no broken files were found
If there are problematic files that can’t be fixed, they are always
MENU
mentioned in a log file named CBS.log. This file is found in the Windows
folder at this exact location:

C:\Windows\Logs\CBS\CBS.log

Skip to the last chapter in this guide to see how to identify the corrupt or
missing files that couldn’t be repaired.

Advertisement

2. How to use SFC in CMD to repair missing or


corrupted system files when Windows can boot
You may also find yourself in a scenario where Windows loads
successfully, but it crashes randomly with a Blue Screen of Death (BSOD)
mentioning corruption errors. If this is the situation you’re in, start the
Command Prompt as an administrator.
Then, in the CMD window, type this command:

sfc /scannow
UP
… and press Enter.
MENU
The /scannow parameter forces the SFC tool to check the integrity of all
system files and attempt to repair any broken or missing files, if possible.

Running SFC in Command Prompt

Again, unless you have a fast SSD in your computer, arm yourself with
some patience. The SFC tool can take a long time to run (at least a couple
of minutes). When it's done, you’ll see a Verification 100% complete
message in the Command Prompt window. If any problems were found
during the scan, you are also informed. In our case, SFC found a couple of
corrupt files but was able to fix them all.

UP
MENU

System File Checker found corrupt system files

System File Checker logs any broken files that can’t be fixed in a file called
CBS.log. You’ll find it at this path on your Windows PC:

C:\Windows\Logs\CBS\CBS.log

Read the next section of this guide to see how to identify the system files
that couldn’t be repaired.

Advertisement

UP
How to analyze the SFC log file (CBS.log)
MENU
Open File Explorer and use it to navigate to the C:\Windows\Logs\CBS
folder. Then, double-click or double-tap on the CBS.log file to open it in
your default text editor app. By default, that should be Notepad.

Results of the SFC CMD command are stored in the CBS log file

Then, either scroll down to the end of the file or use the search function in
your text editor to look for any entries that begin with the text:

Cannot repair member file

Those lines of text will tell you which are the missing or corrupted system
files that SFC couldn’t repair. Then, one of the best things you can do is
use your favorite web browser and search engine to look for information
UP
online about the files mentioned in the CBS.log file. Hopefully, you’ll get
MENU
some ideas on how to fix them.
TIP: You may also want to know how to repair the EFI Bootloader or the
MBR (Master Boot Record) for Windows.

Did the SFC CMD command help you repair Windows?


We hope you’ll never have to use the SFC command to repair Windows
systems files. More often than not, that’s not a nice place to be. However,
if your computer has issues, don't hesitate to consider using the System
File Checker tool. It might come quite in handy if you have to deal with
corrupted or missing system files. If you already encountered such a
situation, did SFC manage to help you? Let us know in the comments
section below.

DISCOVER: PRODUCTIVITY COMMAND PROMPT PROGRAMS RECOMMENDED


SYSTEM RECOVERY TUTORIALS WINDOWS

Subscribe to newsletter. DAILY / WEEKLY


Receive our daily newsletter. You may unsubscribe at any time. For details read the Privacy policy.
Check this box if you agree to receive our emails.

Email

SUBSCRIBE

SEE THE COMMENTS COMMENT

Subscribe:

UP
RELATED ARTICLES
MENU

How to create a System Repair disc in Windows 10 and Windows


11

How to use diskpart, chkdsk, defrag and other disk-related


commands

UP
MENU

Use Startup Repair to fix problems that keep Windows from


loading

20 best Command Prompt (CMD) commands you should know

Advertisement

UP
MENU

POPULAR ARTICLES

5 ways to create and add a new user in Windows 11


TUTORIAL Ciprian Adrian Rusen 12.01.2023

Do you have a new Windows 11 PC, or did you just install the operating system
yourself? You may need to share your computer with others, so you must add a new
user to Windows 11. If that’s the case,...

5 things you can do with the Windows Clock app


UP
MISC Diana Ann Roe 11.01.2023
Introduced with Windows 11, the Clock app is now also included in Windows 10,
replacing the old Alarms & Clock. However, despite its simple name, the Windows
MENU

Clock app brings several improvements and the Focus sessions to help you
concentrate...

How to open an unknown file in Windows


TUTORIAL Codrut Neagu 21.12.2022

We all encountered files with uncommon extensions from time to time. Of course,
many of us know about .docx files, .pdf files, .mp3 files, or .iso files. However, have
you heard about the .eps file extension? How about .dng or...

Advertisement

UP
POPULAR REVIEWS
MENU

Corsair Dominator Platinum RGB DDR5-7200 32GB C34 review


REVIEW Codrut Neagu 09.01.2023

The latest generations of both Intel and AMD desktop processors can take
advantage of faster DDR5 memory. While the prices of such memory kits are still
quite prohibitive, the performance you get from them is undeniable. And, sooner or
later,...

ASUS ROG Ryuo III 240 ARGB review: Efficient AIO liquid cooler!
REVIEW Codrut Neagu 05.01.2023
UP
On October 21st, 2022, ASUS announced the launch of a new series of CPU liquid
coolers, namely the ROG Ryuo III 360 and 240 ARGB AIO coolers. Both models are
MENU

available in black and white editions, and both promise excellent...

ViewSonic ColorPro VP2776 review: A professional monitor!


REVIEW Codrut Neagu 29.12.2022

The choices available for professionals in terms of monitors these days are plenty.
Every monitor manufacturer seems to go out of its way to make the best screen
possible, with as many bundled features. ViewSonic is one of them, and...

SEARCH

Enter search terms

SUBSCRIBE

UP
CATEGORIES
MENU
PRODUCTIVITY

ENTERTAINMENT

SECURITY

SMARTPHONE

SMARTHOME

HEALTH

OTHER
SUBSCRIBE

ABOUT US

NEWSLETTER

TERMS

COOKIES

CONTACT US

Advertisement

UP

You might also like