Problems with Environment Variables

If you have already set the desired environment variable as described here and the program still gives an error message, then consider carefully what that message means.

Error message = "Environment variable is not set"

Error message = "Environment variable set to non-existent directory"

Error message = "Environment variable is not properly set"

Environment variable is not set

If the error message states that the environment variable is not set, IT MEANS PRECISELY THAT ! The most likely reason is that your spelling of the variable name is WRONG. To check which environment variables are set, do the following (works for all versions of Windows):
  1. Open a DOS box (or a Command prompt box in Windows NT/2000/XP)
  2. Type the word "Set" (don't use the quotes though)
  3. This will print out all the currently set environment variables. Look in this list carefully. If the variable name is misspelt, then set it again with the correct spelling (see here).
If the name is missing from the list, the ONLY possibilities are :
  1. You never actually set the variable !
  2. For Window 95 users (and possibly Windows 98/ME) you have run out of environment variable space. The default amount of space is ridiculously small, and if you have set several environment variables, this is a distinct possibility. Do the following to increase this : SHELL=C:\WINDOWS\COMMAND.COM /P /E:4096 heading [NonWindowsApp]
  3. For Windows NT/2000/XP users, the variables have not been set for the currently logged user. Please reset them as system variables or make sure each user can access them (see here).

Environment variable set to non-existent directory

For environment variables (like WINGXDIR) which point to a directory, it is vital that the directory(folder) actually exists. Again, check spelling carefully as described above.

Environment variable is not properly set

For environment variables (like PGFONT) which point to a file, it is vital that the file actually exists. Again, check spelling carefully as described above, and check also that the file is actually located where you think it is.