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