@echo off
if "%1" == "/*" goto sc01
cls
if exist QUERYFLA.GUP attrib -r QUERYFLA.GUP > nul
if exist QUERYFLA.GUP del QUERYFLA.GUP > nul
if exist QUERYFLA.GUP goto r1
if not exist fwkcs112.zip goto nd
if exist contents.112 attrib -r contents.112 > nul
if exist setup.112 attrib -r setup.112 > nul
if exist 2_setup.bat attrib -r 2_setup.bat > nul
if exist 2_setup.bat del 2_setup.bat > nul
if exist s_setup.bat attrib -r s_setup.bat > nul
if exist s_setup.bat del s_setup.bat > nul
if exist !! attrib -r !! > nul
if exist !! del !! > nul
if exist fwkhi.com attrib -r fwkhi.com > nul
if exist fwkhi.com del fwkhi.com > nul
pkunzip -o fwkcs112.zip fwkhi.com > nul
if not exist fwkhi.com goto nz
:sc01
cls
:usage
echo - For use with FWKCS(TM) Contents_Signature System, Version 1.12.
echo - (C)Copyright Frederick W. Kantor 1991. All rights reserved.
echo -
echo - GO.BAT to install the FWKCS(TM) Contents_Signature System, Version 1.12.
echo -
echo -              (See CONTENTS.112, SETUP.112, and REGISTER.DOC.)
echo -
echo - Note: for a first_time installation, this procedure normally takes time to
echo -       do automatic searching. For example, for a 32 Megabyte hard disk on
echo -       an IBM PC, total installation time is typically less than half an
echo -       hour, including the time to unzip the system from FWKCS112.ZIP.
echo -
echo - GO.BAT is for use in the same directory with FWKCS112.ZIP.
echo -
echo - Usage:
echo -
echo -      GO "<enter>"
echo -
if "%1" == "/*" goto zend
if not exist fwkcs112.zip goto ng1
if not exist fwkhi.com goto ng1
echo -
echo - To go forward (next screen), press F.
echo -
echo - To abort (quit), press A.
:ask01
fwkhi
if errorlevel 15 goto sc02
if errorlevel 11 goto ask01
if errorlevel 10 goto ng1
goto ask01
:sc02
cls
echo - FWKCS(TM) Version 1.12 is for use under IBM/MS DOS 3.30 - 5.00.
echo -
echo - Minimum system memory:  DOS 5.00 is specified as requiring 512K.
echo - Under DOS 3.30, FWKCS has run properly and called external programs in 380K.
echo -
echo - Be sure that you have available on your PATH
echo -
echo -      IBM/MS DOS ATTRIB, BASICA (or equivalent), CHKDSK, FIND, MORE.
echo -
echo -      Ben Baker's QSORT program, Version 3.20.
echo -
echo -      Phil Katz's PKZIP(R) and PKUNZIP(R), Version 1.1.
echo -
echo -      Vernon Buerg's LIST program, a recent version.
echo -
echo -      McAfee's SCAN, preferably the most recent version.
echo -
echo -      A file defragmentation program, for example, Peter Norton's SPEEDISK.
echo -
echo - (For credits and thanks, see FWKCS112.DOC, FWKCS /a.)
echo -
echo -
echo -  B = go Back 1 screen.  F = go Forward 1 screen.  A = Abort (quit).
:ask02
fwkhi
if errorlevel 15 goto m1
if errorlevel 12 goto ask02
if errorlevel 11 goto sc01
if errorlevel 10 goto ng1
goto ask02
:m1
cls
echo - Menu for installation - FWKCS(TM) Contents_Signature System, Version 1.12.
echo - ~~~~~~~~~~~~~~~~~~~~~
echo - Note: Options 1-5 must have creation rights to make their subdirectories.
echo - Allow at least 1 Megabyte + 8%% of total filelengths, for \cs subdirectory.
echo - Options 1,2,3,6,0 execute immediately. Options 4,5 (with *) explain further.
echo -
echo - For single user, no bulletin board, any/all drives C:-Z:, installation on C:,
echo - with no overlapping paths (won't reach the same physical file by two paths):
echo -    1. including only zipfiles, with extension .Z*.
echo -    2. including only zipfiles, any or no extension, self_extracting or not.
echo -    3. including all accessible non_directory files.
echo - For more detailed control of installation, including bulletin board use,
echo - multiple local users, selected drives, specific file extensions, string
echo - searches, choice of only zipfiles or of all non_directory files, etc.:
echo -  * 4. searches any drives C:-Z:, limited .ext choice, no string searches.
echo -  * 5. flexible: selected drives A:-Z:, selected .ext's, string searches.
echo -
echo - 6. get CONTENTS.112, SETUP.112, and REGISTER.DOC to read first.
echo - 0. unzip the FWKCS(TM) Contents_Signature System into the current directory,
echo -    without installation. This is used in replacing an existing installation,
echo -    or to proceed step_by_step in special situations.
echo -
echo - To choose option 0...6, press the corresponding numerical key.
echo -  B = go Back 1 screen.  A = Abort (quit).
:ask03
fwkhi
if errorlevel 12 goto ask03
if errorlevel 11 goto sc02
if errorlevel 10 goto ng1
if errorlevel 7 goto ask03
if errorlevel 6 goto e6
if errorlevel 5 goto e5
if errorlevel 4 goto e4
if errorlevel 3 goto e3
if errorlevel 2 goto e2
if errorlevel 1 goto e1
pkunzip -o fwkcs112.zip 0_setup.bat !! > nul
if not exist 0_setup.bat goto ns
if not exist !! goto ns
del !! > nul
if exist fwkhi.com del fwkhi.com > nul
0_setup
:e1
pkunzip -o fwkcs112.zip 2_setup.bat !! > nul
if not exist 2_setup.bat goto ns
if not exist !! goto ns
del !! > nul
if exist fwkhi.com del fwkhi.com > nul
2_setup C 1 C 1
:e2
pkunzip -o fwkcs112.zip 2_setup.bat !! > nul
if not exist 2_setup.bat goto ns
if not exist !! goto ns
del !! > nul
if exist fwkhi.com del fwkhi.com > nul
2_setup C 2 C 1
:e3
pkunzip -o fwkcs112.zip 2_setup.bat !! > nul
if not exist 2_setup.bat goto ns
if not exist !! goto ns
del !! > nul
if exist fwkhi.com del fwkhi.com > nul
2_setup C 3 C 1
:e4
pkunzip -o fwkcs112.zip 2_setup.bat !! > nul
if not exist 2_setup.bat goto ns
if not exist !! goto ns
del !! > nul
echo inter_.BAT query > QUERYFLA.GUP
cls
call 2_setup /* ..1.12
if not exist QUERYFLA.GUP goto e41
echo - deletion failure running 2_SETUP.BAT...
goto r1
:e41
echo -
echo - Shall I turn 2_SETUP.BAT over to you?   0 = NO.  1 = YES.  A = Abort.
:ask04
fwkhi
if errorlevel 11 goto ask04
if errorlevel 10 goto e44
if errorlevel 2 goto ask04
if errorlevel 1 goto e43
del 2_setup.bat > nul
goto m1
:e43
echo - for online help, type  2_SETUP /*  and then press the enter key.
goto ng1
:e44
del 2_setup.bat > nul
goto ng
:e5
pkunzip -o fwkcs112.zip s_setup.bat !! > nul
if not exist s_setup.bat goto ns
if not exist !! goto ns
del !! > nul
echo inter_.BAT query > QUERYFLA.GUP
cls
call s_setup /* ..1.12
if not exist QUERYFLA.GUP goto e51
echo - deletion failure running S_SETUP.BAT...
goto r1
:e51
echo -
echo - Shall I turn S_SETUP.BAT over to you?   0 = NO.  1 = YES.  A = Abort.
:ask05
fwkhi
if errorlevel 11 goto ask05
if errorlevel 10 goto e54
if errorlevel 2 goto ask05
if errorlevel 1 goto e53
del s_setup.bat > nul
goto m1
:e53
echo - for online help, type  S_SETUP /*  and then press the enter key.
goto ng1
:e54
del s_setup.bat > nul
goto ng
:e6
if exist setup.112 attrib -r setup.112 > nul
if exist contents.112 attrib -r contents.112 > nul
if exist register.doc attrib -r register.doc > nul
pkunzip -o fwkcs112.zip contents.112 register.doc setup.112 > nul
if not exist contents.112 goto ns
if not exist register.doc goto ns
if not exist setup.112 goto ns
cls
echo - CONTENTS.112, SETUP.112, and REGISTER.DOC have
echo - been unzipped into this default directory.
echo -
echo - May I suggest that you install FWKCS(TM), and see
echo - how it works?  The concepts are new, and what the
echo - words mean may be clarified by "hands_on" use.
goto ng
:r1
echo - This program must have the right to create and delete, in this
echo - (sub)directory, a file called QUERYFLA.GUP.
echo -
echo - Programs this program calls must have the right to delete, in this
echo - (sub)directory, the QUERYFLA.GUP file this program creates.
echo -
echo - Please provide those creation and deletion rights,
echo -   and then please try again.
goto ng
:nd
echo - Did not find FWKCS112.ZIP.
goto helpr
:ns
if exist 0_setup.bat del 0_setup.bat > nul
if exist 2_setup.bat del 2_setup.bat > nul
if exist s_setup.bat del s_setup.bat > nul
if exist !! del !! > nul
echo -
echo - There is apparently not enough space here for me to work in...
echo -
echo - After you have provided more space here, or moved my files to
echo -   another drive with enough space,
echo -
echo -           Please try again...
goto ng
:nz
echo - Where is Phil Katz's PKUNZIP(R)?
:helpr
echo -
echo - After supplying what was missing,
echo -
echo -           Please try again...
echo -
goto usage
:ng
echo -
:ng1
if exist QUERYFLA.GUP del QUERYFLA.GUP > nul
if exist fwkhi.com del fwkhi.com > nul
:zend
