TIP: Control your system PATH variabe!

By jobeard
Aug 11, 2012
Post New Reply
  1. Here's the issue:

    When an application asks for program XXX, the system searches the SYSTEM PATH to find it. The sequence of locating XXX goes like this:​
    • The exact location requested (if any), eg ..\thisDir\XXX (this would have to be hard coded in the code itself)
    • The current directory, eg .\xxx (this and the next are the default behaviors)
    • The system Path variable, which is a LIST of directories
    That PATH Variable changes almost with every install, or at least with every Application installed. This gives rise to fraudulent and/or multiple XXX modules on the system.

    Here's the cause:

    Programmers are lazy, just like you & I and when they create an Installer Package,​
    the System Path sometimes needs to include the install location. The easiest method to​
    add the new install path is​

    PATH = $newpath;$PATH​

    I just installed PERL on my Win/7 64bit system and the new path var looks like this:​


    Here's the fix:

    Use an ADMIN login and edit the SYSTEM PATH so as to keep​


    at the beginning of the path and move the new install at least AFTER the system directories:​


    I've been using this technique since Win98 to ensure that system modules can not be overridden (at least by careless path manipulations).

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...