Patent ID: 7013455

Claim:
A computer implemented method for correcting a path sequence of an environment variable in a data processing system, the path sequence specifying an order for searching a plurality of different directories for locating executable code within the data processing system, the method comprising: monitoring the data processing system for a change effecting the path sequence of the environment variable, wherein the environment variable is enabled and being used by the data processing system to specify the order for searching the plurality of different directories within the data processing system; responsive to detection of the change effecting the path sequence of the environment variable, determining whether any duplicate files exist in any of the directories identified by the path sequence; responsive to determining that duplicate files do exist, automatically altering the path sequence of the environment variable to ensure that a proper executable file is found and executed when selected by one of a user and a running application program, wherein the step of altering the path sequence of the environment variable comprises removing references to all but one of duplicate files in the path sequence of the environment variable; and after altering the path sequence, using the altered path sequence to find and execute the proper executable file.