home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / private / mpc93mar.zip / WIND.DAT < prev    next >
Text File  |  1993-02-17  |  5KB  |  106 lines

  1.  
  2.  
  3.         Record Changes When Installing Windows Applications
  4.  
  5.         by Steve Libro
  6.         BITS & BYTES
  7.         Newsletter of the South Jersey IBM PC Users' Group
  8.  
  9.         Ever  try to remove a Windows application from your system?   The
  10.         stray  files  scattered through your Windows directory,  the  in-
  11.         scrutable  lines added to your WIN.INI and SYSTEM.INI  files  and
  12.         the  new  subdirectories  on your hard disk make  it  a  daunting
  13.         prospect.   But two batch files that run like  applications  from
  14.         Program Manager give you all you need to root out the last traces
  15.         of an out-of-favor application.  As you install each new applica-
  16.         tion  (including  free demonstration programs), the  batch  files
  17.         create  a text file that lists every change made to  your  system
  18.         files  (WIN.INI,  SYSTEM.INI, AUTOEXEC.BAT, and  CONFIG.SYS)  and
  19.         every file and directory added to your hard disk.
  20.  
  21.         To  store the batch files and text reports, make  a  subdirectory
  22.         called  INSTALL  under  your  Windows  directory  by  typing   MD
  23.         C:\WINDOWS\INSTALL.   To create the first batch file,  enter  the
  24.         following  lines in a text editor such as Notepad.  (Replace  any
  25.         drive  or directory names that differ from your system's  in  the
  26.         appropriate lines.)
  27.  
  28.         @ECHO OFF
  29.         ECHO Recording System Information ......Please wait.
  30.         TYPE C:\WINDOWS\WIN.INI > WIN.OLD
  31.         TYPE C:\WINDOWS\SYSTEM.INI > SYSTEM.OLD
  32.         TYPE C:\AUTOEXEC.BAT > AUTOEXEC.OLD
  33.         TYPE C:\CONFIG.SYS > CONFIG.OLD
  34.         DIR C:\WINDOWS\*.* /A/B/L > WINDIR.OLD
  35.         DIR C:\WINDOWS\SYSTEM\*.* /A/B/L > SYSDIR.OLD
  36.         DIR C:\*.* /A-D /B/L > ROOT.OLD
  37.         TREE C:\/A > TREEC.OLD
  38.         REM ADD NEXT LINE IF YOU INSTALL PROGRAMS ON DRIVE D:
  39.         TREE D:\/A > TREED.OLD
  40.  
  41.         Save  this file as BEFORE.BAT in your new  INSTALL  subdirectory.
  42.         Then  create a Program Manager item in the appropriate  group  to
  43.         run  the batch file by selecting File, New, Program  Item.   Name
  44.         the file "Installation Recorder: Before", and in the command line
  45.         box,  enter C:\WINDOWS\INSTALL\BEFORE.BAT.  Under Working  Direc-
  46.         tory, enter C:\WINDOWS\INSTALL, then click on OK.
  47.  
  48.         Next,  enter the following lines in Notepad and save the file  in
  49.         the INSTALL subdirectory as AFTER.BAT
  50.  
  51.         @ECHO OFF
  52.         ECHO Looking for additions to system .... Please wait.
  53.         ECHO Results will be found in C:\WINDOWS\INSTALL\%1.TXT
  54.         ECHO. > 1%
  55.         ECHO Changes made to hard disk by %1 installation >> %1
  56.         ECHO. >> %1
  57.         ECHO [ WIN.INI ] >> %1
  58.         FC WIN.OLD C:\WINDOWS\WIN.INI >> %1
  59.         ECHO [ SYSTEM.INI ] >> %1
  60.         FC SYSTEM.OLD C:\WINDOWS\SYSTEM.INI >> %1
  61.         ECHO [ AUTOEXEC.BAT ] >> %1
  62.         FC AUTOEXEC.OLD C:\AUTOEXEC.BAT >> %1
  63.         ECHO [ CONFIG.SYS ] >> %1
  64.         FC CONFIG.OLD C:\CONFIG.SYS >> %1
  65.         ECHO [ Files in C:\WINDOWS ] >> %1
  66.         DIR C:\WINDOWS\*.* /A/B/L > WINDIR.NEW
  67.         FC WINDIR.OLD WINDIR.NEW >> %1
  68.         ECHO [ Files in c:\WINDOWS\SYSTEM ] >> %1
  69.         DIR C:\WINDOWS\SYSTEM\*.* /A/B/L/ > SYSDIR.NEW
  70.         FC SYSDIR.OLD SYSDIR.NEW >> %1
  71.         ECHO [ FILES IN C:\] >> %1
  72.         DIR C:\*.* /A-D/B/L > ROOT.NEW
  73.         FC ROOT.OLD ROOT.NEW >> %1
  74.         ECHO [ Directory Tree for C: ] >> %1
  75.         TREE C:\/A > TREEC.NEW
  76.         FC TREEC.OLD TREEC.NEW >> %1
  77.         REM Add next three lines if you installed programs on drive D:
  78.         ECHO [ Directory Tree for D: ] >> %1
  79.         TREE D:\/A > TREED.NEW
  80.         FC TREED.OLD TREED.NEW >> %1
  81.         FIND /v "Comparing files" %1 > %1.txt
  82.         DEL 1
  83.         DEL *.OLD
  84.         DEL *.NEW
  85.         Since  this  batch  file requires a parameter (the  name  of  the
  86.         program  you are installing), you'll need to create a simple  PIF
  87.         file  for  it.  Open the PIF editor, and enter the  full  command
  88.         line C:\WINDOWS\INSTALL\AFTER.BAT.  In the parameters box,  enter
  89.         a  question mark.  Save the new PIF file as AFTER.PIF.  Then  use
  90.         File,  New to create a new program item, and enter  AFTER.PIF  in
  91.         the command line box.  Specify C:\WINDOWS\INSTALL as the  working
  92.         directory,  and   name the item "Installation  Recorder:  After".
  93.         Immediately before you install a new application, run  BEFORE.BAT
  94.         to  record the contents of your hard disk and setup  files.   In-
  95.         stall the applications, then run AFTER.BAT.  Windows will  prompt
  96.         you  for a parameter. Enter the name of the program you just  in-
  97.         stalled (up to eight characters) and click on OK.  AFTER.BAT will
  98.         compare the pre-installation snapshot with your new system infor-
  99.         mation,  and compile a list of the differences in a text file  in
  100.         C:\WINDOWS\INSTALL.   If you decide later to remove the  applica-
  101.         tion, use this file to locate files, directories, and system file
  102.         lines that you'll need to delete.
  103.  
  104.         NOTE: You can alternately download CMPIN.EXE from data library  2
  105.         (Templates/Macros), PC/COMPUTING'S Compuserve forum.
  106.