home *** CD-ROM | disk | FTP | other *** search
- @echo off
- cls
- if "%1==" goto instruct
- if "%2==" goto instruct
- if "%3==" goto instruct
- if not exist %1 goto instruct
-
- echo *─» %1
- echo You are about to run the above program as a Windows 3.1 installation program.
- echo:
- echo Before you being, please make sure the following programs are in your path:
- echo ATTRIB.EXE - Usually in C:\DOS
- echo SETPROG.EXE \
- echo C_NEW.EXE - Part of the Windows Installation Kit.
- echo CHECKDIR.EXE /
- echo:
- echo Please exit Windows as soon as the installation is completed. If you are given
- echo a choice between Re-Starting and Exiting Windows you should choose Exit.
- echo:
- echo Your default shell will be changed to PROGMAN.EXE, and the startup group will
- echo be disabled. This is done for 2 reasons:
- echo 1. Some installation programs require PROGMAN.
- echo 2. With the Startup Group disabled, there is less of a chance of a
- echo confilict with another program.
- echo Both your default shell and the Startup Group will be restored as soon as you
- echo exit Windows.
- echo:
- echo NOTE: This program requires DOS 5 or higher.
- echo ───────────────────────────────────────────────────────────────────────────────
- pause
- cls
-
- echo Checking directory, please wait...
- CheckDir %3 C Q
- If Not ErrorLevel==0 GoTo End
-
- :Windows
- echo Taking a "Snapshot" of your Windows directory...
- cd\windows
- copy *.ini *.org >>nul
- attrib -a *.* /s >>nul
- dir *.grp /b >%3\%2.gnf
-
- setprog S
- If NOT ErrorLevel==0 GoTo End
-
- echo Starting Windows...
- Call win %1
- ask Was the application installed successfully?
- if errorlevel==0 goto END
-
- cd\windows
- setprog R
- If NOT ErrorLevel==0 GoTo End
- Rem SYSTEM.INI will show up as a changed file, even if nothing was done to it.
-
- cls
- echo Obtaining information on changed files...
- attrib -a *.grp /s >>nul
- dir *.* /a:a /b /s >%3\%2.prg
- dir *.ini /a:a /b /s >%3\%2.nfo
-
- echo:
- echo Analizing changed data...
- c_new %2 %3
- If NOT ErrorLevel==0 GoTo End
-
- echo:
- echo Cleaning up old files...
- del c:\windows\*.org >nul
- del %3\%2.gnf
-
- :Complete
- echo Complete!
- echo Destination Directory: %3
- echo Information can be found in the following files:
- echo %2.PRG - All Modified Files.
- echo %2.NFO - Modified/New .INI and .GRP Files.
- echo %2.CHG - Modifications made to existing .INI files.
- echo %2.CMD - Command file for INIMOD.EXE.
- echo %2.BAT - Batch file to install application.
-
- goto end
-
- :instruct
- echo Syntax: WININST [Install File] [Hold File] [Destination Directory]
- echo * Where [Install File] is the name of the installation program
- echo to execute under Windows 3.1 with the drive, path, and
- echo extension of the file.
- echo:
- echo * Where [Hold File] is the name of the changed output file.
- echo [Hold File].PRG will contain ALL modified/new files in
- echo C:\WINDOWS and its sub-directories.
- echo [Hold File].NFO will contain all modified/new INI & GRP
- echo files in C:\WINDOWS and its sub-directories.
- echo [Hold File].CHG will contain all modifications to the INI
- echo files in the C:\WINDOWS directory.
- echo:
- echo * Where [Destination Directory] is the drive and directory
- echo where the [Hold File]'s will be created, and all new files
- echo will be coppied to. This directory will automatically be
- echo created if it does not exist. (Ex: F:\WININST\EXCEL.INS)
- if "%1==" goto end
- echo:
- echo ═══════════════════════════════════════════════════════════════════════════════
- echo ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR
- if not exist %1 goto not_found
- if "%2==" goto no_holdfile
- if "%3==" goto no_destdir
- goto end
-
- :not_found
- echo » Installation program not found «
- goto end
-
- :no_holdfile
- echo » Hold File was not specified «
- goto end
-
- :no_destdir
- echo » Destination Directory was not specified «
- goto end
-
-
- :end
- echo ────────────────────────────────────────────────────────────────────────────────
-