Use these commands and fix Windows errors

Windows has a series of tools designed to allow us to check the integrity of our operating system (that is, that everything works as it should) and, if not, apply the necessary solutions.

And it is that we must keep in mind that Microsoft’s own operating system has a series of internal files that we find on hard drives but that we should not touch. These files that we are referring to are very important for the proper functioning of the software that we find on the computer and that Windows itself tries to protect from our hands. But in one way or another, changes are sometimes made to these system files that impair the operation of Windows in general.

Hence precisely, with the passing of the years and the operating system versions, Microsoft itself has taken the determination to include a series of pre-installed tools to solve the problems derived from these files. Precisely about all of this that we want to talk about below in order to solve problems with Microsoft software quickly and easily. But of course, as happens in most cases, this does not mean that the failures that have occurred in the software are going to sort out always with these functions.

These commands are part of the operating system, we do not need to install anything. To make use of them, it is enough to have administrator permissions on the computer that we want to repair, nothing more. To execute them we will make some of an essential tool that allows you to execute commands on the command line as it is called Command Prompt.

DISM

DISM is the English abbreviation for Deployment Image & Servicing Management, a system tool that runs on the command line that we will use to repair corrupt files that prevent the proper functioning of the system. We are talking about a system file checker that we will use to scan and replace those files that are missing or damaged, using a recovery image. Its use will generally be when we need to solve any specific error, determine why the PC does not start correctly or solve performance problems.

The DISM file checker in Windows has three options to repair an image including “CheckHealth”, “ScanHealth” and “RestoreHealth”, running in the same order. These commands allow you to capture and apply Windows images. Let us now see how we can use them.

We open the Command Prompt for which we write cmd in the Start menu search box and select it by running it with administrator rights. Once open, we will write the following command and press Enter:

DISM /Online /Cleanup-Image /CheckHealth DISM /Online /Cleanup-Image /ScanHealth DISM /Online /Cleanup-Image /RestoreHealth

It is important to know that these commands that we have just told you about must be executed in the same order and wait for the previous one to finish before executing the next one. Otherwise the functionality will not solve anything and we could even have operating problems in Windows.

See also  3 secrets that Netflix does not want you to know to continue sharing an account

Next, we are going to talk in more detail about the tasks that each of the three commands described are in charge of.

The first option we are going to use with DISM is CheckHealth, a command tool that is responsible for the administration and maintenance of deployment images by quickly determining if there are corrupt files within a local Windows image. Of course, this option is only in charge of scanning and detecting errors, but it is not in charge of repairing them.

with the tool ScanHealth, we will carry out a more advanced and in-depth analysis of the system in order to determine if the system image has a problem. In order to verify any error with this option we must execute the Command Prompt. We will do this by writing cmd in the Start menu search box and running it with administrator rights. Once executed, this command can take a few minutes to complete the entire scanning process based on the number of files found to be damaged. This is something normal, since it will be in charge of comparing the damaged files with the healthy ones to create a record on our computer. As with the CheckHealth tool, it also does not perform any type of repair on the system.

In the event that problems with the system image have been found, we will use DSIM with the option RestoreHealth. This will be in charge of scanning our system in search of damage and automatically repairing damaged sectors. To do this we must execute this command from the Command Prompt, writing cmd in the Start menu search box and running it with administrator rights. Once we have executed it, this process can be take a long time to finisheven several hours. That is why we should not worry and, above all, carry it out when we are not going to need to use our PC. The waiting time may vary depending on our system and the number of damaged files. Once finished, this image maintenance and management tool connects with Windows Update to proceed to download and replace the damaged files.

In case that Windows Update no longer works, we must use a running Windows installation where DISM can find the source files for repair or a parallel folder on a network share or removable media, such as the Windows DVD. In this case we must instead execute the following command as shown in the attached image:

DISM /Online /Cleanup-Image /RestoreHealth /Source:C:/RepairSource/Windows /LimiAccess

