Helping millions of people navigate the world of technology.

3 Ways to Fix ‘Not Recognized as an Internal or External Command’ Error in Windows

Quick Tips
  • Open the Command Prompt as an Administrator to execute the command.
  • If the path of the program you are trying to access is missing from the Environment Variables, then you have to manually add it.
  • If you are trying to access a third-party tool, you will need to switch to the directory where the tool is present and then run commands related to it.

Basic Fixes

  • Run CMD in admin mode: Some commands require an elevated Command Prompt window to run properly. Right-click on the Command Prompt in the Start menu and select Run as Administrator.
  • Check if the app is installed or not: Often, the error can arise because the command you are trying to run belongs to an app that isn’t installed on your PC.
  • Run SFC scan: Run the SFC scan on your PC to fix any corrupted system files

Fix 1: Switch to the Correct Drive and Directory

The Command Prompt may not recognize commands if you are trying to access the program from the wrong directory. Command Prompt lets you access any system tool from any directory. But, if you are trying to access a third-party tool, you will need to switch to the directory where the tool is present and then run commands related to it.

Step 1: Press the Windows key to open the Start menu. Type cmd in the search box and press Enter to open the Command Prompt.

start menu cmd

Step 2: You need to switch to the drive where the tool is present. Let’s say you are trying to access the Vivetool present in a folder in the D drive. So, first, switch to the D drive using this command:

D:
Switch to the Correct Drive and Directory

Step 3: After you are in the correct drive, you need to navigate to the correct folder location. The command structure for that is:

Folder name\folder name\toolname.exe

So, the command to access the tool which is present inside a sub-folder is:

Vivetool\vive\vivetool.exe

Step 4: Close the Command Prompt window.

Switch to the Correct Drive and Directory

Enclose the Command in Quotes

If the command you are trying to run has a path that has spaces in it, you can get a command not recognized error. The simple reason is that the Command Prompt doesn’t understand that you intentionally left a space and if that is the actual folder or file name.

To eliminate this problem, you can encapsulate the complete path and the command inside double quotes. So the command format becomes:

“Full path\tool.exe”

For example, if we want to access the Vivetool located inside a subfolder called ‘vive efr’ in the D drive, our command will become:

“D:\Vivetool\vive efr\vivetool.exe”
Enclose the Command in Quotes

Fix 2: Add the Environment Variable

If the path of the program you are trying to access is missing from the Environment Variables, then you have to manually add it.

Step 1: Press the Windows + R keyboard shortcut to open the Run dialog box. Type the following path and press Enter to open the Advanced System Properties:

%windir%\System32\SystemPropertiesAdvanced.exe
run dialog box

Step 2: Click on the Environment Variables option.

advanced system properties

Step 3: Go to the System Variables section. Find the Path value and double-click on it.

Add the Environment Variable

Step 4: Click on the New button.

Add the Environment Variable 2

Step 5: A new environment variable entry will be created. Click on the Browse button.

Step 6: Navigate to the directory where the program you want to add is present. Select it and click on the OK button.

Add the Environment Variable 4

Step 7: Click on the OK button.

Add the Environment Variable 5

Step 8: Click on OK to close the Environment Variables window.

Add the Environment Variable 6

Step 9: Now, open the Command Prompt and try running the program or any command associated with it.

If you face an issue while accessing the system tools, you need to modify the Path. Firstly, retrace the first four steps of this method, mentioned above, and create a new environment variable entry.

Step 1: Paste the following text into the new entry:

%SystemRoot%\system32
Add the Environment Variable 7

Step 2: Click on the OK button to apply the changes.

Step 3: Close the Environment Variables window.

Add the Environment Variable 7 Copy

Fix 3: Perform a System Restore

System Restore can be a lifesaver when your PC isn’t working like before. If you weren’t facing any issues while running the internal commands, you can use System Restore to revert to an earlier state.

Step 1: Press the Windows key to open the Start menu. Type rstrui in the search bar and press Enter to launch System Restore.

start menu rstrui

Step 2: Click on the Next button.

Use system restore

Step 3: Pick a restore point from the list. Follow the on-screen instructions to apply the restore point on your PC.

Perform a System Restore

Was this helpful?

Thanks for your feedback!

Last updated on 21 July, 2024

Leave a Reply

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

The article above may contain affiliate links which help support Guiding Tech. The content remains unbiased and authentic and will never affect our editorial integrity.