home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac_os2 / inimt30m.zip / INIREPAR.TXT < prev    next >
Text File  |  1994-04-05  |  10KB  |  224 lines

  1.      
  2.                            INIREPAR.TXT
  3.  
  4.                 Discussion of INIMAINT Repair Capabilities
  5.  
  6. INIMAINT has an item on the Recover menu called Repair. This item
  7. gives the user the ability to perform a number of different automatic
  8. Repair actions on his INI files. The On-line Help documents how the
  9. Repair function works, however, it does not detail the rational and
  10. algorithms employed by INIMAINT to accomplish the various Repairs.
  11. This document is an attempt to do that.
  12.  
  13.                       General Information
  14.  
  15. Type of Repair
  16.  
  17. There are four different type of Repair Options.
  18.  
  19. The first one, Report Only, will never make any changes, but will
  20. only list the items that would have been Repaired if the Do Repair
  21. Option had been chosen.
  22.  
  23. The Ask First, will ask the user if he wants each item repaired as
  24. the item is found and determined to be invalid. This can take a very
  25. long time in some cases, since the number of items can become quite
  26. large
  27.  
  28. Do Repair, will automatically remove all invalid items for the
  29. category selected from the appropriate INI file. This should only be
  30. used when the user is sure he wants all invalid items removed.
  31.  
  32. Do Selected can only be used after Report Only, since it requires
  33. that the invalid items be visible in the window. When Execute is
  34. chosen with the Do Selected button checked, then every line in the
  35. window that is selected will be deleted. The only exception to this
  36. is when doing either the Handles or WPS repair and a selected item
  37. has dependent items, such as subdirectories or files, in this case
  38. all dependent items will also be deleted. For example, if a Drive
  39. name itself is selected and Do Selected is chosen, then all entries
  40. for the drive, including all directories and files, that have been
  41. identified as invalid will be deleted.
  42.  
  43. The easiest and safest way to remove invalid items when the user is
  44. not sure if they want everything done is to use the Report Only
  45. option, select the items that they want deleted and then use Do
  46. Selected. This cycle can be repeated over and over until all of the
  47. desired items have been deleted.
  48.  
  49. Window Behavior
  50.  
  51. When and item is deleted for any reason, the word 'Deleted' will
  52. appear after the item in the window. If there are deleted items in
  53. the window and additional items are selected for deletion then the
  54. previously deleted items will be removed from the window. For
  55. example, if the first item in the window is selected and deleted, the
  56. word deleted would appear after the first item. If then the second
  57. items is selected and deleted, the second item will now have the word
  58. deleted after it and the first item will be gone from the window.
  59.  
  60. Options
  61.  
  62. Different users want to handle directories and file that are on
  63. removable, not ready, cdrom and vdisk devices differently. The
  64. Options dialog gives each user the ability to choose how they want
  65. each of these types of situations handled.
  66.  
  67. If Ignore is chosen, then directories and files on the appropriate
  68. type of device will be completely ignored and will never appear in
  69. the repair window.
  70.  
  71. If Report Only is selected, then the information will appear in the
  72. window, but will not get automatically deleted if the Do Repair
  73. option is chosen. The Report Only items can still be deleted by
  74. selecting them and using the Do Selected option.
  75.  
  76. If Auto Repair, which is the default, is chosen, then the items will
  77. be reported and will be automatically deleted if Do Repair is chosen.
  78.  
  79. The Do Not Save Deleted Items button will cause INIMAINT to not save
  80. items that are deleted from an INI file in the Save INI File.
  81. Normally, the user must specify a Save INI File and any entries
  82. removed from any INI file are written to the Save INI File before
  83. they are modified. This allows the user to restore items that he has
  84. deleted if they discover that something has been deleted in error and
  85. no backup is available.
  86.  
  87. The Log to INIREP.LOG is used for diagnostic purposes.
  88.  
  89. List Items versus Repair Items
  90.  
  91. For a number of the repair categories there are multiple choices
  92. available. The is always the Repair choice and it works the same for
  93. each category of Repair. When the Repair choice is used, the only
  94. items that will appear in the window will be items that are invalid
  95. and should be deleted.
  96.  
  97. If the user want to see the valid items for the category or all the
  98. items, then the appropriate List entry can be used to display these
  99. entries. The List Invalid items is the same as the Repair as far as
  100. the contents of the window is concerned, however, it is safer because
  101. it is not possible to select or otherwise delete any of the items.
  102.  
  103.                         Type of Repair
  104.  
  105. Repair Path and Filenames
  106.  
  107. Many, if not all, applications installed under OS/2 store things in
  108. various INI files. However, few, if any, applications will remove
  109. things from these files when they are deinstalled or the directory
  110. structure is changed. This Repair action looks at the Pathname and
  111. Filename entries in an INI file, compares them to the current Desktop
  112. and either identifies and/or removes entries that are obsolete.
  113.  
  114. The action INIMAINT will take depends on the structure of the
  115. individual Key Name or Key Value. There are two possibilities that
  116. INIMAINT looks for:
  117.  
  118.    1. A Filename with no preceding Path information.
  119.    2. A full Pathname or Filename combination.
  120.  
  121. Each of the above are handled differently.
  122.  
  123. General Processing applicable to both type of names:
  124.  
  125. Any name that is too short, less than 3 characters, or too long,
  126. longer than the maximum path length returned by DosQSysInfo, will not
  127. be tested further.
  128.  
  129. Any name which contains non-printable characters will not be tested.
  130.  
  131. Processing of Filename with no Path information:
  132.  
  133. If the beginning of a Key Name or Key Value starts with either X:\ or
  134. just \, INIMAINT assumes it is a full Pathname or Filename and
  135. processes it as described below. INIMAINT will then check for a
  136. Filename of the form *.XXX and ignore them, since this is simply a
  137. definition of a type of file extension and not an actual file.
  138. INIMAINT will then look for .XXX as the last four characters of the
  139. Filename and will search for the following combinations:
  140.    
  141.    1. .EXE using the PATH Environment variable.
  142.    2. .CMD using the PATH Environment variable.
  143.    3. .DLL using the LIBPATH Environment variable.
  144.    4. .HLP using the HELP Environment variable.
  145.  
  146. Processing of full Pathname or Filename:
  147.  
  148. If the name starts with \, then the drive used as the drive for the
  149. OS2.INI file, which is the boot drive, will be appended to the start
  150. of the name.
  151.  
  152. Any name that starts with A: or B: will be ignored, since they are
  153. assumed to be floppy drives and probably do not contain any media.
  154.  
  155. Any trailing semicolons are removed from the name, since there are a
  156. number of entries that are valid Filenames except for the semicolons.
  157.  
  158. If the trailing character in the name is a \ or if the name contains
  159. any embedded semicolons, it will be tried as a Pathname and made a
  160. candidate for removal if it is not found.
  161.  
  162. All other qualifying names will be tried as both a Filename and a
  163. Pathname and will be made a candidate for removal if they fail both
  164. tests.
  165.  
  166. Repair Objects
  167.  
  168. Most, if not all, of the items on the Desktop have been assigned an
  169. Object Number. This number along with the name of the Object is
  170. stored in the OS2.INI file. This Repair entry will display and give
  171. the user the option to delete and Object. It is not currently
  172. possible for INIMAINT to determine which Objects are valid and which
  173. are invalid, so INIMAINT will never identify an Object as invalid.
  174. Great care should be exercised when deleting any of the Objects,
  175. since it is possible to do serious damage to your Desktop.
  176.  
  177. The structure which stores all of the Object cross reference is used
  178. by the WPS Repair code to determine if Objects are valid and to find
  179. the names of valid Objects.
  180.  
  181. Repair Directory/File Handles
  182.  
  183. Many Drives, Directories and Files are assigned Handles. This Handle
  184. information is stored in the OS2SYS.INI file. However, when files are
  185. moved, directories changed or other changes are made to the Desktop,
  186. the Handle information is not updated. This Repair option gives the
  187. user the ability to see the contents of the INI file Handles entry
  188. and Repair any or all of the invalid entries.
  189.  
  190. It is difficult to remove incorrect information manually, even
  191. knowing the internal structure of the entries, because all of the
  192. Handles information is stored in a single INI file entry and a small
  193. mistake in modifying could cause serious Desktop problems and/or
  194. create a non-bootable situation.
  195.  
  196. The structure which stores all of the Handles information is used
  197. by the WPS Repair code to determine if Handles are valid and to find
  198. the names of Directories and Files.
  199.  
  200. Repair WPS Entries
  201.  
  202. WPS stores a variety of Desktop information in the INI files. As with
  203. the Handles information above, obsolete information is not always
  204. removed from the INI files when changes are made to the Desktop. This
  205. Repair option gives the user the ability to see what is in his INI
  206. files and remove those entries that are invalid.
  207.  
  208. As with the Handles above, it is difficult to make these changes
  209. manually because things are stored in a number of different formats
  210. and the cross reference between the random looking numbers and the
  211. actual Objects and Handles would be very tedious to track manually.
  212.  
  213. The Repair WPS Entries uses the Objects and Handles structures. This
  214. means that these structures must be filled before the WPS structure
  215. can be filled. This can take a significant amount of time in
  216. situations where the Desktop is complex and/or there are a large
  217. number of invalid entries.
  218.  
  219. Repair Both WPS and Handles Entries
  220.  
  221. This is simply a combination of Repair WPS Entries and Repair
  222. Directory/File Handles above. It allows the user to do both types of
  223. Repair with a single action.
  224.