You can replace the C:/RepairSource/Windows placeholder with the location of the repair source.

See also  Put the Windows taskbar on the side you want

CHKDSK

In addition to the previous commands, another one that should not be missing from our repertoire is CHKDSK. This is a command that has been a part of the operating system since the DOS era, and with Windows 10 and Windows 11 it is still an essential command when it comes to analyzing and repairing Windows. This command is also executed from a CMD window in Windows, always with Administrator permissions, and allows us to analyze the entire data structure and repair any damage that can be detected.

And it is that despite the decades that this command has been part of the Microsoft operating system, its utility continues to be extremely high. A good proof of all this is that we can continue to benefit from its functions in both Windows 10 and Windows 11. If we run it without adding any additional parameters, such as the ones we show you below, the application will be in charge of performing a hard drive examination in 3 stages:

In the first stage, analyze the basic structure of the file system. In the second, you will examine filename binding to find errors and fix them, and in the third, you will examine security descriptors. Once the check is finished, it will show a summary with the errors that it could have found during the process.

An example to launch this command and analyze our hard drive is:

chkdsk C: /F /R

C: is the letter of the drive that we want to analyze (we can change it to the hard disk drive that we want), /F indicates that we want the program to fix all the errors it detects, and /R that we want the bad sectors to be detected and, if possible, that the data is also recovered.

In the event that Windows can’t run the check right now (especially if we try to scan the Windows drive), it will ask if we want to scan the drive the next time Windows boots. The same can happen if errors are detected on the drive and cannot be fixed while Windows is running.

In addition to the /f and /r parameters (can be written in upper or lower case), we can also use others that are designed to work with NTFS and FAT and FAT32 drives (these three file systems are proprietary to Microsoft). For drives with the NTFS file system, the operating system used by Windows in the latest versions of Windows, we can use the following parameters:

  • /scan – Runs an online scan of the specified drive. If no drive is specified, the scan will be done on the drive where Windows is installed.
  • /forceofflinefix – We must use together with the /scan parameter to skip all online scans
  • /perf – We must also use it with the /scan parameter and it is responsible for returning a greater number of computer resources to complete the scanning task as quickly as possible, so the computer’s performance may be affected.
  • /spotfix – Allows us to perform a punctual correction in the unit
  • /sdcleanup – It is used together with the /f parameter and is responsible for collecting the elements not used in the unnecessary data of the security descriptor
See also  How to use Google translate directly in Docs

CFS

SFC stands for “System File Checker”. As its name indicates, this is a tool developed by Microsoft that allows us to check the status of system files. Your goal is to detect any damage or error and try to fix it. Unlike the DISM tool that is meant to detect and fix system image issues, SFC takes care of actual Windows 10 installation issues, which we will use once the image has been restored to repair the settings. current. That is why we will use this command to completely restore our PC based on the image implemented by DISM.

If we want to use the SFC command tool to repair the installation of Windows 10 we must open the Command Prompt.

We can see a list with all the parameters that we can find in this tool by executing the following:

CFS ?

This will show us a list with all the information of this command and the different options that we can use for different uses:

  • /scannow: examines all protected operating system files and repairs damaged files. It is the one that we will use by default normally.
  • /verifyonly: it only takes care of scanning all the protected files of the operating system and does not repair the damaged ones.
  • /scanfile: It will take care of scanning the entire protected operating system and then repairing the damaged files with the specific path.
  • /verifyfile: this command checks the files with the full path, but does not repair the damaged ones.
  • /offbootdir: takes care of defining the location of the offline home directory.
  • /offwinder: defines the location of the offline Windows directory.
  • /offlogfile: defines log files and selectively enables logging when using SFC offline.

We can use all of these commands independently or together on the same command line to perform various tasks together. Among all of them, as we have said, the one that we will use most frequently is Scannow for…

Loading Facebook Comments ...
Loading Disqus Comments ...