How to set up smartphones and PCs. Informational portal
  • home
  • Iron
  • Dism is not an internal or external team. "Filename" is not an internal or external command, executable program or batch file

Dism is not an internal or external team. "Filename" is not an internal or external command, executable program or batch file

Very often novice programmers encounter such an error as "", if you also encountered this error and are looking for a solution, then you have come to the right place. In this article, we'll talk about what causes this error and how to solve it.

So this the error appears when entering a specific php command in the command line... For example, I will try to enter a command that will display the current version of the Laravel framework to me. But, as a result, I get this error:


Fig 1. Error - php is not an internal or external command

I get the same error if I try to run any other php command of the Laravel framework or any other framework.

It also appears if I try, for example, to install composer using the command line.

In general, this error will appear when entering any commands that start with the php keyword. And it appears due to the fact that the PATH environment variable is not configured.

How do I fix this error?

In order to correct this error, it is necessary to write the path to the php.exe application in the value of the PATH environment variable which is inside your local server folder.

So, in order to get to the value of the PATH variable, in windows 7, you need to do the following steps:

1. On the desktop, right-click on the " My computer"or it may just be called" Computer". And select the item" Properties".

Fig 2. Opening computer properties

2. In the window that appears, click on the Additional system parameters item.


Fig 5. PATH environment variable

As a result, another small window will appear, where you need to register the desired path.

Fig 6. The value of the PATH variable

Now, at the beginning of the value of this variable, you need to add the path to the folder on the local server where the application is located php.exe.

You need to find this folder on your local server and register the path to it.

I have a local WAMP server installed in the root of drive D. So, the path to the folder with the php.exe application, I will have this:

D: \ wamp \ bin \ php \ php5.6.25;


Fig 7. Path to php.exe application

Comment! Please note that you must always put a semicolon at the end of the path.

Fig 8. Registering the path to php in the PATH environment variable

Now press the button OK then one more time OK once again OK.

After these steps, we restart the computer.

If you want to use another version of PHP that is available on your server, then write the path to the folder of this version in the value of the environment variable. Or, you can add both paths to both versions.

OK it's all over Now, php.exe application path added to PATH environment variable... The php command on the command line should now work.

I will try again to find out the version of the installed Laravel framework.


Fig 9. Finding out the version of the Laravel framework

And voila, everything works, the error is gone. This concludes this small but very useful article. Now you know, how to solve the error " php is not an internal or external command"and you can continue to enter the required php commands into the command line.

When you try to open any command through a utility window or console, you encounter an error - "Filename" is not an internal or external command, executable program or batch file. The system stubbornly does not open the file for some reason and this fact is very annoying. The reason for this may be one of several options: the path to the file is incorrectly specified and the component is absent in the system at all, that is, it does not exist at the specified address.

The main reasons why the error "is not an internal or external command" appears

As already mentioned, one of the reasons is the incorrect indication of the path to the file being opened. Usually, the path to the file is registered in the variable "Path" in the system, a strict path to the directory in which the necessary files are located must be specified. If there are any errors in the settings when specifying a path in a variable, or when specifying a file name, then the system will generate just such an error - "file name" is not an internal or external command, an executable program.

The first step is to specify the exact path of the "Path" variable to the operating system so that there are no errors when opening the file. To do this, you need to know the location of the folder for sure. For example, let's turn to a program that will later work with an executable file in a specific folder.

The variable "Path" is an operating system variable that is used to find the specified executable objects through the command line or terminal. You can find it in the Windows Control Panel. In newer versions of Windows and other operating systems, manual input is usually not required.

Specifying the correct path in the path variable on Windows 7

To specify the correct path, you need to know the exact location of the file. If the program file to be opened is on the disk in C: \ Program Files \ Java \ jdk 1.8.0.45 \ bin, then this path must be copied and specified in the system variable for subsequent opening.


If the error appears again, try moving the program to the working directories of the disk with the installed operating system, for example / System32. Windows works with this directory more often.

Also, errors occur due to the lack of program components. You can eliminate them by adding the necessary ones. Let's take the "Telnet" component as an example. To enable it, go:


Set variable "Path" in OS Windows 8 / 8.1 / 10

  1. We go to the "Control Panel".
  2. We click the link "Additional system parameters".
  3. Find "Environment Variables". In this section, you need to select "Path". Then "Change", if there is no ready - to create it anew.
  4. In the "Change the system variable" item, specify the value you need and confirm with the "OK" button. We close all other windows by clicking "OK".
  5. Reopen your command prompt or terminal and try typing your request again. Now everything should work properly.
« Filename 'is not an internal or external command, executable program or batch file

In adim 10/08/2017 10/08/2017

45 minutes

P When you try to open any command through a utility window or console, you encounter an error - "Filename" is not an internal or external command, executable program or batch file. The system stubbornly does not open the file for some reason and this fact is very annoying. The reason for this may be one of several options: the path to the file is incorrectly specified and the component is absent in the system at all, that is, it does not exist at the specified address.

System variable error

O The main reasons why the error "is not an internal or external command" appears

As already mentioned, one of the reasons is the incorrect indication of the path to the file being opened. Usually, the path to the file is registered in the variable "Path" in the system, a strict path to the directory in which the necessary files are located must be specified. If there are any errors in the settings when specifying a path in a variable, or when specifying a file name, then the system will generate just such an error - "file name" is not an internal or external command, an executable program.

The first step is to specify the exact path of the "Path" variable to the operating system so that there are no errors when opening the file. To do this, you need to know the location of the folder for sure. For example, let's turn to a program that will later work with an executable file in a specific folder.

The variable "Path" is an operating system variable that is used to find the specified executable objects through the command line or terminal. You can find it in the Windows Control Panel. In newer versions of Windows and other operating systems, manual input is usually not required.

Path system variable

Have showing the correct path in the path variable on Windows 7

To specify the correct path, you need to know the exact location of the file. If the program file to be opened is on the disk in C: \ Program Files \ Java \ jdk 1.8.0.45 \ bin, then this path must be copied and specified in the system variable for subsequent opening.

  1. Next, we need a desktop, hover the mouse over "My Computer" and select "Properties" from the context menu.
  2. Click "Advanced options" on the left and select "Environment Variables".
  3. In the window that opens, look for the "Path" line, click on it and paste the copied path here.
  4. The action must be confirmed with the "Ok" button. It is advisable to restart the computer for the settings to take effect. Open the console and type in the command you want. There should be no mistake.

Command line

If the error appears again, try moving the program to the working directories of the disk with the installed operating system, for example / System32. Windows works with this directory more often.

Also, errors occur due to the lack of program components. You can eliminate them by adding the necessary ones. Let's take the "Telnet" component as an example. To enable it, go:

  • To the "Control Panel".
  • Next, select "Turn components on and off."
  • Select "Telnet Client" from the list, put a tick in front of it and click "OK".
  • The component should work and no more errors should occur.

Windows Telnet component

Z Set variable "Path" in OS Windows 8 / 8.1 / 10

  1. We go to the "Control Panel".
  2. We click the link "Additional system parameters".
  3. Find "Environment Variables". In this section, you need to select "Path". Then "Change", if there is no ready - to create it anew.
  4. In the "Change the system variable" item, specify the value you need and confirm with the "OK" button. We close all other windows by clicking "OK".
  5. Reopen your command prompt or terminal and try typing your request again. Now everything should work properly.

Top related articles