home *** CD-ROM | disk | FTP | other *** search
/ ProPhone: National Telephone Directory 1993 / PCD93C2.ISO / install1 / install / inscript.eng next >
Text File  |  1993-07-01  |  13KB  |  533 lines

  1. ; ProCD (PR1) Installation Script
  2. ; <<DPR>> Sep 04 1991 SPD angepaßt an DPR                               hg
  3. ; <<SPD>> Dec 07 1990;1.00                                              dw
  4. ; <<SPD>> Nov 11 1990;1.00                                              ak
  5. ; Modified From:
  6. ; CD Answer Installation Script - Generic                               jdk
  7. ; <<CDA>> Aug 15 1990;2.02
  8.  
  9. ; single/multiple disk version
  10. ;
  11. ;    The first disk must contain the \INSTALL directory.
  12. ;    This contains the general system files for the install
  13. ;    process and may be repeated on disk #2, etc.
  14. ;    The application specific files are kept in a directory
  15. ;    named 'DISK1'. If additional disks are required, create
  16. ;    an (empty) file on the current disk named '\MORE' and
  17. ;    put the overflow files in a directory named \DISK2 (3, 4, ...).
  18.  
  19.  
  20.  
  21. BREAK Abort_Install
  22.  
  23.  
  24.  
  25. ;>>> Initialization/Defaults Setup
  26. GOSUB Initialize
  27.  
  28.  
  29.  
  30. ;>>> Start-up screen
  31. GOSUB TitleScreen
  32.  
  33.  
  34.  
  35. ;>>> Get installation destination path
  36. GOSUB Install_Where
  37.  
  38.  
  39.  
  40. CD <DestDrive>\
  41. IF NOT DIREXISTS <DestPath> GOTO skipMenu
  42. IF NOT EXISTS <DestPath>\<Product_Name>.EXE GOTO skipMenu
  43.  
  44.  
  45.  
  46. ;>>> Install menu - install, remove, alter, abort
  47. GOTO PreExistsMenu
  48.  
  49.  
  50.  
  51. :skipMenu
  52.  
  53. ;>>> Create Product Destination Directory
  54. GOSUB MakeDir
  55.  
  56.  
  57.  
  58. :DestDirExists
  59.  
  60.  
  61. SET DriverOk = N
  62. ;>>> Use Microsoft Extensions?
  63. ;GOSUB Mscdex_Option
  64. GOSUB Mscdex_Only
  65.  
  66.  
  67.  
  68.  
  69. ;>>> Device Drivers Menu
  70. ;>>> use menu only, if mscdex not used
  71. IF "<DriverOk>"=="Y" GOTO use_msc
  72. GOSUB DevDrivers
  73. :use_msc
  74.  
  75.  
  76. IF "<alter>"=="Y" GOTO Alter_Only
  77.  
  78.  
  79.  
  80. ;>>> Copy all product files and report when finished
  81. GOSUB CopyDisks
  82. GOSUB Config_And_Message
  83. WAIT
  84.  
  85.  
  86.  
  87. ;>>> All done
  88. GOTO Script_Exit
  89.  
  90.  
  91.  
  92. ;****************************************************************************
  93. ;Initialization/Defaults
  94.  
  95. :Initialize
  96.  
  97.  
  98. ; here are some defaults:
  99.  
  100. SET Product_ID = PR5
  101. SET Product_Name = PROCD
  102. ;  default CD-ROM interface (FS_HSGEN {High Sierra} or FS_ISGEN {ISO})
  103. SET def_driver = FS_STD
  104. SET scr_type = SC_STD
  105. CONFIG Screen = "<scr_type>=<extra>"
  106. SET def_lang = <$Language>
  107. CONFIG Language = "<def_lang>"
  108. SET CfgFileName = <Product_ID>SETUP.CFG
  109.  
  110.  
  111. ; install disk
  112. PARSE_PATH <$ProgDir>
  113. SET FromDrive = <$Drive>
  114. SET curdisk = 1
  115. GOSUB Disk_Insert
  116.  
  117.  
  118. ;  default destination drive
  119. PARSE_PATH <$CurDir>
  120. SET DestDrive = C:
  121. ;what is the purpose of this (following line)???
  122. ;;;;IF NOT "<$Drive>"=="<FromDrive>" DO SET def_def = <$Drive>
  123.  
  124. ; default dest directory
  125. PARSE_PATH <DestDrive>\<Product_Name>
  126. SET DestDir = <$Dir>
  127.  
  128.  
  129. RETURN
  130.  
  131.  
  132.  
  133. ;****************************************************************************
  134. ; Display Initial Installation Screen
  135.  
  136. :TitleScreen
  137.  
  138.  
  139. CLEAR
  140. TEXT                              ProPhone 1993\n\n
  141. ----                          Telephone Directory\n\n
  142. ----                         Software Version 2.2\n\n\n
  143. ---- NOTE: The install consists of two parts:\n
  144. ----    1 - Regional (or residential) Software Install\n
  145. ----    2 - Business Software Install\n\n\n
  146. ----                    Installation (Part 1 - Regional):
  147. WAIT
  148.  
  149. RETURN
  150.  
  151.  
  152.  
  153. ;****************************************************************************
  154. :Install_Where
  155.  
  156.  
  157. CLEAR
  158. TEXT The retrieval software must be installed on your hard disk or on a
  159. ---- formatted floppy disk. The standard values are drive <DestDrive> (normally
  160. ---- the hard disk), and a subdirectory named <DestDir>. To use these values,
  161. ---- press the ┘ (Enter) key twice. To alter them, type the new drive or
  162. ---- subdirectory at the appropriate prompt, then type ┘ (Enter).
  163.  
  164. INPUT 6,6,5 DestDrive = Install on drive     ?
  165. INPUT 6,8,40 DestDir = Install in directory ?
  166. SET DestPath = <DestDrive><DestDir>
  167.  
  168. IF "<DestDrive>"=="" GOTO BadDestDir
  169. IF "<DestDir>"=="\" GOTO BadDestDir
  170. IF "<DestDir>"=="" GOTO BadDestDir
  171. IF NOT DIREXISTS <DestDrive>\ GOTO BadDestDir
  172.  
  173. RETURN
  174.  
  175.  
  176.  
  177. ;****************************************************************************
  178. :BadDestDir
  179.  
  180.  
  181. CLEAR
  182. TEXT \nError -\n\n
  183. ----  The path "<DestDrive><DestDir>" is not allowed!\n
  184. ----There must be both a drive and a valid subdirectory name in order
  185. ---- to install the software.
  186. WAIT
  187.  
  188. GOTO Install_Where
  189.  
  190.  
  191.  
  192. ;****************************************************************************
  193. :PreExistsMenu
  194.  
  195.  
  196. CLEAR
  197. TEXT The directory "<DestPath>" already exists.
  198. NEWMENU ?, 3, 54
  199. MENU Remove the old version; install new version
  200. MENU Remove the old version; do not install new software
  201. MENU Alter configuration; do not copy software
  202. MENU Stop the installation without making any changes
  203.  
  204.  
  205. CHOICE 1
  206. GOSUB Replace_Delete
  207. GOTO DestDirExists
  208.  
  209. CHOICE 2
  210. GOSUB Total_Delete
  211. GOTO Script_Exit
  212.  
  213. CHOICE 3
  214. SET alter = Y
  215. IF NOT EXISTS <DestPath>\<CfgFileName> GOTO no_config
  216. DISP 5,14 Reading configuration...
  217. READCONFIG <DestPath>\<CfgFileName>
  218. :no_config
  219. GOTO DestDirExists
  220.  
  221. CHOICE 4
  222. GOTO Script_Exit
  223. ENDCHOICES
  224.  
  225.  
  226.  
  227. ;****************************************************************************
  228. :Replace_Delete
  229.  
  230.  
  231. CLEAR
  232. TEXT Deleting previous contents of <DestPath>...
  233. ; DEL <DestPath>\*.*
  234. ; DEL <DestPath>\*.
  235.  DEL <DestPath>\<Product_Name>.EXE
  236.  DEL <DestPath>\<Product_ID>HELP.HLP
  237.  DEL <DestPath>\<Product_ID>MSGS.*
  238. ; DEL <DestPath>\<Product_ID>DIAL.*
  239. ; DEL <DestPath>\<Product_ID>PRINT.*
  240.  DEL <DestPath>\FS_*.DRV
  241.  DEL <DestPath>\SC_*.DRV
  242.  
  243. RETURN
  244.  
  245.  
  246.  
  247. ;****************************************************************************
  248. :Total_Delete
  249.  
  250.  
  251. CLEAR
  252. TEXT Removing <DestPath> directory...
  253. ; DEL <DestPath>\*.*
  254. ; DEL <DestPath>\*.
  255.  DEL <DestPath>\<Product_Name>.*
  256.  DEL <DestPath>\<Product_ID>HELP.*
  257.  DEL <DestPath>\<Product_ID>MSGS.*
  258.  DEL <DestPath>\<Product_ID>*.CFG
  259. ; DEL <DestPath>\<Product_Name>.EXE
  260. ; DEL <DestPath>\<Product_ID>HELP.HLP
  261. ; DEL <DestPath>\<Product_ID>MSGS.*
  262. ; DEL <DestPath>\<Product_ID>DIAL.CFG
  263. ; DEL <DestPath>\<Product_ID>PRINT.CFG
  264. ; DEL <DestPath>\<Product_ID>SETUP.CFG
  265.  DEL <DestPath>\FS_*.DRV
  266.  DEL <DestPath>\SC_*.DRV
  267. ; SD only; DEL <DestPath>\NOTES\*.*
  268. ; SD only; DEL <DestPath>\NOTES\*.
  269. ; SD only; DEL <DestPath>\SWAP\*.*
  270. ; SD only; DEL <DestPath>\SWAP\*.
  271. ; SD only; RD <DestPath>\NOTES
  272. ; SD only; RD <DestPath>\SWAP
  273. IF NOT EXISTS <DestPath>\*.* GOTO remdest
  274.  
  275. TEXT <DestPath> directory has unknown files, directory not removed!!
  276. WAIT
  277. GOTO norem
  278.  
  279. :remdest
  280. RD <DestPath>
  281.  
  282. :norem
  283. DEL <DestDrive>\<Product_Name>.BAT
  284.  
  285. RETURN
  286.  
  287.  
  288.  
  289. ;****************************************************************************
  290. :Alter_Only
  291.  
  292.  
  293. CLEAR
  294. TEXT Updating Configuration
  295. WRITECONFIG <DestPath>\<CfgFileName>
  296. TEXT \n  Configuration Update complete!\n\n
  297. WAIT
  298. GOTO Script_Exit
  299.  
  300.  
  301.  
  302. ;****************************************************************************
  303. ; Create the destination directory
  304.  
  305. :MakeDir
  306.  
  307.  
  308. MD <DestPath>
  309. IF DIREXISTS <DestPath> GOTO okpath
  310.  
  311. ; Invalid destination directory -> ask again
  312. ; Will this work? - BadDestDir has no return but GOTO's a GOSUB with a return
  313. GOSUB BadDestDir
  314. GOTO MakeDir
  315.  
  316. :okpath
  317. ; SD only; MD <DestPath>\NOTES
  318. ; SD only; MD <DestPath>\SWAP
  319.  
  320. RETURN
  321.  
  322.  
  323.  
  324. ;****************************************************************************
  325. ; Device Driver Selection
  326.  
  327. :DevDrivers
  328.  
  329.  
  330. HSCOUNT hs
  331. IF NOT <hs>==0 GOTO have_hs
  332.  
  333. ; No CDROM device drivers are loaded
  334. GOSUB DevDrivers_None
  335.  
  336. :have_hs
  337.  
  338. SET msg =
  339. IF <hs>==1 GOTO instOne
  340.  
  341. ; SET multi_drivers = Y
  342.  
  343. TEXT A selection of CD-ROM device drivers are installed (see CONFIG.SYS):\n\n
  344. ----Select the desired CD-ROM device driver from this list of available
  345. ---- device drivers using the  and  keys. Press ┘ (Enter) when ready.\n
  346. ----Press Esc to abort installation.
  347. GOTO instMore
  348.  
  349. :instOne
  350. SET msg = A CD-ROM device driver is installed (see CONFIG.SYS):\n\n
  351.  
  352. :instMore
  353. HSDRIVER hsname = 25, 6
  354. CONFIG Driver = "<def_driver>=<hsname>"
  355. CLEAR
  356. TEXT <msg>The CD-ROM device driver selected is named "<hsname>". If this is not
  357. ---- correct, press Esc to abort the installation and check your CONFIG.SYS
  358. ---- file.\n\n
  359. WAIT
  360.  
  361. ; IF NOT "<multi_drivers>" == "Y"  GOTO done_multi_drivers
  362. ; CLEAR
  363. ; T