Q: WHAT are Environment Variables ?
A: Environment Variables are similar to variables in any programming language. In the case of Windows, or Unix systems they are storing various values to allow for programs and tasks to get necessary OS information, or 'Environment' information. For egexample:
USERPROFILE : users directory within the OS filescfiles.
MAIL : where a usersuser's mail can be found within the OS files.
Q: WHAT is the PATH variable specifically?
A: The PATH variable sets directory paths to look in when commands are executed, both for RUN commands, and for internal calls from programs. This prevents a program from needing to know it'sits install location to call other executable processes.
It looks to the Windows Environment System PATH variable and tests each location for the given executable. ThusThus adding a location to the PATH variable, allows an executable to be called directly.
"When a command is entered in a command shell or a system call is made by a program to execute a program, the system first searches the current working directory and then searches the path, examining each directory from leftAccording to right" -this http://en.wikipedia.org/wiki/PATH_(variable)Wikipedia article:
When a command is entered in a command shell or a system call is made by a program to execute a program, the system first searches the current working directory and then searches the path, examining each directory from left to right
Q: HOW to add a location to the PATH variable ?
A: You need to edit the variable string of the Environment Variables PATH variable to include your executable's location.
One way to do this From(is described https://kb.wisc.edu/cae/page.php?id=24500here):
- Open the Start Menu and right click on Computer. Select Properties.
- Select Advanced system settings.
- In the Advanced tab, select Environment Variables.
- Select EDIT or NEW. (for PATH you most likely want to EDIT).
- Add your location path. eg: C:\wamp\bin\php\php5e.5g.12;:
C:\wamp\bin\php\php5.5.12;
I hope this clarifies some of the confusion. Edits and comments are welcome.