Tutorials

▷ Command sfc what it is and what it can be used for

Table of contents:

Anonim

Already in many of our tutorials the Windows SFC command has appeared, looking for repair of typical errors in our system such as startup problems, errors that cause a malfunction of our system and others similar. This is why it is worth going a little deeper into this useful native system command and seeing all, or at least the most important features it has.

Index of contents

SFC is a key command to try to recover our system in combination with others like CHKDSK or DISM. We have already tried in an earlier article to explain the CHKDSK command, what it is for and how to use it, so now it will be your turn to do the same with the SFC command. It is worth knowing more in detail what we are doing when it comes time to use it.

What is the SFC command

Coming from the English acronym System File Checker, which is the same as if we say in Spanish System File Checker, it is a native command of the Windows system since the versions of Windows 98 and Windows 2000. Its main function is to search and repair damage to system files, such as registry keys and folders, and files critical to system operation.

We should not confuse this with commands like CHKDSK, which is a utility that is used to analyze, verify and repair the storage units of our computer. Its different purposes, although in the case of system errors, are almost always used together to verify the stability of the hard disk and to recover damaged system files.

Its operation is based on the resource protection functionality of Windows or WRP, through which a kind of data cache is created with the original state of critical system files. SFC can detect changes to critical Windows files and extract a copy of this cache to restore system order. In previous versions of Windows up to the Windows Vista entry, this cache was stored with the name "dllcache" in the path C: \ Windows \ System32. Currently we can find a whole directory where these copies of critical files and registry keys are stored in the path C: \ Windows \ WinSxS.

This protection system will prevent external applications from modifying the files stored here, both dll files and registry keys being necessary for the system.

How to use SFC

To use this command, we will need to open a command terminal, it can either be Command Prompt or PowerShell. In either case, we will need to have administrator permissions in order to run it.

If we open the start menu and write "PowerShell" or "CMD" we can access the terminals where this command can be executed. In the search result, we will have to right click on the option to choose " Run as Administrator ".

If we write in the terminal any of these two commands, and press Enter:

sfc

sfc /?

We will obtain information about this command, as well as the entire list of options, which, located behind the main command, will give us certain functionalities.

At the top we will see its basic syntax, which will be simply the main command, followed by a bar and the option, either lowercase or uppercase.

CFS

These options will be the following:

  • / SCANNOW: main utility to save our asses. It examines the protected system files (those located in C: \ Windows \ WinSxS) and repairs them if possible. / VERIFYONLY: with this option we only verify the integrity of the files. It is useful to check more quickly than using the previous option, if the files are damaged, in which case it will not notify you. / SCANFILE: verifies the integrity of a certain file that we put on it and repairs it, if possible. Its syntax is “/ SCANFILE = " / VERIFYFILE - Verifies the integrity of the file, but does not take repair action. Its syntax is “SFC / VERIFYFILE = " / OFFBOOTDIR: option to repair Windows boot offline. Offline means that we will access a hard disk that is not working, so this option will have to be used from a Windows installation DVD, for example. Its syntax would be: “SFC / OFFBOOTDIR = " / OFFWINDIR: will be the same as above, but for a specific directory on the hard drive. / OFFLOGFILE: repair of a log file under the same conditions as the previous case.

In most cases we will simply use SFC / SCANNOW, since it is the option that encompasses all the others and that performs a complete sweep and subsequent repair of the protected files of the system from within the system itself (online) or with the disk in operation.

Run SFC if we can't access Windows

To do this, the first thing we will have to do is create a bootable DVD or USB or Windows installation.

Visit this tutorial to create a Windows 10 installation USB

The next step is to learn how to configure the BIOS to modify the boot sequence of the computer.

Well visit this tutorial to modify the BIOS boot sequence

Once all this is done, we will have to place the device on our computer and turn it on. We will press any key to start the USB / DVD, and this window should appear.

Then click on " Next " and in the lower area click on " Repair equipment ".

Now we choose the " Troubleshoot " option.

To finish, we will click on " Command Prompt ".

We will open the command prompt to place the command. We must bear in mind that when booting from an installation USB, drive C will not be the partition of the hard disk where the system is installed.

In most cases, it will become drive D:. This can be verified better by trying to access the unit in question. We wrote:

D:

dir

To list the files on the drive, if nothing appears, it is not the drive we are looking for. We are testing until we find it.

In our case we have found it in the E: drive. We have entered, and we have made a dir to see that it effectively contains the typical system files.

Now we can execute the command inside this unit.

This is basically all we have to know about the SFC command to exploit its possibilities when malfunctions appear in our system.

We also recommend:

Did you know the true usefulness of this command? If you need help about other commands, write us in the comments about which one.

Tutorials

Editor's choice

Back to top button