Novice users of Windows-based computer systems, for the most part, only know firsthand about the cmd.exe executable file and correspondingly launched application, believing that this process belongs to something from the realm of fantasy. But in fact, it is such a powerful tool, the knowledge of the commands of which allows you to fix practically fatal errors of the operating systems themselves, for which standard tools and actions in the Windows OS themselves are completely ineffective.
cmd.exe: what is this service?
But let's start with what kind of service. The file located on the path c: /Windows/System32/cmd.exe is responsible for launching the so-called command line (console), which Windows systems still got from DOS systems that are not currently in use.
But why did the developers need to include such a console in the Windows toolkit? The fact is that even the basic methods of object-oriented programming in C + / C ++ languages, as it turns out, do not allow using absolutely all the system capabilities, in particular, the functions of checking system components, hard drives, services, etc. .
How is the command console used?
There are a lot of commands that can be entered in the console itself, but knowledge of the complete list is not absolutely necessary. At least enough to know only the basic ones. Say, in most cases, you can use disk check commands like chkdsk and scan system files with subsequent recovery (sfc / scannow).
Separately, it is worth mentioning the system recovery tools for online DISM commands. Along the way, we can mention the means of shutting down or forcibly rebooting any shutdown computer system, the means of creating logical partitions or removable media with bootable diskpart entries.
In general, any command entered in the cmd.exe console can additionally use a lot of attributes, which are written with a space and a forward slash (or the right slash). You can see all the information for each separately taken tool by entering the name of the main command with a question mark in the console (again, through a slash). For example, you are interested in the boot recovery string using the Bootrec.exe tool. Enter the original command this way: Bootrec.exe / ?, and then get a list of all the attributes. The same can be used for all other tools.
Cmd.exe error: what is the failure associated with?
As for the problems with launching the command console, in essence, two main ones can be distinguished: either the user does not have sufficient rights to execute the executable file, or the system (and the file itself, the start of the command line) was exposed to a virus. In some cases, it is even possible to replace the original system component with the one that creates the virus code in the process of its activity or even transformation (some viruses can create their own copies, disguising themselves as system processes).
The easiest way to fix the problem
Identifying such threats is quite simple. To do this, refer to the "Task Manager" and see if there is cmd.exe in the process tree. Without calling the console user, such a process should not be there.
If the command line is started, and there are two or more processes (even with the same attributes), use the transition to the file location through the RMB menu (the original file is always located in the System32 directory).
But the service itself can cause crashes when there is a malfunction in Windows at the system level. The first solution to the problem is to call the console as an administrator.
If there is no such item in the Run menu, locate the file through Explorer and run it with the appropriate rights through RMB. You can also use bootable media in which the command line is invoked through a combination of Shift + F10. But here the problem is that it is possible to check, but not the fact that the console will work during normal startup or when loading in safe mode.
Copying a component from the installation media or a file downloaded from the Internet will not work, since initially it must be registered, again, through the console. Here you have to apply only the start from removable media. You can, of course, use a remote registry editor, but itโs best to check the system components with the sfc / scannow command, which fixes most problems with system files.
What if it is a virus?
Now a few words on how to remove cmd.exe if this component is executable malicious code. As mentioned above, after identifying a file in a location other than the original location, you should get rid of it immediately. If you are banned from doing anything, use programs like Unlocker.
If this does not help, run any portable scanner, and in the search result, specify the neutralization or removal of the threat, which corresponds to the name cmd.exe. Sometimes itโs advisable to set the objectโs treatment if the program signals that it is an original file, and it is located in that location, which was mentioned above.
And one more thing: physical removal of the original file is out of the question. Firstly, the operating system itself will not allow this, no matter what methods and tricks you apply. Secondly, the removal of this component can only lead to the fact that the operating system itself will stop working.