home *** CD-ROM | disk | FTP | other *** search
/ Mega CD-ROM 1 / megacd_rom_1.zip / megacd_rom_1 / HANDICAP / ASAP0991.ZIP / INSTALL.BAT < prev    next >
DOS Batch File  |  1991-07-29  |  8KB  |  348 lines

  1. echo off
  2. :
  3. ::ASAP Installation
  4. :
  5. cls
  6. echo install %1 %2 %3 %4 %5 %6>yoursyn.bat
  7. ::test for enough environment space
  8. :begin
  9. set asap=AutomaticScreenAccess
  10. if %asap%==AutomaticScreenAccess goto enough
  11. goto noroom
  12. :enough
  13. ::set destination directory
  14. SET ASAP=C:\ASAP
  15. ::set name of startup command (s.bat)
  16. set s=c:\s.bat
  17. :
  18. if %1x==x goto describe0
  19. set file=ASAP
  20. if exist %asap%\install.bat goto Don'tMake
  21. md %asap%>nul
  22. :Don'tMake
  23. :
  24. if %c%x==yesx goto AlreadyIn
  25. copy install.bat %asap%>nul
  26. if errorlevel 1 goto fail
  27. set c=yes
  28. call %asap%\install.bat %1 %2 %3 %4
  29. del %asap%\install.bat>nul
  30. goto exit
  31. :
  32. ::describe usage
  33. :
  34. :describe0
  35. if exist %asap%\asap.com goto update
  36. :DESCRIBE
  37. echo ·
  38. echo Usage: install [synthesizer] [port] [y or n]
  39. echo ·
  40. echo where [synthesizer] is one of the following:
  41. echo accent     for the Accent
  42. echo audapter   for the audapter
  43. echo BNS        for the Braille 'n Speak
  44. echo dectalk    for the DEC-Talk
  45. echo doubletalk for the DoubleTalk
  46. echo echo       for the Echo-PC
  47. echo generic    for synthesizers not listed here
  48. echo lt         for the LiteTalk or LapTalk
  49. echo porttalk    for synthesizers that use PortTalk
  50. echo sb         for the Sounding Board
  51. echo synphonix for the SynPhonix (Artic) board
  52. echo votalker   for the VoTalker
  53. echo ·
  54. echo [port] is one of the following:
  55. echo com1, com2, com3, com4, lpt1, lpt2, or lpt3.
  56. echo You don't have to give the port for DoubleTalk, SynPhonix, or VoTalker.
  57. echo (You should use lpt3 as the port for Accent-PC and Sounding Board.)
  58. echo ·
  59. echo [y or n] is the letter y if your computer is an XT or older, n if it is newer.
  60. rem echo ·
  61. goto exit
  62. :
  63. :AlreadyIn
  64. set c=
  65. echo One moment please
  66. echo ·
  67. :
  68. ::create the first lines of the batch file that will start ASAP
  69. :
  70. echo echo off>%s%
  71. echo path=%asap%;%%path%% >> %s%
  72. echo cd %asap%>>%s%
  73. :
  74. if %1==accent goto other
  75. if %1==audapter goto other
  76. if %1==bns goto other
  77. if %1==dectalk goto other
  78. if %1==doubletalk goto other
  79. if %1==echo goto other
  80. if %1==generic goto other
  81. if %1==lt goto other
  82. if %1==porttalk goto other
  83. if %1==sb goto other
  84. if %1==synphonix goto other
  85. if %1==votalker goto other
  86. echo warning: You didn't specify a recognized synthesizer key word.
  87. goto describe
  88. :
  89. :other
  90. :
  91. if %2==com1 goto goodport
  92. if %2==com2 goto goodport
  93. if %2==com3 goto goodport
  94. if %2==com4 goto goodport
  95. if %2==lpt1 goto goodport
  96. if %2==lpt2 goto goodport
  97. if %2==lpt3 goto goodport
  98. if %1==doubletalk goto internal
  99. if %1==synphonix goto internal
  100. if %1==votalker goto internal
  101. echo Warning: you forgot to specify where your synthesizer is connected.
  102. goto describe
  103. :
  104. :goodport
  105. :
  106. if %1==doubletalk goto Don'tPort
  107. if %1==synphonix goto Don'tPort
  108. if %1==votalker goto Don'tPort
  109. if %3x==x goto NoKey
  110. if %3==y goto goodkey
  111. if %3==n goto goodkey
  112. :
  113. :badkey
  114. echo Warning: You must specify if your computerr is an XT or older.
  115. goto describe
  116. :
  117. :goodkey
  118. set line=checkSB
  119. goto ShowMsg
  120. :
  121. :checkSB
  122. if %1==sb goto sb
  123. :
  124. ::finish up the batch file that will start ASAP
  125. :
  126. echo asap %1 %2 @y%3%4%%1>>%s%
  127. goto FinishUp
  128. :
  129. :NoKey
  130. echo Warning: You forgot to specify if your computer is an XT or older.
  131. goto describe
  132. :
  133. ::call with %file=file to copy, %disk=disk it is on, %line=where to go afterward
  134. :
  135. :checkfile
  136. if exist %file% goto copyfile
  137. cls
  138. echo ·
  139. echo Please remove this disk and insert the disk containing the file %file%.
  140. echo ·
  141. echo This should be located on the %disk% disk.
  142. echo ·
  143. pause
  144. goto checkfile
  145. :
  146. :copyfile
  147. echo copying file: %file%...
  148. echo ·
  149. copy %file% %asap%>nul
  150. if errorlevel 1 goto fail
  151. echo done.
  152. echo ·
  153. goto %line%
  154. :
  155. :fail
  156. echo ·
  157. echo Warning: an error ocurred while copying %file%.
  158. echo ·
  159. echo Check your disk, then try the install command again.
  160. echo ·
  161. goto exit
  162. :
  163. :sb
  164. :
  165. set disk=Sounding Board
  166. set file=sbload.com
  167. set line=sb1
  168. goto checkfile
  169. :sb1
  170. set file=sb.com
  171. set line=sb2
  172. goto checkfile
  173. :sb2
  174. set disk=ASAP
  175. echo sbload>>%s%
  176. echo sb /k0>>%s%
  177. echo asap sb lpt3 @y%3 %4 %%1>>%s%
  178. goto FinishUp
  179. :
  180. :nokey
  181. echo Warning: Don't use the port specification for %1.
  182. goto describe
  183. :
  184. :internal
  185. :
  186. if %2x==x goto NoKey
  187. if %2==y goto goodinternal
  188. if %2==n goto goodinternal
  189. goto badkey
  190. :
  191. :ShowMsg
  192. cls
  193. echo ·
  194. echo Setting up with the following configuration:
  195. echo ·
  196. echo Synthesizer: %1
  197. echo ·
  198. if %1==doubletalk goto ShowMsg1
  199. if %1==votalker goto ShowMsg1
  200. if %1==synphonix goto ShowMsg1
  201. echo Connected to: %2
  202. echo ·
  203. if %3==y echo Computer: XT or older
  204. if %3==n echo Computer: Newer than an XT
  205. goto ShowMsg2
  206. :ShowMsg1
  207. if %2==y echo Computer: XT or older
  208. if %2==n echo Computer: Newer than an XT
  209. :ShowMsg2
  210. echo ·
  211. echo If you need to change something about these specifications, press CTRL-C.
  212. echo ·
  213. echo Otherwise...
  214. echo ·
  215. pause
  216. cls
  217. echo ·
  218. echo ASAP Installation in progress...
  219. echo ·
  220. echo Please Wait...
  221. echo ·
  222. echo ·
  223. goto %line%
  224. :
  225. :goodinternal
  226. set line=int2
  227. goto ShowMsg
  228. :
  229. :int2
  230. if %1==votalker goto votalker
  231. if %1==synphonix goto synphonix
  232. echo asap @y%2%3%%1>>%s%
  233. goto FinishUp
  234. :VoTalker
  235. set disk=VoTalker
  236. set file=sonix.com
  237. set line=vt1
  238. goto checkfile
  239. :vt1
  240. set file=tts.com
  241. set line=vt2
  242. goto checkfile
  243. :vt2
  244. echo sonix>>%s%
  245. echo tts>>%s%
  246. echo asap 3s@y%2%3%%1>>%s%
  247. goto FinishUp
  248. :synphonix
  249. set disk=SynPhonix
  250. set file=sonixtts.com
  251. set line=sym2
  252. goto checkit
  253. :sym2
  254. echo sonixtts>>%s%
  255. echo asap 3s@y%2%3%%1>>%s%
  256. goto FinishUp
  257. :
  258. :update
  259. echo Updating to a new version of ASAP...
  260. echo ·
  261. echo Please Wait...
  262. echo ·
  263. set c=upd
  264. goto already
  265. :finishup
  266. echo cd \>>%s%
  267. :already
  268. set disk=ASAP
  269. set file=asap.com
  270. set line=brand
  271. goto checkfile
  272. :brand
  273. if not exist brand.com goto lex
  274. set file=brand.com
  275. set line=lex
  276. goto checkfile
  277. :lex
  278. set file=asap.lex
  279. set line=generic
  280. goto checkfile
  281. :generic
  282. echo Copying settings...
  283. copy *.set %asap%>nul
  284. copy *.00* %asap%>nul
  285. echo Copying the text files...
  286. copy *.txt %asap%>nul
  287. set file=generic.tbl
  288. set line=DoneCopying
  289. goto checkfile
  290. :DoneCopying
  291. c:
  292. CD %ASAP%
  293. if not exist brand.com goto NoBrand
  294. echo Inserting your serial number...
  295. echo ·
  296. brand.com>nul
  297. echo done.
  298. echo ·
  299. :NoBrand
  300. cls
  301. echo ·
  302. echo Your ASAP is installed.
  303. echo ·
  304. echo ·
  305. if %c%x==updx goto :instruct
  306. if %1==accent goto accent
  307. goto NotAccent
  308. :accent
  309. echo If your synthesizer requires a driver (like with the Accent-PC), edit
  310. echo the config.sys file as instructed in the synthesizer manual.
  311. echo ·
  312. :NotAccent
  313. echo To start ASAP, just type the letter S.
  314. echo ·
  315. echo If you find that all goes well with the "s" command, you may elect to
  316. echo add this to your autoexec.bat file so the computer talks as soon as you
  317. echo turn it on.  Some people prefer to use the "s" in case they don't want
  318. echo speech for some reason.  The choice is yours.
  319. echo ·
  320. echo If you decide to have the computer come up talking, just type the command:
  321. echo "echo call s.bat>>c:\autoexec.bat"
  322. echo Don't forget both of those ">" signs--if you just put one of them, you'll
  323. echo overwrite what's already in your autoexec.bat, and you don't want to do that.
  324. GOTO END
  325. :instruct
  326. echo To begin using the new version, reboot your computer.
  327. echo ·
  328. goto end
  329. :NOROOM
  330. ECHO WARNING: YOU'RE OUT OF ENVIRONMENT SPACE.
  331. ECHO ·
  332. echo This program can temporarily add more environment...
  333. echo ·
  334. echo You may press CTRL-C now if you don't want to do so...
  335. echo ·
  336. echo Otherwise...
  337. echo ·
  338. pause
  339. cls
  340. echo Adding Environment Space...Please Wait...
  341. ren c:\asap\asap.com oldasap.com>nul
  342. del c:\asap\asap.com>nul
  343. c:\command/e:1024 /cinstall %1 %2 %3 %4 %5 %6
  344. exit
  345. :END
  346. :EXIT
  347. cd \
  348.