home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
private
/
mpc93mar.zip
/
WIND.DAT
< prev
next >
Wrap
Text File
|
1993-02-17
|
5KB
|
106 lines
Record Changes When Installing Windows Applications
by Steve Libro
BITS & BYTES
Newsletter of the South Jersey IBM PC Users' Group
Ever try to remove a Windows application from your system? The
stray files scattered through your Windows directory, the in-
scrutable lines added to your WIN.INI and SYSTEM.INI files and
the new subdirectories on your hard disk make it a daunting
prospect. But two batch files that run like applications from
Program Manager give you all you need to root out the last traces
of an out-of-favor application. As you install each new applica-
tion (including free demonstration programs), the batch files
create a text file that lists every change made to your system
files (WIN.INI, SYSTEM.INI, AUTOEXEC.BAT, and CONFIG.SYS) and
every file and directory added to your hard disk.
To store the batch files and text reports, make a subdirectory
called INSTALL under your Windows directory by typing MD
C:\WINDOWS\INSTALL. To create the first batch file, enter the
following lines in a text editor such as Notepad. (Replace any
drive or directory names that differ from your system's in the
appropriate lines.)
@ECHO OFF
ECHO Recording System Information ......Please wait.
TYPE C:\WINDOWS\WIN.INI > WIN.OLD
TYPE C:\WINDOWS\SYSTEM.INI > SYSTEM.OLD
TYPE C:\AUTOEXEC.BAT > AUTOEXEC.OLD
TYPE C:\CONFIG.SYS > CONFIG.OLD
DIR C:\WINDOWS\*.* /A/B/L > WINDIR.OLD
DIR C:\WINDOWS\SYSTEM\*.* /A/B/L > SYSDIR.OLD
DIR C:\*.* /A-D /B/L > ROOT.OLD
TREE C:\/A > TREEC.OLD
REM ADD NEXT LINE IF YOU INSTALL PROGRAMS ON DRIVE D:
TREE D:\/A > TREED.OLD
Save this file as BEFORE.BAT in your new INSTALL subdirectory.
Then create a Program Manager item in the appropriate group to
run the batch file by selecting File, New, Program Item. Name
the file "Installation Recorder: Before", and in the command line
box, enter C:\WINDOWS\INSTALL\BEFORE.BAT. Under Working Direc-
tory, enter C:\WINDOWS\INSTALL, then click on OK.
Next, enter the following lines in Notepad and save the file in
the INSTALL subdirectory as AFTER.BAT
@ECHO OFF
ECHO Looking for additions to system .... Please wait.
ECHO Results will be found in C:\WINDOWS\INSTALL\%1.TXT
ECHO. > 1%
ECHO Changes made to hard disk by %1 installation >> %1
ECHO. >> %1
ECHO [ WIN.INI ] >> %1
FC WIN.OLD C:\WINDOWS\WIN.INI >> %1
ECHO [ SYSTEM.INI ] >> %1
FC SYSTEM.OLD C:\WINDOWS\SYSTEM.INI >> %1
ECHO [ AUTOEXEC.BAT ] >> %1
FC AUTOEXEC.OLD C:\AUTOEXEC.BAT >> %1
ECHO [ CONFIG.SYS ] >> %1
FC CONFIG.OLD C:\CONFIG.SYS >> %1
ECHO [ Files in C:\WINDOWS ] >> %1
DIR C:\WINDOWS\*.* /A/B/L > WINDIR.NEW
FC WINDIR.OLD WINDIR.NEW >> %1
ECHO [ Files in c:\WINDOWS\SYSTEM ] >> %1
DIR C:\WINDOWS\SYSTEM\*.* /A/B/L/ > SYSDIR.NEW
FC SYSDIR.OLD SYSDIR.NEW >> %1
ECHO [ FILES IN C:\] >> %1
DIR C:\*.* /A-D/B/L > ROOT.NEW
FC ROOT.OLD ROOT.NEW >> %1
ECHO [ Directory Tree for C: ] >> %1
TREE C:\/A > TREEC.NEW
FC TREEC.OLD TREEC.NEW >> %1
REM Add next three lines if you installed programs on drive D:
ECHO [ Directory Tree for D: ] >> %1
TREE D:\/A > TREED.NEW
FC TREED.OLD TREED.NEW >> %1
FIND /v "Comparing files" %1 > %1.txt
DEL 1
DEL *.OLD
DEL *.NEW
Since this batch file requires a parameter (the name of the
program you are installing), you'll need to create a simple PIF
file for it. Open the PIF editor, and enter the full command
line C:\WINDOWS\INSTALL\AFTER.BAT. In the parameters box, enter
a question mark. Save the new PIF file as AFTER.PIF. Then use
File, New to create a new program item, and enter AFTER.PIF in
the command line box. Specify C:\WINDOWS\INSTALL as the working
directory, and name the item "Installation Recorder: After".
Immediately before you install a new application, run BEFORE.BAT
to record the contents of your hard disk and setup files. In-
stall the applications, then run AFTER.BAT. Windows will prompt
you for a parameter. Enter the name of the program you just in-
stalled (up to eight characters) and click on OK. AFTER.BAT will
compare the pre-installation snapshot with your new system infor-
mation, and compile a list of the differences in a text file in
C:\WINDOWS\INSTALL. If you decide later to remove the applica-
tion, use this file to locate files, directories, and system file
lines that you'll need to delete.
NOTE: You can alternately download CMPIN.EXE from data library 2
(Templates/Macros), PC/COMPUTING'S Compuserve forum.