INIREPAR.TXT Discussion of INIMAINT Repair Capabilities INIMAINT has an item on the Recover menu called Repair. This item gives the user the ability to perform a number of different automatic Repair actions on his INI files. The Online Help documents how the Repair function works, however, it does not detail the rational and algorithms employed by INIMAINT to accomplish the various Repairs. This document is an attempt to do that. Repair Pathnames and Filenames Many, if not all, applications installed under OS/2 store things in various INI files. However, few, if any, applications will remove things from these files when they are deinstalled or the directory structure is changed. This Repair action looks at the Pathname and Filename entries in an INI file, compares them to the current Desktop and either identifies and/or removes entries that are obsolete. The action INIMAINT will take depends on the structure of the individual Key Name or Key Value. There are two possibilities that INIMAINT looks for: 1. A Filename with no preceeding Path information. 2. A full Pathname or Filename combination. Each of the above are handled differently. General Processing applicable to both type of names: Any name that is too short, less than 3 characters, or too long, longer than the maximum path length returned by DosQSysInfo, will not be tested further. Any name which contains non-printable characters will not be tested. Processing of Filename with no Path information: If the beginning of a Key Name or Key Value starts with either X:\ or just \, INIMAINT assumes it is a full Pathname or Filename and processes it as described below. INIMAINT will then check for a Filename of the form *.XXX and ignore them, since this is simply a definition of a type of file extension and not an actual file. INIMAINT will then look for .XXX as the last four characters of the Filename and will search for the following combinations: 1. .EXE using the PATH Environment variable. 2. .CMD using the PATH Environment variable. 3. .DLL using the LIBPATH Environment variable. 4. .AFM using the LIBPATH Environment variable. 5. .PSF using the LIBPATH Environment variable. 6. .HLP using the HELP Environment variable. Processing of full Pathname or Filename: If the name starts with \, then the drive used as the drive for the OS2.INI file, which is the boot drive, will be appended to the start of the name. Any name that starts with A: or B: will be ignored, since they are assumed to be floppy drives and probably do not contain any media. Any trailing semicolons are removed from the name, since there are a number of entries that are valid Filenames except for the semicolons. If the trailing character in the name is a \ or if the name contains any embedded semicolons, it will be tried as a Pathname and made a candidate for removal if it is not found. All other qualifing names will be tried as both a Filename and a Pathname and will be made a candidate for removal if they fail both tests.