Description

Environment variables are variables maintains by operating system. You can use it at multiple places to make some settings short.

Ways to Set Environment Variables

The easier way to set environment in Windows is through Control Panel -> Advance -> Environment as shown in picture blow. You may need to reboot computer for the variable to obtain new value.

Setup Environment Variables in Control Panel
Setup Environment Variables in Control Panel
New Environment Variables
New Environment Variables

Another way is use command “Set” in command window. You can type “Set/?” for details.

Ways to View Environment Variables

If you know individual environment variable, you can use command window and use “Echo %variable_name%” to see variable’s value. For example, to view variable value of “OpenCV”, you type: echo %OpenCV% (as shown below)

Check Individual Environment Variable with Echo
Check Individual Environment Variable with Echo

If you do not know the variable name, or you just want to see all environment variables, you can type: set (as shown below)

Check Environment Variables with Set
Check Environment Variables with Set