Sometimes you might want to have a command prompt with the specified command such as php available, without specified the full path to the executable and without altering the system or user environment variables.
There are several ways to achieve this, and here is the simple way I liked to use.
- Make a copy of the Command Prompt shortcut in your start menu
- Right click on the new shortcut and click Properties
- In the Shortcut tab, append the following content into the Target text box. Make sure you got a space before /k
/k "set path=%path%;C:\bin\php54"
- Replace the part C:\bin\php54 with the path to the folder where your executable files are located
At the end you will have something like this: