Windows System PATH Environment Variable

Find Tips and tricks on how to better use the Zeus IDE. Feel free to post your own tips but please do not post bug reports, feature requests or questions here.
Post Reply
Site Admin
Posts: 2523
Joined: Fri Aug 13, 2004 5:10 pm

Windows System PATH Environment Variable

Post by jussij »

If you ever see the following DOS error message in the Zeus capture window:
The name specified is not recognized as an internal or external command, operable program or batch file.
It means the installation directory of the specified executable is not defined in the PATH environment variable.

To fix this either modify the command to fully qualify the location of the executable file by including the installation folder details or alternatively, just add the installation folder to the PATH environment variable.

Environment Variables Dialog
The PATH is an environment variable so to add or edit this environment variable you need to bring up the Environment Variables dialog shown below:
system.png (48.37 KiB) Viewed 14366 times
NOTE: Be careful when editing the PATH as it is used by Windows itself. In the dialog mentioned above, when possible, it is best to make the changes to the User version, leaving the System version alone.

IMPORTANT: Take extreme care when editing this PATH environment variable. Only add to it. Never delete from it.

Accessing the Environment Variables Dialog
Depending on which version of Windows you are running and whether you are using UAC the process of bringing up the Environment Variables dialog will vary as described below.

Using Command Line
Using the Start Run option to run the cmd.exe to open a new command line prompt.

At that command line prompt run this command:

Code: Select all

rundll32 sysdm.cpl,EditEnvironmentVariables
This should bring up the Environment Variables dialog.

NOTE: This is the preferred method as it will only change the environment variables for the current user.

Windows 10
To edit the environment variables just type Environment into the Windows search field and it should find the location of this configuration dialog.

Alternatively, to get to the Environment Variables dialog by hand use the Start Button, Settings Button to bring up the settings, select the System icon, select the About option, select System Info link (top right) and finally select the Advance system setting option.

Windows 7
To get to the Environment Variables dialog use the the Start Button, select the Settings, About menu, click on the System icon and in the resulting dialog select the Advance system setting option.

When running UAC the two options above will not work as they will edit the environment variables of the admin user and not the current user.

In this case you will need to instead access the dialog using the Control Panel, User Accounts as shown below:
path.png (13.87 KiB) Viewed 14366 times
More Details about the PATH
Windows uses the PATH to look for executable and DLL files. An over simplified version of that search logic is Windows searches the current folder and if the file is not found it continues the search using the directories listed in the PATH, searching the directories in the list in a left to right order. This can sometimes cause issues.

Consider the case where the same executable (or dll) is found in multiple locations and those multiple locations are all in the PATH. The executable or dll in the left most location will be the one that is found and used, even though it might not be the correct one.

These types of issues can be resolved using a Dependency Walker.

To see the current PATH, start Zeus, select the Tools, DOS Command Line menu and in the arguments edit field type the following command:

Code: Select all

set PATH
Post Reply