Editing Windows Environment Variables

To install GEMPACK, you may be required to create or alter Windows Environment Variables, such as GPDIR or the PATH. The instructions below show how to do this for Windows 7 or later. For XP the procedure is very similar.

You will probably need Administrator rights to alter your Windows Environment Variables. Before you start, close any command prompt windows (DOS boxes) that are open. Also close other programs that are running, if they are not needed right now. Create a folder C:\TEMP, if that does not exist already.

Windows 7 or later: Follow steps 1 to 8 below.

Windows XP: Start by right-clicking on "My Computer" and select "Properties | Advanced | Environment Variables" and then follow steps 4 to 8 below.

Step1 Step 1: Right-click on the "Computer" or "My Computer" desktop icon
and select "Properties".
Step2 Step 2: Choose advanced system settings.
Step3 Step 3: Select the Advanced Tab and click the Environment Variables button.
This should take you to the Environment Variables screen (pictured next).
Step4 Step 4: To create a new Environment Variable click New
(in either the USER or SYSTEM area).
  • USER environment variable settings apply only to the current user.
  • SYSTEM environment variable settings apply to all users of this PC.
  • If USER and SYSTEM settings conflict (eg, you had two different settings
    for GPDIR) the USER setting dominates.
  • However, the Windows PATH is made by appending the USER PATH
    variable to the SYSTEM PATH variable, so in this case the SYSTEM setting is
    dominant. The PATH variable is a list of folders, separated by semicolons (";").
    When Windows looks for a program (eg, TABLO.EXE), it searches through
    these folders in order.

For GEMPACK purposes we suggest that you create/edit USER settings such as:
But for the PATH, edit the SYSTEM setting.
Eg, you might add "C:\GP;" (don't forget the semicolon!) at the front of the
SYSTEM PATH variable.

To see your current environment settings (with merged USER and
SYSTEM settings), open a command prompt window (DOS box) and type "SET".
Or, type "SET >ENV.TXT" and examine the file ENV.TXT in a text editor.

Step5 Step 5: In this example we set the new USER variable GPDIR to C:\GP.
Press OK when done, to return to the Environment Variables screen.
Step6 Step 6: To alter an existing Environment Variable, select it, then press Edit.
Step7 Step 7: In this example we reset the USER variable TEMP to C:\TEMP.
Press OK when done, to return to the Environment Variables screen.
Step8 Step 8: To finish, click OK to get back to the System Properties Screen,
then OK again to close that. If you have any command prompt windows (DOS
boxes) open, close them. [DOS boxes that were opened before you edited
Environment Variables will not reflect the new settings.]

See also