Environment Variables

From NoskeWiki
Jump to: navigation, search


Environment variables are something you probably only need to know about if you do coding, and during the process of compiling/installing software you may have to manully set these variables for things to work. Environment variables are a set of dynamic values that can affect the way running processes will behave on a computer.

These variables can be used in scripts and using command lines... and on most platforms the command line to check a variable is:

echo %PATH%

... and to set an environmental variable:

set PATH=%PATH%;C:\Special\a_code_library\;C:\Special\another_code_library\

... although in some cases this new value will only exists for the given console window. Notice entries are all absolute and seperated by a semi-colon (;).

Setting an Environment Variable In Windows

The easiest way to do this is go: Start menu >> Control Panel >> System >> Advanced (tab) >> Environment Variables... then click New and set variable name (eg: WXWIN) and value (eg: C:\wxWidgets2.6.3). TIP: I like to shortcut to the System Properties menu by right-clicking "My Computer".

Another method is to open a DOS command prompt (Start menu >> run >> "cmd") then type:

set WXWIN=C:\wxWidgets2.6.3