How to fix “Windows cannot find cmd” error

Sometimes it might happen, and all the attempts to get “cmd” working don’t help, either you try to start the program by Start > Run > cmd or Start > Run > cmd.exe or Start > Run > C:\WINDOWS\system32\cmd.exe.

There is the same error message:

“Windows cannot find ‘cmd’. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search.”

You can try special tool designed to fix this kind of problems. Download PC Health Advisor:

Below is a sequence of steps for figuring out the problem and getting “cmd” back:

Check for missing file first

Try to find cmd.exe in the folder Windows\system32. There are hints that will help you to evaluate the problem and to navigate in this article.

  • If it is not here, then the program is just gone from the place when it is supposed to be for being called by the system. Possibly, it was deleted by the antivirus for being infected. Then you need to restore the program as described below and run the full system antivirus scan.
  • If the file is located in a right place, but you can’t start it, then this file might be corrupted or replaced or blocked by malware. Then you need to check first on you registry settings, and if they are correct, then replace cmd.exe with the correct copy.
  • If the file is in a right place and you can start it by double clicking it’s icon in System32 folder, then move down to the section that concerned with PATH variables and malware activities.

windows cannot find cmd error

System Restore

Run System Restore and restore your system to the last date when “cmd” was working. It might require making several steps back; however, keep in mind that going too far back in time might cause the need to reinstall the recently installed software.

Missing Files

If System Restore doesn’t help to solve the problem, then you need to restore cmd.exe and possibly other needed files. Check also on Config.nt, Autoexec.nt, and in WINNT\System32 (for Windows 2000) or \WINDOWS\System32 folders. Their absence also might be a cause of the problem. If these files are missing, try to find copies of these files on your system in the Windows\repair or winnt\repair folders. You can also expand them from the install CD and copy to the needed folder. These files are placed on the CD in \I386 folder and presented as Config.nt, autoexec.nt_, command.co_.

Make the hidden system files viewed in Explorer if needed. Before you reinstall file cmd.exe from the CD, check if it was updated with SP2, or not. If you had installed windows from CD and then install Service Pack2 then the cmd.exe file might be different.

  • For Windows XP the original size of cmd.exe is 375,808 bytes
  • For Windows XP with SP2 installed 388,608 bytes

So, you probably should use SFC utility instead of expanding and installing this file from the Windows CD.

Incorrect PATH variables

If the file is correct, properly placed and can be started by double click, then check Windows PATH variables for the correct way to the folder System32 there might be a problem. Start Control Panel and System. Choose Advanced tab and click Environment Variables. Highlight PATH in the list, then click Edit. Go to the end of the PATH and if the last character is a semi-colon, and there is no “c:\windows\system32\” statement within the path line, then add this line. If the semi-colon is absent, then place it before you add the path statement.

Note: If you have Windows installed on different drive the drive in the path statement should be corrected to the right one. You need to reboot your system after this correction is done and applied. If “cmd” start working after the system reboot, then the problem is gone. If it is not, then check for cmd.exe size and location and for the PATH settings one more time. If the job maid is gone, then there is an active malware and you need to run the antivirus system scan first and lock for the section concerned with viruses. If the file cmd.exe is in place, and the PATH settings are correct, but “cmd” is still not working, then the problem might be caused by the incorrect registry settings. They probably weren’t undone by your antivirus program after it removed the malware that had changed value for “cmd” in your system registry.

Incorrect Registry settings

Open regedit program and navigate to HKLM and HKCU sections. Look for lines like HKCU\Software\Policies\Microsoft\Windows\System and for DWORD named DisableCmd. Make sure that it’s value is set to 0. Save, reboot the system and try to start “cmd”. If it still doesn’t work, then there might be an active malware or the traces left of its presence in your system that are still unresolved and harming.

Check for the malware related problems

If the problem is related to some virus, then it might try to defend itself from easy removal, and even after it was removed by the antivirus, the traces might be present in your system and preventing some common programs from an access and work.

Note: For solving these problems you might need to reboot Windows in the safe mode with “command prompt only” option or to reboot your system from some bootable CD. There might be a problem with EXE files associated to a virus program that are still unaffected after the virus was removed. You need type “copy cmd.exe” and “copy regedt32.exe”

After you reboot your system, your registry editor will be able to start and you can edit your registry. You might need to compare a copy of the HKEY_CLASSES_ROOT\exefile section from some other PC with the one that you have and look for strange inconsistencies.You probably want to compare the settings there to a working PC, or export from a working PC, or just do a system recovery rollback to back before you get infected. The known problem might be caused by the Trojan named “taw.hbe” in User/Local Settings. Remove this file. Go to registry section HKLM\Software\Microsoft\WindowsNT\CurrentVersion\Drivers32, and delete the key with “taw.hbe” placed in. After reboot the “cmd” should start work.

The other known problem might be caused by the aux2 settings like:


If you have this setting s on your system, then the presence of this path is a sign of the infection. The file “naor.mui” might be removed, but the settings in you system registry are still incorrect and might cause the problem. You need find somewhere the correct setting for drivers installed on your computer and change this line accordingly. Then the problem will be resolved.

Again to resolve this issue you can try advanced repair tool PC Health Advisor:

The other known malware is Backdoor.Win32.Hupigon.gpm. It places a hidden autorun in the root of every drive and spread with USB devices. You will need to enable the view of hidden files on your system. Look for autorun.pif and remove it from any place where it is found. Try to protect your USB drives with known protection utilities. After you remove autorun.pif, your “cmd” should start working. There might be many of malware samples of this kind, and the problem of not running “cmd” is more likely related to the malware relate corruptions, so always keep your antivirus working with up to date antivirus bases.

About Author:
Material provided by: Alexey Abalmasov Google

2 thoughts on “How to fix “Windows cannot find cmd” error

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.