home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / open / 4dos20.lzh / INSTALL.BAT < prev    next >
DOS Batch File  |  1989-02-28  |  18KB  |  329 lines

  1. echo off
  2. goto install
  3. :docopy
  4. if exist %d:\%cname goto trycopy
  5. beep ^ echo.
  6. echo Warning:  %cname is not on the diskette, 4DOS may not install correctly
  7. echo. ^ return
  8. :trycopy
  9. if not exist %cname goto copyOK
  10. echo. ^ input %cname already exists -- overwrite it (Y = yes)? %%over_write
  11. if not "%over_write"=="Y" return
  12. :copyOK
  13. copy %d:\%cname
  14. return
  15. :install
  16. if "%inst4d" == "G" goto go_install
  17. if "%inst4d" == "S" goto start_install
  18. if "%1"=="" set d=a
  19. if not "%1"=="" set d=%1
  20. set inst4d=S
  21. %d%:\4dos88.exe /E=4096 /c %d%:\install
  22. set inst4d=
  23. echo Please wait ...
  24. goto done
  25. :start_install
  26. if "%d" = "%disk" goto go_install
  27. copy %d:\install.bat >& nul ^ setlocal ^ set path= ^ set inst4d=G
  28. call install
  29. del install.bat >& nul ^ endlocal ^ cls ^ quit
  30. :go_install
  31. set startdir=%cwd ^ cls ^ screen 2 0 ^ text
  32.     ╔═══════════════════════════════════════════════════════════════════╗
  33.     ║                                                                   ║
  34.     ║  Welcome, and thanks for trying 4DOS!                             ║
  35.     ║                                                                   ║
  36.     ║  INSTALL will guide you through the 4DOS installation process.    ║
  37.     ║  You will first be prompted for:                                  ║
  38.     ║                                                                   ║
  39.     ║      The disk drive and directory where you wish to install 4DOS  ║
  40.     ║      The disk drive and directory where you wish to install the   ║
  41.     ║         utilities and auxiliary files                             ║
  42.     ║      The swapping mode (EMS, disk, or none)                       ║
  43.     ║      The processor type (if an 80286 or 80386)                    ║
  44.     ║                                                                   ║
  45.     ║  Press any key when you are ready to continue...                  ║
  46.     ║                                                                   ║
  47.     ╚═══════════════════════════════════════════════════════════════════╝
  48. endtext
  49. screen 15 55 ^ inkey %%var ^ cls ^ set boot=C:\
  50. set prog=4DOS.COM ^ set ansi=ANSI.SYS ^ set keystack=KEYSTACK.SYS
  51. if not exist %d:\4dos.arc goto registered
  52. set share=Y
  53. cls ^ screen 1 0 ^ text
  54.     ╔═══════════════════════════════════════════════════════════════════╗
  55.     ║                                                                   ║
  56.     ║  This is a shareware copy of 4DOS.                                ║
  57.     ║                                                                   ║
  58.     ║  You may try 4DOS for up to 21 days before deciding whether you   ║
  59.     ║  want to keep it and pay the registration fee.  After the 21      ║
  60.     ║  days is up you are legally required to either register 4DOS      ║
  61.     ║  or stop using it, as specified in the 4DOS license agreement.    ║
  62.     ║                                                                   ║
  63.     ║  For more information on registration and the 4DOS license        ║
  64.     ║  agreement, see pages ii - viii in the manual, or the file        ║
  65.     ║  REGISTER.FRM.                                                    ║
  66.     ║                                                                   ║
  67.     ║  Because this copy is shareware, you may make additional copies   ║
  68.     ║  of this disk and distribute them to others, provided you         ║
  69.     ║  include all the files.  Please remind those you give 4DOS to     ║
  70.     ║  of the registration requirements and how the shareware system    ║
  71.     ║  works.                                                           ║
  72.     ║                                                                   ║
  73.     ║  Press any key when you are ready to continue...                  ║
  74.     ║                                                                   ║
  75.     ╚═══════════════════════════════════════════════════════════════════╝
  76. endtext
  77. screen 20 55 ^ inkey %%var ^ goto getdirs
  78. :registered
  79. set share=N
  80. cls ^ screen 2 0 ^ text
  81.     ╔═══════════════════════════════════════════════════════════════════╗
  82.     ║                                                                   ║
  83.     ║  This is a registered copy of 4DOS.                               ║
  84.     ║                                                                   ║
  85.     ║  This copy is for use on your computer system only.  It may be    ║
  86.     ║  used only on a single computer, unless you have purchased a      ║
  87.     ║  network, site, or corporate license.  It may not be distributed  ║
  88.     ║  to others.                                                       ║
  89.     ║                                                                   ║
  90.     ║  If you have purchased an individual copy of 4DOS you have also   ║
  91.     ║  received a shareware diskette.  The copy of 4DOS on the          ║
  92.     ║  shareware diskette may be copied and given to others to try,     ║
  93.     ║  under the terms of the 4DOS license agreement.                   ║
  94.     ║                                                                   ║
  95.     ║  The 4DOS license agreement and registration information are      ║
  96.     ║  on pages ii - viii of the manual, and in the file REGISTER.FRM   ║
  97.     ║  on the shareware diskette.                                       ║
  98.     ║                                                                   ║
  99.     ║  Press any key when you are ready to continue...                  ║
  100.     ║                                                                   ║
  101.     ╚═══════════════════════════════════════════════════════════════════╝
  102. endtext
  103. screen 20 55 ^ inkey %%var
  104. :getdirs
  105. cls ^ screen 2 0 ^ text
  106.     ╔════════════════════════════════════════════════════════════════════╗
  107.     ║                                                                    ║
  108.     ║  Enter the disk drive and directory where you would like to        ║
  109.     ║  install the 4DOS program files (generally this should be the      ║
  110.     ║  root directory of your boot drive):                               ║
  111.     ║                                                                    ║
  112.     ║                                                                    ║
  113.     ║                                                                    ║
  114.     ║  Enter the disk drive and directory where you would like to        ║
  115.     ║  install the 4DOS utilities (HELP, FIXSTACK, etc.) and auxiliary   ║
  116.     ║  files (sample aliases, README.DOC, etc.).                         ║
  117.     ║                                                                    ║
  118.     ║                                                                    ║
  119.     ║                                                                    ║
  120.     ║  4DOS can remain resident in memory (requires 55K), or can swap    ║
  121.     ║  itself to expanded memory or to disk (requires < 5K).             ║
  122.     ║                                                                    ║
  123.     ║     Enter E (EMS), D (disk), or R (resident) :                     ║
  124.     ║                                                                    ║
  125.     ║  Are you using an 80286 or 80386-based computer (Y = yes)?         ║
  126.     ║                                                                    ║
  127.     ╚════════════════════════════════════════════════════════════════════╝
  128. endtext
  129. :get_boot
  130. screen 8 10 ^ eset boot ^ screen 9 5
  131. if isdir %boot goto boot_OK
  132. md %boot >& nul ^ if isdir %boot goto boot_OK
  133. beep ^ goto get_boot
  134. :boot_OK
  135. set utilities=%boot
  136. :get_utilities
  137. screen 14 10 ^ eset utilities ^ screen 15 5
  138. if isdir %utilities goto get_swap
  139. md %utilities >& nul ^ if isdir %utilities goto get_swap
  140. beep ^ goto get_utilities
  141. :get_swap
  142. screen 19 53 ^ input %%swap ^ screen 20 5
  143. if "%swap" == "E" set swap=/S:E ^ if "%swap" == "E" goto get_processor
  144. if "%swap" == "D" set swap=/S:D ^ if "%swap" == "D" goto get_processor
  145. if "%swap" == "R" set swap ^ if "%swap" == "R" goto get_processor
  146. beep ^ goto get_swap
  147. :get_processor
  148. screen 21 65 ^ input %%at ^ screen 22 5
  149. if not "%at" == "Y" set at=N
  150. set load ^ if "%boot" == "C:\" goto get_config
  151. if "%boot" == "A:\" goto get_config
  152. set load=/L:%boot
  153. cls ^ screen 2 0 ^ text
  154.     ╔═══════════════════════════════════════════════════════════════════╗
  155.     ║                                                                   ║
  156.     ║  CAUTION:  You have chosen to install 4DOS in a directory which   ║
  157.     ║  is not a normal boot drive / directory (A:\ or C:\).  If the     ║
  158.     ║  name of the directory you have chosen is long it is possible     ║
  159.     ║  that you will run into an MS-DOS / PC-DOS bug which will         ║
  160.     ║  cause your system to boot improperly.                            ║
  161.     ║                                                                   ║
  162.     ║  While this will not be a problem on most systems, you should     ║
  163.     ║  read the section of the README.DOC file entitled "Installation   ║
  164.     ║  CAUTION!" to be sure that this bug will not cause you trouble.   ║
  165.     ║  The README.DOC file will be displayed automatically at the end   ║
  166.     ║  of this installation procedure.                                  ║
  167.     ║                                                                   ║
  168.     ║  Press any key when you are ready to continue...                  ║
  169.     ║                                                                   ║
  170.     ╚═══════════════════════════════════════════════════════════════════╝
  171. endtext
  172. screen 16 55 ^ inkey %%var ^ cls
  173. :get_config
  174. set shell_installed=N ^ set ansi_installed=N ^ set keystack_installed=N
  175. cls ^ cdd %boot ^ if not exist CONFIG.SYS goto copy_4DOS
  176. screen 2 0 ^ text
  177.     ╔═══════════════════════════════════════════════════════════════════╗
  178.     ║                                                                   ║
  179.     ║  There is already a CONFIG.SYS file in the boot directory you     ║
  180.     ║  specified.  4DOS will now display the file so you can look at    ║
  181.     ║  it.  You will then be asked whether certain commands appear in   ║
  182.     ║  the file as listed.  If you answer Yes to one of these           ║
  183.     ║  questions the corresponding command will not be added to the     ║
  184.     ║  CONFIG.SYS file again.                                           ║
  185.     ║                                                                   ║
  186.     ║  If you already have a SHELL= command in CONFIG.SYS then you      ║
  187.     ║  will have to edit it manually to set the proper shell name       ║
  188.     ║  and swapping options.                                            ║
  189.     ║                                                                   ║
  190.     ║  You will be asked if the command "DEVICE=ANSI.SYS" appears       ║
  191.     ║  in the list.  If you have any ANSI-compatible driver specified   ║
  192.     ║  (including ANSI.SYS, NANSI, FANSI-Console, etc.) you can         ║
  193.     ║  answer Yes to this question.  Otherwise answer No.               ║
  194.     ║                                                                   ║
  195.     ║  Press any key when you are ready to continue...                  ║
  196.     ║                                                                   ║
  197.     ╚═══════════════════════════════════════════════════════════════════╝
  198. endtext
  199. screen 20 55 ^ inkey %%var
  200. :chk_shell
  201. cls ^ type CONFIG.SYS ^ echo.
  202. input Does a line beginning "SHELL=" appear in the above display (Y = yes)? %%shell_installed
  203. echo.
  204. input Does the command "DEVICE=ANSI.SYS" appear in the above display (Y = yes)? %%ansi_installed
  205. echo.
  206. input Does the command "DEVICE=KEYSTACK.SYS" appear in the above display (Y = yes)? %%keystack_installed
  207. :copy_4DOS
  208. cls ^ screen 2 0 ^ text
  209.     ╔═══════════════════════════════════════════════════════════════════╗
  210.     ║                                                                   ║
  211.     ║  4DOS will now copy its files to the boot drive and directory     ║
  212.     ║  you specified.  The original CONFIG.SYS file (if any) in that    ║
  213.     ║  directory will be saved to CONFIG.SAV, and CONFIG.SYS will       ║
  214.     ║  be modified to include the new 4DOS commands.                    ║
  215.     ║                                                                   ║
  216.     ║  The 4DOS utility programs and auxiliary files will be copied     ║
  217.     ║  to the drive and directory you specified for utilities.  If      ║
  218.     ║  that directory is not included in your PATH statement (in        ║
  219.     ║  AUTOEXEC.BAT), you may want to modify the path so that 4DOS      ║
  220.     ║  can find the utility programs when you want to run them.         ║
  221.     ║                                                                   ║
  222.     ║  Press any key when you are ready to continue...                  ║
  223.     ║                                                                   ║
  224.     ╚═══════════════════════════════════════════════════════════════════╝
  225. endtext
  226. screen 15 55 ^ inkey %%var ^ cls
  227. cdd %boot ^ if exist config.sys copy config.sys config.sav
  228. if not "%ansi_installed" == "Y" echo DEVICE=%cwds%ansi >>! config.sys
  229. if not "%keystack_installed" == "Y" echo DEVICE=%cwds%keystack >>! config.sys
  230. if not "%shell_installed" == "Y" echo SHELL=%cwds%prog %swap %load /p >>! config.sys
  231. if "%share" == "Y" goto copy_share
  232. set cname=4dos.com ^ gosub docopy
  233. if "%at" == "Y" set cname=4dos286.exe
  234. if "%at" == "N" set cname=4dos88.exe
  235. gosub docopy
  236. set cname=ansi.sys ^ gosub docopy
  237. set cname=keystack.sys ^ gosub docopy
  238. cdd %utilities
  239. set cname=4d-pif.dvp ^ gosub docopy
  240. set cname=aliases.bat ^ gosub docopy
  241. set cname=arc-e.com ^ gosub docopy
  242. set cname=arc-e.doc ^ gosub docopy
  243. set cname=dos.hlp ^ gosub docopy
  244. set cname=fixstack.doc ^ gosub docopy
  245. set cname=fixstack.exe ^ gosub docopy
  246. set cname=help.exe ^ gosub docopy
  247. set cname=readme.doc ^ gosub docopy
  248. set cname=tsrcom.arc ^ gosub docopy
  249. goto readme
  250. :copy_share
  251. if not "%at" == "Y" goto get88
  252. %d:\arc-e %d:\4dos 4dos286.exe
  253. goto extract
  254. :get88
  255. set cname=4dos88.exe ^ gosub docopy
  256. :extract
  257. %d:\arc-e %d:\4dos 4dos.com ansi.sys keystack.sys 
  258. cdd %utilities
  259. set cname=4ddoc.arc ^ gosub docopy
  260. set cname=arc-e.com ^ gosub docopy
  261. set cname=tsrcom.arc ^ gosub docopy
  262. %d:\arc-e %d:\4dos 4d-pif.dvp aliases.bat arc-e.* dos.hlp fixstack.*
  263. %d:\arc-e %d:\4dos help.exe readme.doc register.frm 
  264. :readme
  265. pause Press any key when you are ready to continue...
  266. cls ^ screen 2 0 ^ text
  267.     ╔═══════════════════════════════════════════════════════════════════╗
  268.     ║                                                                   ║
  269.     ║  4DOS will now display the contents of the README.DOC file.       ║
  270.     ║  This file contains important information about the version of    ║
  271.     ║  4DOS on your disk.  Please read it carefully.  You may find it   ║
  272.     ║  more convenient to print the README file.  Once you have         ║
  273.     ║  finished looking at the file on the screen 4DOS will prompt      ║
  274.     ║  you to see whether you want to print it, or later you can        ║
  275.     ║  follow the simple print instructions at the start of the file.   ║
  276.     ║                                                                   ║
  277.     ║  Press any key when you are ready to continue...                  ║
  278.     ║                                                                   ║
  279.     ╚═══════════════════════════════════════════════════════════════════╝
  280. endtext
  281. screen 12 55 ^ inkey %%var
  282. list readme.doc
  283. :chk_print
  284. cls ^ screen 5 0 ^ text
  285.     ╔═══════════════════════════════════════════════════════════════════╗
  286.     ║                                                                   ║
  287.     ║  Would you like to print the README.DOC file (Y = yes)?           ║
  288.     ║                                                                   ║
  289.     ╚═══════════════════════════════════════════════════════════════════╝
  290. endtext
  291. screen 7 62 ^ input %%do_print ^ screen 8 5
  292. if not "%do_print" == "Y" goto inst_done
  293. cls ^ screen 2 0 ^ text
  294.     ╔═══════════════════════════════════════════════════════════════════╗
  295.     ║                                                                   ║
  296.     ║  Be sure your printer is set up in normal mode and aligned at     ║
  297.     ║  the top of a page.                                               ║
  298.     ║                                                                   ║
  299.     ║  Press any key when you are ready to continue...                  ║
  300.     ║                                                                   ║
  301.     ╚═══════════════════════════════════════════════════════════════════╝
  302. endtext
  303. screen 7 55 ^ inkey %%var ^ screen 11 0
  304. copy readme.doc prn
  305. :inst_done
  306. cls ^ screen 2 0 ^ text
  307.     ╔═══════════════════════════════════════════════════════════════════╗
  308.     ║                                                                   ║
  309.     ║  4DOS installation is complete.  To start 4DOS as your system's   ║
  310.     ║  command processor, you must re-boot the system.  If any errors   ║
  311.     ║  occurred during file copying you should check your CONFIG.SYS    ║
  312.     ║  file and be sure other files have been copied properly before    ║
  313.     ║  rebooting the system.                                            ║
  314.     ║                                                                   ║
  315.     ║  If you installed 4DOS in a directory other than the root         ║
  316.     ║  directory of your boot drive, you will have to manually          ║
  317.     ║  merge the CONFIG.SYS file created during installation with       ║
  318.     ║  your own CONFIG.SYS file, and you will also have to set the      ║
  319.     ║  COMSPEC environment variable properly (see the COMSPEC section   ║
  320.     ║  in the README.DOC file).                                         ║
  321.     ║                                                                   ║
  322.     ║  Press any key to return to DOS...                                ║
  323.     ║                                                                   ║
  324.     ╚═══════════════════════════════════════════════════════════════════╝
  325. endtext
  326. screen 17 41 ^ inkey %%var ^ cls ^ cdd %startdir ^ quit
  327. :done
  328.  
  329.