home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1995 September / C_BUYER.ISO / dosshare / movies / install.fil < prev    next >
Text File  |  1995-04-01  |  10KB  |  379 lines

  1. ' MOVIES TO GO!  DOS / WINDOWS Installation Script
  2. ' Copyright 1993, ImagiSOFT, Inc.
  3. ' Version 2.8
  4. ' April 1, 1995
  5.  
  6. ' Note:  This installation script is written for THE FINISHING TOUCH, a
  7. '        professional installation program which is also an ImagiSOFT
  8. '        product.  It is distributed with MOVIES TO GO! to make
  9. '        installation easier, and to reduce our support calls.
  10.  
  11. '        This script unpacks 4 compressed files (*.PAK) which is a
  12. '        major feature of the program.  For more information about
  13. '        THE FINISHING TOUCH, call ImagiSOFT at (505) 275-1920, or call
  14. '        our BBS at (505) 275-9696, 2400 - 28,800 Baud, N, 8, 1.
  15. '        It will always have the latest shareware version of
  16. '        THE FINISHING TOUCH so you can "try before you buy".
  17.  
  18. BACKGROUND ~0\INSTALL.BIN ' load binary file background
  19. TELESCOPE OFF
  20.  
  21. LANGUAGE ENGLISH       ' may be changed to GERMAN, FRENCH, SPANISH, DANISH, or DUTCH
  22.  
  23. TELESCOPE ON
  24. SHADOW OFF
  25. SPACE 2000             ' if they don't have 2 megs free, forget it
  26. PAUSE 300               ' wait 3 seconds
  27.  
  28. :OPENING                ' display opening menu
  29. WINOPEN 0 8 31
  30. "        INSTALLATION OPTIONS MENU"
  31. ""
  32. "1.  Install as Microsoft Windows 3.1 Application"
  33. "2.  Install as DOS Application"
  34. "3.  QUIT"
  35. ""
  36. "SELECT ONE OF THE ABOVE:    "
  37.  
  38. WINUPDATE +10 +1 30
  39. "INSTALLATION OPTIONS MENU"
  40. INPUT A 1 +28 +7 15
  41. WINCLOSE
  42.  
  43. CALL TEMP_FILE                 ' create temporary file
  44.  
  45. EXIST ~3\1.TMP                 ' selected windows install
  46. JUMP.YES WINDOWS_APP
  47.  
  48. EXIST ~3\2.TMP                 ' selected dos install
  49. JUMP.YES DOS_APP
  50.  
  51. EXIST ~3\3.TMP                 ' exit
  52. JUMP.YES EXIT
  53.  
  54. BEEP
  55. CALL TMP_DEL
  56. JUMP OPENING
  57.  
  58. :DOS_APP                       '   install as a dos app
  59. CALL TMP_DEL
  60.  
  61. CALL ESC                       ' have user set the drive
  62. DRIVE C 0 12 31 15 32 14 79
  63. WINCLOSE
  64.  
  65. CALL ESC                       ' have user set the path
  66. PATH \MOVIES 0 12 31 15 32 14 79
  67. WINCLOSE
  68.  
  69. CALL EMPTY_DIR                 ' make sure directory is empty
  70. CALL UNPACK                    ' unpack data files
  71.  
  72. PROMPT OFF                     ' create movies batch file
  73. DELETE ~1\MOVIES.BAT 1 24 51
  74. PROMPT ON
  75. FILE ~1\MOVIES.BAT
  76. "~1"
  77. "cd ~2"
  78. "MOVIES"
  79. "cd \"
  80.  
  81. EXIST ~1~2\MOVIES.TXT   ' print documentation y/n
  82. JUMP.NO SUCCESS
  83. CALL PRINT
  84.  
  85. :SUCCESS
  86. WINOPEN 0 8 31
  87. "MOVIES TO GO! has been successfully installed."
  88. ""
  89. "     To run it, enter the command"
  90. "     from the root directory of drive ~1."
  91. ""
  92. ""
  93. ""
  94. ""
  95. "Press the [Enter] key to continue."
  96. WINUPDATE +36 +3 30
  97. "MOVIES"
  98. WINUPDATE +7 +6 27
  99. "THANK YOU FOR CHOOSING OUR SOFTWARE!"
  100. WAIT +36 +9
  101. WINCLOSE
  102.  
  103. :RUN
  104. WINOPEN 0 11 31
  105. "Would you like to run MOVIES TO GO! right now   Y or N?"
  106. ASK +57 +1
  107. JUMP.NO EXIT
  108. RUN ~1\MOVIES.BAT
  109.  
  110. :WINDOWS_APP                   '   install as windows app
  111.  
  112. DRIVE C                        ' set ~1 to drive c
  113. PATH \WINDOWS                  ' set ~2 path
  114.  
  115. :TEST_WIN
  116. EXIST ~1~2\WIN.COM             ' check for windows
  117. JUMP.YES WIN_INSTALL
  118.  
  119. PROMPT OFF
  120. RD C:\WINDOWS                  ' the above exist command created this empty directory.  if it is legitimate, this command will fail, causing no harm
  121. PROMPT ON
  122.  
  123. EXIST ~3\1.TMP                 ' 1st time through, ignore beep
  124. JUMP.YES SKIP_BEEP
  125. BEEP
  126. RD ~1~2                        ' remove newly created, empty directory
  127. WINOPEN 0 8 79
  128. "Microsoft Windows is NOT found in the"
  129. "~1~2 directory.  Please try again."
  130. ""
  131. "Press ENTER to continue."
  132. WAIT +26 +4
  133. WINCLOSE
  134.  
  135. :SKIP_BEEP                     ' windows is in a directory other than C:\WINDOWS
  136. CALL TMP_DEL                   ' delete temporary file
  137. WINOPEN 0 8 31
  138. "To install MOVIES TO GO! to Microsoft Windows,"
  139. "we need to know which hard drive Windows is installed on."
  140. ""
  141. "             Most people have Windows on this hard drive."
  142. "             Press ENTER if this is correct, or change to"
  143. "             the correct drive letter."
  144. "             (Press ESC to quit.)"
  145. PROMPT OFF
  146. DRIVE C +2 +3 17 14 32 14 79
  147. WINCLOSE
  148.  
  149. PROMPT ON
  150. WINOPEN 0 8 31
  151. "We also need to know the name of the directory where Microsoft"
  152. "Windows is installed.  Most people have Windows installed in"
  153. "                              this directory.  Press ENTER"
  154. "                              if this is OK, or input the name"
  155. "                              of the directory where Windows"
  156. "                              is installed."
  157. "                              (Press ESC to quit.)"
  158. PROMPT OFF
  159. PATH \WINDOWS +1 +3 17 14 32 14 79
  160. WINCLOSE
  161. PROMPT ON
  162. PROMPT OFF
  163. JUMP TEST_WIN                  ' loop until valid input or quit
  164.  
  165. ' you know the windows directory, now install it
  166. :WIN_INSTALL
  167. CALL TMP_DEL
  168.  
  169. PROMPT OFF
  170. COPY ~1~2\PROGMAN.INI ~1~2\PROGMAN.BAK 0 0 0
  171. PROMPT ON
  172. FILE ~1~2\PROGMAN.INI               ' edit program manager file - add group #504 (arbritary high number)
  173. "Group504=~1\MOVIES\MOVIES.GRP"
  174.  
  175. PATH \MOVIES                        ' set ~2 path (windows group / pif file forces the directory name)
  176. MD ~1~2                             ' make the directory
  177. CALL EMPTY_DIR                      ' make sure directory is empty
  178.  
  179. WINOPEN 0 20 79
  180. "MOVIES TO GO! is being installed to the ~1~2 directory . . ."
  181.  
  182. CALL UNPACK                         ' unpack data files
  183. COPY ~0~\VIEW.COM ~1~2\ 0 0 0       ' copy file viewer
  184. WINCLOSE                            ' closes winopen above
  185.  
  186. EXIST ~1~2\MOVIES.TXT
  187. JUMP.NO SUCCESS_WIN
  188. CALL PRINT                          ' print docs y/n?
  189.  
  190. :SUCCESS_WIN
  191. WINOPEN 0 8 31
  192. "MOVIES TO GO! has been successfully installed in your"
  193. "Windows environment.  However, the changes won't take"
  194. "effect until you exit Windows, then run Windows again."
  195. ""
  196. ""
  197. ""
  198. "Press ENTER to return to Windows."
  199. WINUPDATE +5 +5 27
  200. "THANK YOU FOR CHOOSING OUR SOFTWARE!"
  201. WAIT +35 +7
  202. WINCLOSE
  203. END
  204.  
  205. ' ------------------
  206. '   error messages
  207. ' ------------------
  208. :INSTALL_FAILURE
  209. WINOPEN 0 8 79
  210. "MOVIES TO GO! INSTALLATION FAILED BEFORE IT FINISHED!!"
  211. ""
  212. "Possible reasons:"
  213. "   -- The floppy disk was damaged during shipping."
  214. "   -- Your disk drive is out of alignment."
  215. "   -- The floppy disk was removed prior to completion."
  216. ""
  217. "Press [Enter] to Continue."
  218. WAIT +28 +8
  219. WINCLOSE
  220. JUMP EXIT
  221.  
  222. ' -----------
  223. ' subroutines
  224. ' -----------
  225. :EMPTY_DIR
  226. EXIST ~1~2\*.*                       ' check to see if directory is empty
  227. JUMP.NO SKIP_SURE
  228.  
  229. EXIST ~1~2\1*.FIL                     ' if it is previous MOVIES TO GO! OK
  230. JUMP.YES SKIP_SURE
  231.  
  232. WINOPEN 0 8 79
  233. "The directory ~1~2 already exists and contains files!"
  234. ""
  235. "   Installing MOVIES TO GO! in this directory will"
  236. "                DELETE ALL THE FILES"
  237. "       in this directory prior to installing."
  238. ""
  239. ""
  240. WINUPDATE +2 +7 78
  241. "Are you SURE you want to install it here   Y or N?"
  242. ASK +52 +7
  243. WINCLOSE
  244. JUMP.YES SKIP_SURE
  245. JUMP DOS_APP
  246.  
  247. :SKIP_SURE
  248. PROMPT OFF                            ' don't show files being deleted
  249. COPY ~1~2\NOTE.FIL ~1\NOTE.FIL 0 0 0  ' preserve users personal notes
  250. DELETE ~1~2\*.* 1 24 51               ' delete all files in case they are
  251. PROMPT ON                             ' installing a 2nd time
  252. CALL TMP_DEL                          ' delete temporary file
  253. RETURN
  254.  
  255. :TMP_DEL            '   delete temporary file (don't inform user)
  256. PROMPT OFF
  257. DELETE ~3\~A.TMP 0 0 0
  258. PROMPT ON
  259. RETURN
  260.  
  261. :UNPACK        ' unpack data files
  262. SET.FILES 16   ' make sure files >=16 in autoexec.bat
  263.  
  264. EXIST ~0\MOVIES.PAK
  265. JUMP.NO REGULAR
  266. UNPACK MOVIES.PAK 0 10 31 32 15 79      ' text version only
  267. JUMP.FAIL INSTALL_FAILURE
  268. JUMP DONE_PACK
  269.  
  270. :REGULAR
  271. UNPACK DATA.PAK 0 10 31 32 15 79      ' data files
  272. JUMP.FAIL INSTALL_FAILURE
  273.  
  274. UNPACK TEXT.PAK 0 10 31 32 15 79      ' text version, other necessary files
  275. JUMP.FAIL INSTALL_FAILURE
  276.  
  277. VIDEO VGA                              ' test for VGA or better
  278. JUMP.NO NO_VGA                         ' to see whether to install graphics
  279.  
  280. :GRAPHICS_INSTALL
  281. EXIST ~0\GRAPHICS.PAK                  ' prompt for 2nd disk on 720 k setup
  282. JUMP.YES HD_DISK
  283.  
  284. WINOPEN 0 10 31
  285. BEEP
  286. "Please Insert Disk Number 2 in Drive ~0."
  287. ""
  288. "Press the [Enter] key to continue."
  289. WAIT +36 +3
  290. WINCLOSE
  291. JUMP GRAPHICS_INSTALL                  ' loop until correct disk inserted
  292.  
  293. :HD_DISK
  294. CPU 386                                ' look for 386+
  295. JUMP.YES 386
  296.  
  297. WINOPEN 0 10 31
  298. "The GRAPHICS VERSION May Be Slow on Your Computer."
  299. ""
  300. ""
  301. ""
  302. "(If you decide that the graphics version is too slow, simply"
  303. " install the software again, and answer  N  to this question.)"
  304. WINUPDATE +2 +3 30
  305. "Do You Want To Install it Anyway   Y or N?"
  306. ASK +44 +3
  307. WINCLOSE
  308. JUMP.NO NO_VGA
  309.  
  310. :386
  311. FREE 1200                                ' disk space for graphics version
  312. JUMP.NO NO_VGA
  313. UNPACK GRAPHICS.PAK 0 10 31 32 15 79     ' graphics version
  314. JUMP.FAIL INSTALL_FAILURE
  315.  
  316. COPY ~1\NOTE.FIL ~1~2\NOTE.FIL 0 0 0     ' copy client's personal notes file back
  317.  
  318. FREE 1000                                ' disk space for animated icons
  319. JUMP.NO DONE_PACK
  320. UNPACK ICON.PAK 0 10 31 32 15 79         ' fun stuff
  321. JUMP.FAIL INSTALL_FAILURE
  322. JUMP DONE_PACK
  323.  
  324. :NO_VGA                                     ' only text version
  325. PROMPT OFF
  326. COPY ~1~2\TEXT.EXE ~1~2\MOVIES.EXE 1 24 51  ' rename text program
  327. DELETE ~1~2\TEXT.EXE 1 24 51
  328. DELETE ~1~2\ICON.ML  1 24 51
  329. PROMPT ON
  330. :DONE_PACK
  331. RETURN
  332.  
  333. :PRINT
  334. WINOPEN 0 10 30
  335. "Would you like to PRINT the 36 Page Manual   Y or N?"
  336. ASK +54 +1
  337. WINCLOSE
  338. JUMP.NO BYE_PRINT
  339.  
  340. WINOPEN 0 10 79
  341. ""
  342. "   Printing 36 Pages . . .  "
  343. ""
  344. PRINT ~1~2\MOVIES.TXT
  345. WINCLOSE
  346. JUMP.FAIL PRINTER_ERROR
  347. JUMP BYE_PRINT
  348.  
  349. :PRINTER_ERROR
  350. WINOPEN 0 10 79
  351. "Your Printer is not responding.  Possible problems:"
  352. ""
  353. "  -- Printer is not turned on"
  354. "  -- Printer is out of paper"
  355. "  -- Printer is not attached to LPT1 (parallel port 1)"
  356. ""
  357. ""
  358. WINUPDATE +2 +7 78
  359. "Do you want to try to print again  Y or N?"
  360. ASK +44 +7
  361. WINCLOSE
  362. JUMP.YES PRINT
  363. :BYE_PRINT
  364. RETURN
  365.  
  366. :TEMP_FILE ' create a temporary file in the default directory with a unique name based on the number input by the user
  367. FILE ~3\~A.TMP
  368. "Delete this temporary file."
  369. RETURN
  370.  
  371. :ESC
  372. WINOPEN 0 20 31
  373. "(Press ESC to Quit) "
  374. RETURN
  375.  
  376. :EXIT
  377. CALL TMP_DEL
  378. END
  379.