home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
open
/
4dos20.lzh
/
INSTALL.BAT
< prev
next >
Wrap
DOS Batch File
|
1989-02-28
|
18KB
|
329 lines
echo off
goto install
:docopy
if exist %d:\%cname goto trycopy
beep ^ echo.
echo Warning: %cname is not on the diskette, 4DOS may not install correctly
echo. ^ return
:trycopy
if not exist %cname goto copyOK
echo. ^ input %cname already exists -- overwrite it (Y = yes)? %%over_write
if not "%over_write"=="Y" return
:copyOK
copy %d:\%cname
return
:install
if "%inst4d" == "G" goto go_install
if "%inst4d" == "S" goto start_install
if "%1"=="" set d=a
if not "%1"=="" set d=%1
set inst4d=S
%d%:\4dos88.exe /E=4096 /c %d%:\install
set inst4d=
echo Please wait ...
goto done
:start_install
if "%d" = "%disk" goto go_install
copy %d:\install.bat >& nul ^ setlocal ^ set path= ^ set inst4d=G
call install
del install.bat >& nul ^ endlocal ^ cls ^ quit
:go_install
set startdir=%cwd ^ cls ^ screen 2 0 ^ text
╔═══════════════════════════════════════════════════════════════════╗
║ ║
║ Welcome, and thanks for trying 4DOS! ║
║ ║
║ INSTALL will guide you through the 4DOS installation process. ║
║ You will first be prompted for: ║
║ ║
║ The disk drive and directory where you wish to install 4DOS ║
║ The disk drive and directory where you wish to install the ║
║ utilities and auxiliary files ║
║ The swapping mode (EMS, disk, or none) ║
║ The processor type (if an 80286 or 80386) ║
║ ║
║ Press any key when you are ready to continue... ║
║ ║
╚═══════════════════════════════════════════════════════════════════╝
endtext
screen 15 55 ^ inkey %%var ^ cls ^ set boot=C:\
set prog=4DOS.COM ^ set ansi=ANSI.SYS ^ set keystack=KEYSTACK.SYS
if not exist %d:\4dos.arc goto registered
set share=Y
cls ^ screen 1 0 ^ text
╔═══════════════════════════════════════════════════════════════════╗
║ ║
║ This is a shareware copy of 4DOS. ║
║ ║
║ You may try 4DOS for up to 21 days before deciding whether you ║
║ want to keep it and pay the registration fee. After the 21 ║
║ days is up you are legally required to either register 4DOS ║
║ or stop using it, as specified in the 4DOS license agreement. ║
║ ║
║ For more information on registration and the 4DOS license ║
║ agreement, see pages ii - viii in the manual, or the file ║
║ REGISTER.FRM. ║
║ ║
║ Because this copy is shareware, you may make additional copies ║
║ of this disk and distribute them to others, provided you ║
║ include all the files. Please remind those you give 4DOS to ║
║ of the registration requirements and how the shareware system ║
║ works. ║
║ ║
║ Press any key when you are ready to continue... ║
║ ║
╚═══════════════════════════════════════════════════════════════════╝
endtext
screen 20 55 ^ inkey %%var ^ goto getdirs
:registered
set share=N
cls ^ screen 2 0 ^ text
╔═══════════════════════════════════════════════════════════════════╗
║ ║
║ This is a registered copy of 4DOS. ║
║ ║
║ This copy is for use on your computer system only. It may be ║
║ used only on a single computer, unless you have purchased a ║
║ network, site, or corporate license. It may not be distributed ║
║ to others. ║
║ ║
║ If you have purchased an individual copy of 4DOS you have also ║
║ received a shareware diskette. The copy of 4DOS on the ║
║ shareware diskette may be copied and given to others to try, ║
║ under the terms of the 4DOS license agreement. ║
║ ║
║ The 4DOS license agreement and registration information are ║
║ on pages ii - viii of the manual, and in the file REGISTER.FRM ║
║ on the shareware diskette. ║
║ ║
║ Press any key when you are ready to continue... ║
║ ║
╚═══════════════════════════════════════════════════════════════════╝
endtext
screen 20 55 ^ inkey %%var
:getdirs
cls ^ screen 2 0 ^ text
╔════════════════════════════════════════════════════════════════════╗
║ ║
║ Enter the disk drive and directory where you would like to ║
║ install the 4DOS program files (generally this should be the ║
║ root directory of your boot drive): ║
║ ║
║ ║
║ ║
║ Enter the disk drive and directory where you would like to ║
║ install the 4DOS utilities (HELP, FIXSTACK, etc.) and auxiliary ║
║ files (sample aliases, README.DOC, etc.). ║
║ ║
║ ║
║ ║
║ 4DOS can remain resident in memory (requires 55K), or can swap ║
║ itself to expanded memory or to disk (requires < 5K). ║
║ ║
║ Enter E (EMS), D (disk), or R (resident) : ║
║ ║
║ Are you using an 80286 or 80386-based computer (Y = yes)? ║
║ ║
╚════════════════════════════════════════════════════════════════════╝
endtext
:get_boot
screen 8 10 ^ eset boot ^ screen 9 5
if isdir %boot goto boot_OK
md %boot >& nul ^ if isdir %boot goto boot_OK
beep ^ goto get_boot
:boot_OK
set utilities=%boot
:get_utilities
screen 14 10 ^ eset utilities ^ screen 15 5
if isdir %utilities goto get_swap
md %utilities >& nul ^ if isdir %utilities goto get_swap
beep ^ goto get_utilities
:get_swap
screen 19 53 ^ input %%swap ^ screen 20 5
if "%swap" == "E" set swap=/S:E ^ if "%swap" == "E" goto get_processor
if "%swap" == "D" set swap=/S:D ^ if "%swap" == "D" goto get_processor
if "%swap" == "R" set swap ^ if "%swap" == "R" goto get_processor
beep ^ goto get_swap
:get_processor
screen 21 65 ^ input %%at ^ screen 22 5
if not "%at" == "Y" set at=N
set load ^ if "%boot" == "C:\" goto get_config
if "%boot" == "A:\" goto get_config
set load=/L:%boot
cls ^ screen 2 0 ^ text
╔═══════════════════════════════════════════════════════════════════╗
║ ║
║ CAUTION: You have chosen to install 4DOS in a directory which ║
║ is not a normal boot drive / directory (A:\ or C:\). If the ║
║ name of the directory you have chosen is long it is possible ║
║ that you will run into an MS-DOS / PC-DOS bug which will ║
║ cause your system to boot improperly. ║
║ ║
║ While this will not be a problem on most systems, you should ║
║ read the section of the README.DOC file entitled "Installation ║
║ CAUTION!" to be sure that this bug will not cause you trouble. ║
║ The README.DOC file will be displayed automatically at the end ║
║ of this installation procedure. ║
║ ║
║ Press any key when you are ready to continue... ║
║ ║
╚═══════════════════════════════════════════════════════════════════╝
endtext
screen 16 55 ^ inkey %%var ^ cls
:get_config
set shell_installed=N ^ set ansi_installed=N ^ set keystack_installed=N
cls ^ cdd %boot ^ if not exist CONFIG.SYS goto copy_4DOS
screen 2 0 ^ text
╔═══════════════════════════════════════════════════════════════════╗
║ ║
║ There is already a CONFIG.SYS file in the boot directory you ║
║ specified. 4DOS will now display the file so you can look at ║
║ it. You will then be asked whether certain commands appear in ║
║ the file as listed. If you answer Yes to one of these ║
║ questions the corresponding command will not be added to the ║
║ CONFIG.SYS file again. ║
║ ║
║ If you already have a SHELL= command in CONFIG.SYS then you ║
║ will have to edit it manually to set the proper shell name ║
║ and swapping options. ║
║ ║
║ You will be asked if the command "DEVICE=ANSI.SYS" appears ║
║ in the list. If you have any ANSI-compatible driver specified ║
║ (including ANSI.SYS, NANSI, FANSI-Console, etc.) you can ║
║ answer Yes to this question. Otherwise answer No. ║
║ ║
║ Press any key when you are ready to continue... ║
║ ║
╚═══════════════════════════════════════════════════════════════════╝
endtext
screen 20 55 ^ inkey %%var
:chk_shell
cls ^ type CONFIG.SYS ^ echo.
input Does a line beginning "SHELL=" appear in the above display (Y = yes)? %%shell_installed
echo.
input Does the command "DEVICE=ANSI.SYS" appear in the above display (Y = yes)? %%ansi_installed
echo.
input Does the command "DEVICE=KEYSTACK.SYS" appear in the above display (Y = yes)? %%keystack_installed
:copy_4DOS
cls ^ screen 2 0 ^ text
╔═══════════════════════════════════════════════════════════════════╗
║ ║
║ 4DOS will now copy its files to the boot drive and directory ║
║ you specified. The original CONFIG.SYS file (if any) in that ║
║ directory will be saved to CONFIG.SAV, and CONFIG.SYS will ║
║ be modified to include the new 4DOS commands. ║
║ ║
║ The 4DOS utility programs and auxiliary files will be copied ║
║ to the drive and directory you specified for utilities. If ║
║ that directory is not included in your PATH statement (in ║
║ AUTOEXEC.BAT), you may want to modify the path so that 4DOS ║
║ can find the utility programs when you want to run them. ║
║ ║
║ Press any key when you are ready to continue... ║
║ ║
╚═══════════════════════════════════════════════════════════════════╝
endtext
screen 15 55 ^ inkey %%var ^ cls
cdd %boot ^ if exist config.sys copy config.sys config.sav
if not "%ansi_installed" == "Y" echo DEVICE=%cwds%ansi >>! config.sys
if not "%keystack_installed" == "Y" echo DEVICE=%cwds%keystack >>! config.sys
if not "%shell_installed" == "Y" echo SHELL=%cwds%prog %swap %load /p >>! config.sys
if "%share" == "Y" goto copy_share
set cname=4dos.com ^ gosub docopy
if "%at" == "Y" set cname=4dos286.exe
if "%at" == "N" set cname=4dos88.exe
gosub docopy
set cname=ansi.sys ^ gosub docopy
set cname=keystack.sys ^ gosub docopy
cdd %utilities
set cname=4d-pif.dvp ^ gosub docopy
set cname=aliases.bat ^ gosub docopy
set cname=arc-e.com ^ gosub docopy
set cname=arc-e.doc ^ gosub docopy
set cname=dos.hlp ^ gosub docopy
set cname=fixstack.doc ^ gosub docopy
set cname=fixstack.exe ^ gosub docopy
set cname=help.exe ^ gosub docopy
set cname=readme.doc ^ gosub docopy
set cname=tsrcom.arc ^ gosub docopy
goto readme
:copy_share
if not "%at" == "Y" goto get88
%d:\arc-e %d:\4dos 4dos286.exe
goto extract
:get88
set cname=4dos88.exe ^ gosub docopy
:extract
%d:\arc-e %d:\4dos 4dos.com ansi.sys keystack.sys
cdd %utilities
set cname=4ddoc.arc ^ gosub docopy
set cname=arc-e.com ^ gosub docopy
set cname=tsrcom.arc ^ gosub docopy
%d:\arc-e %d:\4dos 4d-pif.dvp aliases.bat arc-e.* dos.hlp fixstack.*
%d:\arc-e %d:\4dos help.exe readme.doc register.frm
:readme
pause Press any key when you are ready to continue...
cls ^ screen 2 0 ^ text
╔═══════════════════════════════════════════════════════════════════╗
║ ║
║ 4DOS will now display the contents of the README.DOC file. ║
║ This file contains important information about the version of ║
║ 4DOS on your disk. Please read it carefully. You may find it ║
║ more convenient to print the README file. Once you have ║
║ finished looking at the file on the screen 4DOS will prompt ║
║ you to see whether you want to print it, or later you can ║
║ follow the simple print instructions at the start of the file. ║
║ ║
║ Press any key when you are ready to continue... ║
║ ║
╚═══════════════════════════════════════════════════════════════════╝
endtext
screen 12 55 ^ inkey %%var
list readme.doc
:chk_print
cls ^ screen 5 0 ^ text
╔═══════════════════════════════════════════════════════════════════╗
║ ║
║ Would you like to print the README.DOC file (Y = yes)? ║
║ ║
╚═══════════════════════════════════════════════════════════════════╝
endtext
screen 7 62 ^ input %%do_print ^ screen 8 5
if not "%do_print" == "Y" goto inst_done
cls ^ screen 2 0 ^ text
╔═══════════════════════════════════════════════════════════════════╗
║ ║
║ Be sure your printer is set up in normal mode and aligned at ║
║ the top of a page. ║
║ ║
║ Press any key when you are ready to continue... ║
║ ║
╚═══════════════════════════════════════════════════════════════════╝
endtext
screen 7 55 ^ inkey %%var ^ screen 11 0
copy readme.doc prn
:inst_done
cls ^ screen 2 0 ^ text
╔═══════════════════════════════════════════════════════════════════╗
║ ║
║ 4DOS installation is complete. To start 4DOS as your system's ║
║ command processor, you must re-boot the system. If any errors ║
║ occurred during file copying you should check your CONFIG.SYS ║
║ file and be sure other files have been copied properly before ║
║ rebooting the system. ║
║ ║
║ If you installed 4DOS in a directory other than the root ║
║ directory of your boot drive, you will have to manually ║
║ merge the CONFIG.SYS file created during installation with ║
║ your own CONFIG.SYS file, and you will also have to set the ║
║ COMSPEC environment variable properly (see the COMSPEC section ║
║ in the README.DOC file). ║
║ ║
║ Press any key to return to DOS... ║
║ ║
╚═══════════════════════════════════════════════════════════════════╝
endtext
screen 17 41 ^ inkey %%var ^ cls ^ cdd %startdir ^ quit
:done