home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / utils / wilsonwr.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1989-05-18  |  11KB  |  269 lines

  1. echo off
  2. rem  ╔════════════════════════════════════════════════════════════════╗
  3. rem  ║ INSTALL.BAT batch file to Install Wilson WindowWare Products   ║
  4. rem  ╚════════════════════════════════════════════════════════════════╝
  5. rem
  6. rem    Check for all 3 parameters...
  7.        if %1. == .             goto ERR1
  8.        if %2. == .             goto ERR1
  9.        if %3. == .             goto ERR1
  10.  
  11. rem  Check to be sure logged drive is desired floppy, and not hard disk
  12. rem  Check for file on floppy, and check common hard disk files and dirs.
  13.  
  14.        if NOT EXIST INSTALL.BAT goto ERR6
  15.        if EXIST \AUTOEXEC.BAT   goto ERR6
  16.        if EXIST \CONFIG.SYS     goto ERR6
  17.        if EXIST \WINDOWS\NUL    goto ERR6
  18.        if EXIST \DOS\NUL        goto ERR6
  19.        if EXIST \WIN\NUL        goto ERR6
  20.        if EXIST \WIN386\NUL     goto ERR6
  21.  
  22. rem    Check to make sure destination is not a floppy
  23.        if %1  == A:            goto ERR2
  24.        if %1  == a:            goto ERR2
  25.        if %1  == B:            goto ERR2
  26.        if %1  == b:            goto ERR2
  27.  
  28. rem    Check to make sure destination drive exists
  29.        if NOT EXIST %1\NUL     goto ERR3
  30.  
  31. rem    Check to make sure 286 or 386 was entered
  32.        if %3  == 286           goto CONT2
  33.        if %3  == 386           goto CONT2
  34.  
  35. rem    Obviously some obscure error ocurred.  Punt.
  36.        goto ERR5
  37.  
  38. :CONT2
  39. cls
  40. echo  ╔════════════════════════════════════════════════════════════════╗
  41. echo  ║     Wilson WindowWare Installation Batch File   Ver A6         ║
  42. echo  ║                                                                ║
  43. echo  ║ This install procedure will create a new directory on your     ║
  44. echo  ║ %1 disk called WWWPRODS.  This new directory will contain      ║
  45. echo  ║ three subdirectories, APPLETS, BROWSER and CMDPOST.  These     ║
  46. echo  ║ new directories will contain the documentation files for the   ║
  47. echo  ║ WindowWare products.  The actual executables will be copied    ║
  48. echo  ║ to the target subdirectory as specified on the command line    ║
  49. echo  ║ and as shown below.                                            ║
  50. echo  ║                                                                ║
  51. echo  ║  This installation is targeted for a Windows/%3 system.       ║
  52. echo  ╚════════════════════════════════════════════════════════════════╝
  53.  
  54. rem See if destination directory conatins WIN.INI.  If not warn user
  55. if EXIST %1%2\WIN.INI       goto CONT1
  56.  
  57. echo  ╔════════════════════════════════════════════════════════════════╗
  58. echo  ║ INSTALL WARNING:  Destination subdirectory DOES NOT CONTAIN    ║
  59. echo  ║                   the WIN.INI Windows Initialization file.     ║
  60. echo  ║                   Installation can proceed if you add the      ║
  61. echo  ║                   subdirectory to your PATH statement later.   ║
  62. echo  ╚════════════════════════════════════════════════════════════════╝
  63. goto  CONT1
  64.  
  65. :CONT1
  66. echo Ready to Perform Install to  %1%2
  67. echo Press Ctrl-C to Abort
  68. echo   (or)
  69. pause
  70.  
  71.  
  72.  
  73. rem  Setup the installation subdirectories (may not all be necessary).
  74.  
  75.  
  76.        echo ╔══════════════════════════════════════╗
  77.        echo ║ Making required directories          ║
  78.        echo ║ Ignore error messages here (if any)  ║
  79.        echo ╚══════════════════════════════════════╝
  80.  
  81.        md %1%2
  82.        md %1\wwwprods
  83.        md %1\wwwprods\applets
  84.        md %1\wwwprods\browser
  85.        md %1\wwwprods\cmdpost
  86.  
  87.        echo ╔═══════════════════════════════════════════╗
  88.        echo ║  Deleting old version of products, if any ║
  89.        echo ║  ((File Not Found errors may occur here)) ║
  90.        echo ╚═══════════════════════════════════════════╝
  91.        erase %1\wwwprods\applets\*.exe 
  92.        erase %1\wwwprods\applets\*.txt
  93.        erase %1\wwwprods\applets\*.ad1
  94.        erase %1\wwwprods\applets\*.1st 
  95.        erase %1\wwwprods\browser\*.txt 
  96.        erase %1\wwwprods\browser\*.exe 
  97.        erase %1\wwwprods\browser\*.dat
  98.        erase %1\wwwprods\browser\*.ad1
  99.        erase %1\wwwprods\browser\*.1st 
  100.        erase %1\wwwprods\cmdpost\*.exe 
  101.        erase %1\wwwprods\cmdpost\*.txt 
  102.        erase %1\wwwprods\cmdpost\*.ad1
  103.        erase %1\wwwprods\cmdpost\*.1st
  104.        erase %1\wwwprods\cmdpost\*.286
  105.        erase %1\wwwprods\cmdpost\*.386
  106.        erase %1\wwwprods\cmdpost\*.mnv
  107. rem    erase old cmdlib2.exe if it exists.  it is now trash
  108.        erase %1%2\cmdlib2.exe
  109.  
  110. rem  If cmdpost.mnu is here, rename it to .mnv in case its user's real menu
  111.  
  112.        if NOT EXIST %1\wwwprods\cmdpost\cmdpost.mnu  goto NOMNU
  113.        copy %1\wwwprods\cmdpost\cmdpost.mnu %1\wwwprods\cmdpost\cmdpost.mnv
  114.        erase %1\wwwprods\cmdpost\*.mnu
  115.  
  116. :NOMNU
  117.        echo ╔═══════════════════════════════════════════╗
  118.        echo ║  Copying packed EXE files to hard drive   ║
  119.        echo ╚═══════════════════════════════════════════╝
  120.        echo Copying Aplt11.exe
  121.        copy aplt11.exe %1\wwwprods\applets
  122.        echo Copying Brow32.exe
  123.        copy brow32.exe %1\wwwprods\browser
  124.        echo Copying Cmdp62.exe
  125.        copy cmdp62.exe %1\wwwprods\cmdpost
  126.  
  127. rem log to destination disk drive
  128.        %1
  129.  
  130.        echo ╔════════════════════════════════════════════════╗
  131.        echo ║  Starting Extract and Install of Command Post  ║
  132.        echo ╚════════════════════════════════════════════════╝
  133.        cd \wwwprods\cmdpost
  134.        cmdp62.exe
  135.        erase cmdp62.exe
  136.        echo Copying Command Post executable files to %1%2
  137.        copy *.exe %1%2
  138.  
  139. rem    If user already has a CMDPOST.MNU, for gosh sakes do not overwrite!
  140.        if EXIST %1%2\CMDPOST.MNU  goto DOMOR1
  141.        echo Copying sample Command Post menu file to %1%2
  142.        copy CMDPOST.MNU %1%2
  143.  
  144. :DOMOR1
  145. rem    copy over appropriate PIF file, if the user looks like he needs one
  146.  
  147.        if EXIST %1%2\COMMAND.PIF  goto DOMOR2
  148.        echo Copying COMMAND.PIF to %1%2
  149.        if %3 == 286 copy COMMAND.286 %1%2\COMMAND.PIF
  150.        if %3 == 386 copy COMMAND.386 %1%2\COMMAND.PIF
  151.  
  152. :DOMOR2
  153. rem   get rid of stuff copied to the Windows directory (keep CMDPOST.MNU)
  154.        erase *.exe
  155.        erase *.286
  156.        erase *.386
  157.  
  158.  
  159.  
  160.        echo ╔═══════════════════════════════════════════╗
  161.        echo ║  Starting Extract and Install of Browser  ║
  162.        echo ╚═══════════════════════════════════════════╝
  163.        cd \wwwprods\browser
  164.        brow32.exe
  165.        erase brow32.exe
  166.        echo Copying Browser executable file to %1%2
  167.        copy *.exe %1%2
  168.        erase *.exe
  169.  
  170.        echo ╔═══════════════════════════════════════════╗
  171.        echo ║  Starting Extract and Install of Applets  ║
  172.        echo ╚═══════════════════════════════════════════╝
  173.        cd \wwwprods\applets
  174.        aplt11.exe
  175.        erase aplt11.exe
  176.        echo Copying Applets executable files to %1%2
  177.        copy *.exe %1%2
  178.        erase *.exe
  179.  
  180. goto AOK
  181.  
  182. :ERR6
  183. echo ╔═════════════════════════════════════════════════════════════════╗
  184. echo ║  INSTALL ERROR:  Must be logged onto correct floppy drive       ║
  185. echo ╚═════════════════════════════════════════════════════════════════╝
  186. pause
  187. goto ERR1
  188.  
  189.  
  190. :ERR5
  191. echo ╔═════════════════════════════════════════════════════════════════╗
  192. echo ║  INSTALL ERROR:  Must enter Windows type as 286 or 386          ║
  193. echo ╚═════════════════════════════════════════════════════════════════╝
  194. pause
  195. goto ERR1
  196.  
  197.  
  198.  
  199. :ERR3
  200. echo ╔═════════════════════════════════════════════════════════════════╗
  201. echo ║  INSTALL ERROR:  Destination drive %1 does not exist.           ║
  202. echo ╚═════════════════════════════════════════════════════════════════╝
  203. pause
  204. goto ERR1
  205.  
  206.  
  207. :ERR2
  208. echo ╔═════════════════════════════════════════════════════════════════╗
  209. echo ║  INSTALL ERROR:  Cannot install to a floppy.                    ║
  210. echo ╚═════════════════════════════════════════════════════════════════╝
  211. pause
  212. goto ERR1
  213.  
  214. :ERR1
  215. echo off
  216. cls
  217. echo ╔═════════════════════════════════════════════════════════════════╗
  218. echo ║  Wilson WindowWare Install Instructions                         ║
  219. echo ╠═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═╣
  220. echo ║  1) Insert disk into floppy drive and logon to that drive (A:)  ║
  221. echo ║                                                                 ║
  222. echo ║  2) Type  "INSTALL  to:  \subdir   type"                        ║
  223. echo ║                                                                 ║
  224. echo ║        to:  is the drive-ID of the HARD drive that you will be  ║
  225. echo ║             installing the WindowWare products to.              ║
  226. echo ║    \subdir  is the subdirectory that the WindowWare programs    ║
  227. echo ║             will be copied into.  This directory  MUST CONTAIN  ║
  228. echo ║             the WIN.INI Windows Initialization file.            ║
  229. echo ║       type  Is the type of Windows you will be using,           ║
  230. echo ║             either 286 or 386.  Not the kind of machine you     ║
  231. echo ║             actually have.                                      ║
  232. echo ║                                                                 ║
  233. echo ║  For example:                                                   ║
  234. echo ║    INSTALL  C:   \WINDOWS   286                                 ║
  235. echo ║      will install the products into  C:\WINDOWS for Windows/286 ║
  236. echo ║    INSTALL  C:   \WIN386    386                                 ║
  237. echo ║      will install the products into  C:\WIN386  for Windows/386 ║
  238. echo ╚═════════════════════════════════════════════════════════════════╝
  239.        goto END
  240.  
  241.  
  242. :AOK
  243. rem    change to some reasonable directory...
  244.        cd %2
  245.        cls
  246.        echo ╔════════════════════════════════════════════════╗
  247.        echo ║  WindowWare Install Completed Successfully     ║
  248.        echo ║                                                ║
  249.        echo ║  Please refer to the following files for       ║
  250.        echo ║  additional information on these products      ║
  251.        echo ║                                                ║
  252.        echo ║  Command Post:                                 ║
  253.        echo ║     %1\WWWPRODS\CMDPOST\$CP-READ.1ST           ║
  254.        echo ║     %1\WWWPRODS\CMDPOST\CMDPOST.TXT            ║
  255.        echo ║                                                ║
  256.        echo ║  Browser:                                      ║
  257.        echo ║     %1\WWWPRODS\BROWSER\$BR-READ.1ST           ║
  258.        echo ║     %1\WWWPRODS\BROWSER\BROWSER.TXT            ║
  259.        echo ║                                                ║
  260.        echo ║  Applets                                       ║
  261.        echo ║     %1\WWWPRODS\APPLETS\$AP-READ.1ST           ║
  262.        echo ║     %1\WWWPRODS\APPLETS\APPLETS.TXT            ║
  263.        echo ║                                                ║
  264.        echo ║                                                ║
  265.        echo ╚════════════════════════════════════════════════╝
  266.  
  267. :END
  268. 
  269.