home *** CD-ROM | disk | FTP | other *** search
- ; ProCD (PR1) Installation Script
- ; <<DPR>> Sep 04 1991 SPD angepaßt an DPR hg
- ; <<SPD>> Dec 07 1990;1.00 dw
- ; <<SPD>> Nov 11 1990;1.00 ak
- ; Modified From:
- ; CD Answer Installation Script - Generic jdk
- ; <<CDA>> Aug 15 1990;2.02
-
- ; single/multiple disk version
- ;
- ; The first disk must contain the \INSTALL directory.
- ; This contains the general system files for the install
- ; process and may be repeated on disk #2, etc.
- ; The application specific files are kept in a directory
- ; named 'DISK1'. If additional disks are required, create
- ; an (empty) file on the current disk named '\MORE' and
- ; put the overflow files in a directory named \DISK2 (3, 4, ...).
-
-
-
- BREAK Abort_Install
-
-
-
- ;>>> Initialization/Defaults Setup
- GOSUB Initialize
-
-
-
- ;>>> Start-up screen
- GOSUB TitleScreen
-
-
-
- ;>>> Get installation destination path
- GOSUB Install_Where
-
-
-
- CD <DestDrive>\
- IF NOT DIREXISTS <DestPath> GOTO skipMenu
- IF NOT EXISTS <DestPath>\<Product_Name>.EXE GOTO skipMenu
-
-
-
- ;>>> Install menu - install, remove, alter, abort
- GOTO PreExistsMenu
-
-
-
- :skipMenu
-
- ;>>> Create Product Destination Directory
- GOSUB MakeDir
-
-
-
- :DestDirExists
-
-
- SET DriverOk = N
- ;>>> Use Microsoft Extensions?
- ;GOSUB Mscdex_Option
- GOSUB Mscdex_Only
-
-
-
-
- ;>>> Device Drivers Menu
- ;>>> use menu only, if mscdex not used
- IF "<DriverOk>"=="Y" GOTO use_msc
- GOSUB DevDrivers
- :use_msc
-
-
- IF "<alter>"=="Y" GOTO Alter_Only
-
-
-
- ;>>> Copy all product files and report when finished
- GOSUB CopyDisks
- GOSUB Config_And_Message
- WAIT
-
-
-
- ;>>> All done
- GOTO Script_Exit
-
-
-
- ;****************************************************************************
- ;Initialization/Defaults
-
- :Initialize
-
-
- ; here are some defaults:
-
- SET Product_ID = PR5
- SET Product_Name = PROCD
- ; default CD-ROM interface (FS_HSGEN {High Sierra} or FS_ISGEN {ISO})
- SET def_driver = FS_STD
- SET scr_type = SC_STD
- CONFIG Screen = "<scr_type>=<extra>"
- SET def_lang = <$Language>
- CONFIG Language = "<def_lang>"
- SET CfgFileName = <Product_ID>SETUP.CFG
-
-
- ; install disk
- PARSE_PATH <$ProgDir>
- SET FromDrive = <$Drive>
- SET curdisk = 1
- GOSUB Disk_Insert
-
-
- ; default destination drive
- PARSE_PATH <$CurDir>
- SET DestDrive = C:
- ;what is the purpose of this (following line)???
- ;;;;IF NOT "<$Drive>"=="<FromDrive>" DO SET def_def = <$Drive>
-
- ; default dest directory
- PARSE_PATH <DestDrive>\<Product_Name>
- SET DestDir = <$Dir>
-
-
- RETURN
-
-
-
- ;****************************************************************************
- ; Display Initial Installation Screen
-
- :TitleScreen
-
-
- CLEAR
- TEXT ProPhone 1993\n\n
- ---- Telephone Directory\n\n
- ---- Software Version 2.2\n\n\n
- ---- NOTE: The install consists of two parts:\n
- ---- 1 - Regional (or residential) Software Install\n
- ---- 2 - Business Software Install\n\n\n
- ---- Installation (Part 1 - Regional):
- WAIT
-
- RETURN
-
-
-
- ;****************************************************************************
- :Install_Where
-
-
- CLEAR
- TEXT The retrieval software must be installed on your hard disk or on a
- ---- formatted floppy disk. The standard values are drive <DestDrive> (normally
- ---- the hard disk), and a subdirectory named <DestDir>. To use these values,
- ---- press the ┘ (Enter) key twice. To alter them, type the new drive or
- ---- subdirectory at the appropriate prompt, then type ┘ (Enter).
-
- INPUT 6,6,5 DestDrive = Install on drive ?
- INPUT 6,8,40 DestDir = Install in directory ?
- SET DestPath = <DestDrive><DestDir>
-
- IF "<DestDrive>"=="" GOTO BadDestDir
- IF "<DestDir>"=="\" GOTO BadDestDir
- IF "<DestDir>"=="" GOTO BadDestDir
- IF NOT DIREXISTS <DestDrive>\ GOTO BadDestDir
-
- RETURN
-
-
-
- ;****************************************************************************
- :BadDestDir
-
-
- CLEAR
- TEXT \nError -\n\n
- ---- The path "<DestDrive><DestDir>" is not allowed!\n
- ----There must be both a drive and a valid subdirectory name in order
- ---- to install the software.
- WAIT
-
- GOTO Install_Where
-
-
-
- ;****************************************************************************
- :PreExistsMenu
-
-
- CLEAR
- TEXT The directory "<DestPath>" already exists.
- NEWMENU ?, 3, 54
- MENU Remove the old version; install new version
- MENU Remove the old version; do not install new software
- MENU Alter configuration; do not copy software
- MENU Stop the installation without making any changes
-
-
- CHOICE 1
- GOSUB Replace_Delete
- GOTO DestDirExists
-
- CHOICE 2
- GOSUB Total_Delete
- GOTO Script_Exit
-
- CHOICE 3
- SET alter = Y
- IF NOT EXISTS <DestPath>\<CfgFileName> GOTO no_config
- DISP 5,14 Reading configuration...
- READCONFIG <DestPath>\<CfgFileName>
- :no_config
- GOTO DestDirExists
-
- CHOICE 4
- GOTO Script_Exit
- ENDCHOICES
-
-
-
- ;****************************************************************************
- :Replace_Delete
-
-
- CLEAR
- TEXT Deleting previous contents of <DestPath>...
- ; DEL <DestPath>\*.*
- ; DEL <DestPath>\*.
- DEL <DestPath>\<Product_Name>.EXE
- DEL <DestPath>\<Product_ID>HELP.HLP
- DEL <DestPath>\<Product_ID>MSGS.*
- ; DEL <DestPath>\<Product_ID>DIAL.*
- ; DEL <DestPath>\<Product_ID>PRINT.*
- DEL <DestPath>\FS_*.DRV
- DEL <DestPath>\SC_*.DRV
-
- RETURN
-
-
-
- ;****************************************************************************
- :Total_Delete
-
-
- CLEAR
- TEXT Removing <DestPath> directory...
- ; DEL <DestPath>\*.*
- ; DEL <DestPath>\*.
- DEL <DestPath>\<Product_Name>.*
- DEL <DestPath>\<Product_ID>HELP.*
- DEL <DestPath>\<Product_ID>MSGS.*
- DEL <DestPath>\<Product_ID>*.CFG
- ; DEL <DestPath>\<Product_Name>.EXE
- ; DEL <DestPath>\<Product_ID>HELP.HLP
- ; DEL <DestPath>\<Product_ID>MSGS.*
- ; DEL <DestPath>\<Product_ID>DIAL.CFG
- ; DEL <DestPath>\<Product_ID>PRINT.CFG
- ; DEL <DestPath>\<Product_ID>SETUP.CFG
- DEL <DestPath>\FS_*.DRV
- DEL <DestPath>\SC_*.DRV
- ; SD only; DEL <DestPath>\NOTES\*.*
- ; SD only; DEL <DestPath>\NOTES\*.
- ; SD only; DEL <DestPath>\SWAP\*.*
- ; SD only; DEL <DestPath>\SWAP\*.
- ; SD only; RD <DestPath>\NOTES
- ; SD only; RD <DestPath>\SWAP
- IF NOT EXISTS <DestPath>\*.* GOTO remdest
-
- TEXT <DestPath> directory has unknown files, directory not removed!!
- WAIT
- GOTO norem
-
- :remdest
- RD <DestPath>
-
- :norem
- DEL <DestDrive>\<Product_Name>.BAT
-
- RETURN
-
-
-
- ;****************************************************************************
- :Alter_Only
-
-
- CLEAR
- TEXT Updating Configuration
- WRITECONFIG <DestPath>\<CfgFileName>
- TEXT \n Configuration Update complete!\n\n
- WAIT
- GOTO Script_Exit
-
-
-
- ;****************************************************************************
- ; Create the destination directory
-
- :MakeDir
-
-
- MD <DestPath>
- IF DIREXISTS <DestPath> GOTO okpath
-
- ; Invalid destination directory -> ask again
- ; Will this work? - BadDestDir has no return but GOTO's a GOSUB with a return
- GOSUB BadDestDir
- GOTO MakeDir
-
- :okpath
- ; SD only; MD <DestPath>\NOTES
- ; SD only; MD <DestPath>\SWAP
-
- RETURN
-
-
-
- ;****************************************************************************
- ; Device Driver Selection
-
- :DevDrivers
-
-
- HSCOUNT hs
- IF NOT <hs>==0 GOTO have_hs
-
- ; No CDROM device drivers are loaded
- GOSUB DevDrivers_None
-
- :have_hs
-
- SET msg =
- IF <hs>==1 GOTO instOne
-
- ; SET multi_drivers = Y
-
- TEXT A selection of CD-ROM device drivers are installed (see CONFIG.SYS):\n\n
- ----Select the desired CD-ROM device driver from this list of available
- ---- device drivers using the and keys. Press ┘ (Enter) when ready.\n
- ----Press Esc to abort installation.
- GOTO instMore
-
- :instOne
- SET msg = A CD-ROM device driver is installed (see CONFIG.SYS):\n\n
-
- :instMore
- HSDRIVER hsname = 25, 6
- CONFIG Driver = "<def_driver>=<hsname>"
- CLEAR
- TEXT <msg>The CD-ROM device driver selected is named "<hsname>". If this is not
- ---- correct, press Esc to abort the installation and check your CONFIG.SYS
- ---- file.\n\n
- WAIT
-
- ; IF NOT "<multi_drivers>" == "Y" GOTO done_multi_drivers
- ; CLEAR
- ; TEXT This product is a multiple disc product. Do you wish to use additional
- ; ---- CD-ROM drives
-
- ; :done_multi_drivers
-
- RETURN
-
-
-
- ;****************************************************************************
- :DevDrivers_None
-
-
- CLEAR
- TEXT Problem - You have no CD-ROM device drivers installed.\n\n
- ----Please use the install disk supplied by your CD-ROM drive manufacturer
- ---- to install the device driver software, and then repeat this install
- ---- program.\n\n
- ----Note: The CD-ROM drive install disk will copy some files to your system
- ---- disk and modify the CONFIG.SYS and AUTOEXEC.BAT files.\n
- ----Unless you have other programs which use the MSCDEX program, it is
- ---- recommended that you remove the line calling this program from your
- ---- AUTOEXEC.BAT file, since this software does not require it.\n\n
- ----Be sure to reboot after the CD-ROM drivers are installed.
- WAIT
- ABORT
-
-
-
- ;****************************************************************************
- ; Use MSCDEX or Dataware driver instead?
-
- :Mscdex_Option
- BREAK Abort_Install
-
- CLEAR
- TEXT Microsoft CD-ROM Extensions (MSCDEX.EXE) may be used to communicate
- ---- with the CD-ROM drive. However 'MSCDEX' is generally not necessary for this
- ---- product. Since it uses more memory than would otherwise be required it
- ---- is recommended that it not be used unless necessary. It is necessary if
- ---- you have multiple CD-ROM drive sub-units and you wish to run the product
- ---- on a sub-unit other than sub-unit '0'. If you do not require it, you may
- ---- remove MSCDEX.EXE from your \AUTOEXEC.BAT file (where the drive's
- ---- INSTALL program may have put it).
-
- NEWMENU ?, 11, 40
- MENU Do NOT use Microsoft CD-ROM Extensions
- MENU Use Microsoft CD-ROM Extensions
-
- CHOICE 1
- RETURN
-
- CHOICE 2
- BREAK Mscdex_Option
- :Mscdex_Only
- CLEAR
- TEXT When MSCDEX.EXE is executed it responds with a DOS drive letter that
- ---- corresponds to the CD-ROM drive. Enter this drive letter.
- SET MscdexDrive =
- :must_have
- INPUT 8,6,1 MscdexDrive = CD-ROM's drive letter?
- IF "<MscdexDrive>" == "" GOTO must_have
- BREAK Abort_Install
- CONFIG Driver = "FS_STD=<MscdexDrive>:\"
- SET DriverOk = Y
- RETURN
-
- ENDCHOICES
-
-
-
- ;****************************************************************************
- :CopyDisks
-
-
- GOSUB Disk_Insert
-
- CLEAR
- TEXT Installing Application files...
- COPY_OPT <FromDrive>\DISK<curdisk>\<Product_Name>.* <DestPath>
- COPY_OPT <FromDrive>\DISK<curdisk>\<Product_ID>*.* <DestPath>
- COPY_OPT <FromDrive>\DISK<curdisk>\*.DRV <DestPath>
-
- CALC curdisk = <curdisk> + 1
- IF EXISTS <FromDrive>MORE GOTO CopyDisks
-
- RETURN
-
-
-
- ;****************************************************************************
- ; Request Disk Insertion
-
-
- :disk_retry
- CLEAR
- TEXT Insert Install Disk Number <curdisk> and press ┘ (Enter) when ready.
- WAIT
-
-
-
- :Disk_Insert
-
- IF DIREXISTS <FromDrive>\DISK<curdisk> DO RETURN
-
- CLEAR
- TEXT The disk inserted is not Installation Disk Number <curdisk> !
- NEWMENU ?, 3, 15
- MENU Retry
- MENU Abort
-
- CHOICE 1
- GOTO disk_retry
- ENDCHOICES
-
- ABORT
-
-
-
- ;****************************************************************************
- ; Installation Success
-
- :Config_And_Message
-
-
- CLEAR
- TEXT Updating Configuration
- WRITECONFIG <DestPath>\<CfgFileName>
- WRITEFILE <DestDrive>\<Product_Name>.BAT = <DestDrive>\ncd <DestDir>\n<DestPath>\<Product_Name>\ncd \\n
-
-
- CLEAR
- TEXT \n Regional installation complete!\n\n
- ----A batch file was created in the <DestDrive>\ directory with the name <Product_Name>.\n\n
- ----To execute the program, type:\n\n
- ---- <Product_Name> ┘ (Enter)\n\n
- ----Important: In order for this command to work as shown, you must be in
- ---- the <DestDrive>\ directory or have it in your PATH variable.\n\n
- ---- NOTE: Now proceeding with the Business installation.
- RETURN
-
-
-
- ;****************************************************************************
- :Abort_Install
-
-
- if "<DestPath>"=="" GOTO nofiles
- if "<alter>"=="Y" GOTO nofiles
-
- CLEAR
- TEXT \n\n!!! Installation Aborted !!!\n\n
- ---- Removing any copied files...
- UNCOPY
-
- :nofiles
- CLEAR
- TEXT \n\n!!! Installation Aborted !!!\n\n
-
- WAIT
- GOTO Script_Exit
-
-
-
- ;****************************************************************************
- ; Exit INSTALL.EXE
-
-
- :Script_Exit
- CD <$CurDir>
-