home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pcmagazi / 1992 / 13 / inctrl.doc < prev    next >
Text File  |  1992-06-22  |  12KB  |  213 lines

  1. INCTRL.EXE (Version 1.0)
  2. ------------------------------------------------------------------------
  3. Neil Rubenking                                     July 1992 (Utilities)
  4. ------------------------------------------------------------------------
  5.  
  6. INCTRL: 
  7.  
  8.        INCTRL.EXE is an Installation Control program for Windows. It
  9. supervises an application's install utility and writes a report file
  10. of changes made to your system.
  11.  
  12. USING INCTRL
  13. sa
  14.  
  15.      After copying INCTRL.EXE onto your hard disk, you can load it from
  16. the Program Manager, as usual.  Note that the program requires Protected
  17. mode (Windows Standard or Enhanced modes) to operate.
  18.  
  19.      It takes hardly any more effort to install a new Windows application
  20. under INCTRL's supervision than to go through the usual File,Run dialog
  21. under Program Manager.  After bringing up INCTRL, you press one button
  22. to select the install program and press a second to choose a file name
  23. for the output report. Although this documentation discusses INCTRL using
  24. a Windows 3.1 common dialog box for file selection, INCTRL does not require
  25. the COMMDLG Dynamic Link Library. If you don't have COMMDLG.DLL on your
  26. system, INCTRL will simply use a different file selection dialog box.
  27.  
  28.      When you've selected both the install program to be run and a name
  29. for INCTRL's output report, the grayed-out Perform Install button will
  30. be enabled. Press it and INCTRL will take over the installation.
  31.  
  32.      There will be an initial delay as INCTRL memorizes the file layout
  33. of the fixed disks on your system. During this interval a small window
  34. will appear to let you know what's happening.  INCTRL also makes copies
  35. of WIN.INI and SYSTEM.INI at this time, using the names WININI.$$$ and
  36. SYSINI.$$$. After these preparations, INCTRL executes the application's
  37. install program, whose instructions you follow to complete the installation.
  38.  
  39.       After the installation is finished, INCTRL writes a header (which
  40. includes the install file name and the current date and time) for its
  41. output report. It then scans your fixed disks again, checking each file
  42. and directory against the disk contents it memorized earlier. For items
  43. already present on its list, INCTRL compares the current size and date/time
  44. stamp with their previous values. If the stamps are different, INCTRL
  45. marks the file as changed; if not, it removes the file from the list.
  46. Any file not present on the list was obviously added during the
  47. installation, so INCTRL writes its name to the output report.
  48.  
  49.      When this second scan of files and directories is complete, the
  50. only files left from INCTRL's original list will be those that were
  51. changed during the installation or those that were deleted. INCTRL first
  52. flips through the list and reports the name of every item that was marked
  53. as having been changed by the install program. Since every file that
  54. exists on disk was either removed from the list or marked as changed,
  55. any remaining files not marked as changed must have been deleted by
  56. the install program. INCTRL reports these as well, even though it's
  57. unusual for an install program to erase files.
  58.  
  59.      Next, INCTRL compares the saved copy of WIN.INI with the current
  60. WIN.INI. It compiles a list of all the section headings from the old
  61. file and checks it against the section headings from the new file.
  62. If any were added during the installation, it writes their names to the
  63. output report and adds them to the list. INCTRL doesn't report on sections
  64. deleted from WIN.INI. It follows the same procedure in examining
  65. SYSTEM.INI. For each section in the .INI file, INCTRL gets a list of
  66. all the keys (for example, Load) contained in that section of the old
  67. file and reports on any keys that were added in the new file.  Then it
  68. checks the value of each key from the old file against the value of
  69. that key in the new file. If they differ, it writes both the old value
  70. and the new to the output file.
  71.  
  72.      INCTRL will notify you if it finds a duplicate section name or a
  73. duplicate key within a section of an INI file. Normally, the Windows
  74. functions that create the keys don't allow creation of duplicate key
  75. names. A particular exception occurs in the [386Enh] section of
  76. SYSTEM.INI, however, which can have any number of lines with the key
  77. DEVICE. Windows accesses these lines during initialization, without
  78. going through the normal INI-handling functions. INCTRL also treats
  79. this key specially: It simply counts the number of times it occurs in
  80. the old and in the new files and reports if the new file has more
  81. DEVICE lines.
  82.  
  83.      The Figure below shows an abbreviated version of a sample INCTRL
  84. report, which was generated while installing the After Dark screen saver.
  85. That application's install program copied 81 files and 5 directories
  86. to the disk, added a DEVICE= line to SYSTEM.INI, and added the programs
  87. AD.EXE and ADINIT.EXE to the LOAD= line in WIN.INI. There are 8 files
  88. listed as changed, though some of these were left over from an earlier
  89. installation of the program.
  90.  
  91. CONFIGURING INCTRL
  92.  
  93.       By default, INCTRL scans all fixed disks on your system looking
  94. for file and directory changes. If you have one or more disk partitions
  95. that are never used for Windows applications, you can speed INCTRL's
  96. search and reduce its memory requirements by excluding those drives from
  97. examination. To do so, create the ASCII file INCTRL.INI in your Windows
  98. directory with a single section called [Excluded drives]. For each drive
  99. you want to exclude, add a key line such as c=1 to that section. For
  100. example, to exclude drives C: and D:, add the following:
  101.  
  102.                               [Excluded drives]
  103.                               ac=1
  104.                               d=1
  105.  
  106.      Your Windows directory is the default storage location for INCTRL
  107. report files. To make another directory the default, add a [Directories]
  108. section to INCTRL.INI and assign that directory to the ReptDir key, as,
  109. for example:
  110.  
  111.                               [Directories]
  112.                               ReptDir=E:\INCTRL
  113.  
  114. UNINSTALLING WITH INCTRL
  115.  
  116.      Although INCTRL gives you the information you need to uninstall a
  117. program, you must still make intelligent rather than blind use of this
  118. information. Your first step is to delete the program's icon from the
  119. Program Manager group that contains it. If the program has a group all
  120. its own, you can delete the whole group.
  121.  
  122.      Now load the INCTRL report for the application to be removed into
  123. your editor of choice. Look first for entire directories added during
  124. its installation:  you can usually trash these entirely. You should at
  125. least consider the possibility, however, that you may have created data
  126. files in a program-created directory that you're considering deleting.
  127. If you're not sure, try individually deleting the files INCTRL reports
  128. in that directory and examine any that are left over with your favorite
  129. file management program.
  130.  
  131.      You can obviously delete a private INI file if the program installed
  132. one, but most files added to the Windows and the System directories are
  133. intended to be shared with other programs. Thus, it may not be safe to
  134. delete DLL, DRV, FON or EXE files that were installed in either of these
  135. directories. If you want to be sure, rename rather than delete these
  136. possibly-shared files and then restart Windows. Bring up each program
  137. you installed after the program being removed and make sure it doesn't
  138. depend on the renamed files. If this test succeeds, you can delete the
  139. renamed files. If one of your programs refuses to run without a
  140. particular renamed file, rename it back and add that filename to the
  141. INCTRL report for the dependent program.
  142.  
  143.      INCTRL's list of changed files is provided for your information;
  144. most of the time you won't want to delete any of these, for the
  145. installation program either updated them or simply re-copied them on
  146. your disk. Either way, they were there before the installation and should
  147. probably stay after you uninstall the program.
  148.  
  149.      If changes were made to WIN.INI or SYSTEM.INI, bring up the affected
  150. INI file in your favorite ASCII editor. A new section is much like a new
  151. directory--you can probably erase the whole thing. If one or more EXE
  152. files were added to the LOAD= or RUN= lines in the [windows] section of
  153. WIN.INI, remove them. Don't simply restore the "before" value of the
  154. line unless you're sure that other programs have not subsequently been
  155. added to these lines. On the other hand, some programs are associated
  156. with a particular file extension in the [extensions] section. Once the
  157. program is gone, you'll probably  want to delete the WIN.INI line for
  158. that association.
  159.  
  160.      Other INI file changes must be considered on a case-by-case basis.
  161. If you're not sure whether it's safe to delete a line, turn it into a
  162. comment by putting a semicolon at the beginning of the line. Then restart
  163. Windows and run each program that was installed after the program being
  164. removed. If they all work, you can either delete the now-comment lines
  165. or leave them in place as comments. In case you find that one of your
  166. other programs does depend on a particular INI file line, remove the
  167. initial semicolon and add the line to the INCTRL report file for that
  168. program.
  169.  
  170. Neil J. Rubenking is technical editor of PC Magazine.
  171.  
  172. ----------------------------------------------------------------------
  173. Figure: This is an abbreviated version of the report INCTRL produced
  174. after installing the After Dark screen saver.
  175. ----------------------------------------------------------------------
  176.  
  177. An INCTRL Report
  178. INSTALLATION«MDBU» «MDNM»REPORT - B:\INSTALL.EXE
  179.  
  180. Produced by INCTRL, Copyright (c) 1992«MDBU» «MDNM»by«MDBU» «MDNM»Neil«MDBU» «MDNM»J. Rubenking
  181. Wed«MDBU» «MDNM»4/1/1992«MDBU» «MDNM»09:20:29.06
  182.  
  183. ***«MDBU» «MDNM»FILES«MDBU» «MDNM»AND«MDBU» «MDNM»DIRECTORIES«MDBU» «MDNM»ADDED ***
  184. DIR«MDBU» «MDNM»: E:\AFTERDRK
  185. FILE:«MDBU» «MDNM»E:\WINDOWS\AFTERDAR.GRP
  186. FILE:«MDBU» «MDNM»E:\AFTERDRK\AD_LIB.DLL
  187. FILE:«MDBU» «MDNM»E:\AFTERDRK\ADINIT.EXE
  188. FILE:«MDBU» «MDNM»E:\AFTERDRK\AD.EXE
  189. . . .
  190. FILE: E:\AFTERDRK\ADMODULE.SDK\BLANKER\MNAME.RSC
  191. Install«MDBU» «MDNM»program added«MDBU» «MDNM»81«MDBU» «MDNM»files«MDBU» «MDNM»and«MDBU» «MDNM»5«MDBU» «MDNM»directories.
  192.  
  193. ***«MDBU» «MDNM»FILES«MDBU» «MDNM»AND«MDBU» «MDNM»DIRECTORIES«MDBU» «MDNM»CHANGED«MDBU» «MDNM»***
  194. FILE:«MDBU» «MDNM»E:\WINDOWS\AD.CFG
  195. FILE:«MDBU» «MDNM»E:\WINDOWS\ADMODULE.ADS
  196. FILE:«MDBU» «MDNM»E:\WINDOWS\AD_PREFS.INI
  197. FILE:«MDBU» «MDNM»E:\WINDOWS\PROGMAN.INI
  198. FILE:«MDBU» «MDNM»E:\WINDOWS\SYSTEM.ADK
  199. FILE:«MDBU» «MDNM»E:\WINDOWS\SYSTEM.INI
  200. FILE:«MDBU» «MDNM»E:\WINDOWS\WIN.INI
  201. FILE:«MDBU» «MDNM»E:\WINDOWS\WININI.ADK
  202. Install«MDBU» «MDNM»program«MDBU» «MDNM»changed«MDBU» «MDNM»8«MDBU» «MDNM»files«MDBU» «MDNM»and«MDBU» «MDNM»0«MDBU» «MDNM»directories.
  203.  
  204. ***«MDBU» «MDNM»KEYS«MDBU» «MDNM»CHANGED«MDBU» «MDNM»IN«MDBU» «MDNM»WIN.INI«MDBU» «MDNM»SECTION«MDBU» «MDNM»[windows]«MDBU» «MDNM»***
  205. BEFORE: load=
  206. «MDBU» «MDNM»AFTER:«MDBU» «MDNM»load=e:\afterdrk\ad.exe«MDBU» «MDNM»e:\afterdrk\adinit.exe
  207. 1«MDBU» «MDNM»keys«MDBU» «MDNM»changed«MDBU» «MDNM»in«MDBU» «MDNM»WIN.INI«MDBU» «MDNM»section«MDBU» «MDNM»[windows]
  208.  
  209. ***«MDBU» «MDNM»KEYS«MDBU» «MDNM»ADDED«MDBU» «MDNM»TO«MDBU» «MDNM»SYSTEM.INI«MDBU» «MDNM»SECTION«MDBU» «MDNM»[386Enh]«MDBU» «MDNM»***
  210. 1«MDBU» «MDNM»DEVICE=«MDBU» «MDNM»lines«MDBU» «MDNM»added«MDBU» «MDNM»to«MDBU» «MDNM»the«MDBU» «MDNM»[386Enh]«MDBU» «MDNM»section«MDBU» «MDNM»of«MDBU» «MDNM»SYSTEM.INI
  211. 1«MDBU» «MDNM»keys«MDBU» «MDNM»added«MDBU» «MDNM»to«MDBU» «MDNM»SYSTEM.INI«MDBU» «MDNM»section«MDBU» «MDNM»[386Enh]
  212. ----------------------------------------------------------------------
  213.