home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 14 / CD_ASCQ_14_0694.iso / maj / 4379 / install.fil < prev    next >
Text File  |  1994-04-18  |  13KB  |  362 lines

  1. ' Sample Install Script for
  2. ' The Finishing Touch
  3. ' Professional Software Installation Utility
  4. ' Copyright 1994, ImagiSOFT, Inc.
  5. ' April 18, 1994
  6.  
  7. ' NOTE:  This script file takes a LONG TIME to load because INSTALL.EXE
  8. '        does a CRC check of the documentation files before proceeding.
  9. '        The registered version does NOT do this.
  10.  
  11. '        There is a 400 line maximum for any one script file.  However,
  12. '        this limitation can be overcome by using the SCRIPT command.
  13.  
  14. '        This script file doesn't use all the possible commands.
  15. '        See the documentation for the commands to check hardware,
  16. '        perform conditional jumps, view ASCII files, run or shell
  17. '        to DOS programs, change AUTOEXEC.BAT and CONFIG.SYS,
  18. '        invoke other script files, and more!
  19.  
  20. BACKGROUND INSTALL.BIN   ' display binary file as background (see READ.ME)
  21.  
  22. LANGUAGE ENGLISH
  23. ' French, German, and Spanish are also supported.  English is the default
  24.  
  25. BORDER 1            ' single line borders. 2 = double, 0 = no border
  26.  
  27. PAUSE 300           ' 3 second delay
  28.  
  29. TELESCOPE ON        ' turn on telescoping windows for the rest of the messages
  30.  
  31. SHADOW OFF
  32. ' display all messages from this point on without "shadowed" window
  33. ' the default is "OFF".  This feature can be turned on and off as many
  34. ' times as you want
  35.  
  36. WINOPEN 11 5 31     ' display the heading in a window
  37.                     '   located at 11 characters across
  38.                     '               5 rows down  with a
  39.                     '   blue background and high intensity white letters
  40.                     '   (see color chart)
  41. ' WINOPEN 0 5 31    ' use this command instead to make sure the
  42.                     ' window is centered horizontally on the screen
  43.  
  44. "THE FINISHING TOUCH WILL SAVE YOU MONEY BY . . .       "
  45. ""
  46. ""
  47. ""
  48. ""
  49. ""
  50. ""
  51. ""
  52.  
  53. ' another nice feature is the ability to write text in a different color
  54. ' within a window.  Most commands can use relative cursor positions, as
  55. ' shown in this example:
  56. WINUPDATE +36 +1 26
  57. "MONEY"
  58. PAUSE 300                                   ' 3 seconds
  59. WINUPDATE +2 +3 30
  60. "■ Cutting the number of disks in your program in half."
  61. "  (see the UNPACK command and PACKER utility)"
  62. BEEP
  63. PAUSE 200
  64. WINUPDATE +2 +3 31
  65. "■ Cutting the number of disks in your program in half."
  66. "  (see the UNPACK command and PACKER utility)"
  67. WINUPDATE +2 +6 30
  68. "■ Reducing your installation support problems."
  69. BEEP
  70. PAUSE 200
  71. WINUPDATE +2 +6 31
  72. "■ Reducing your installation support problems."
  73. WINUPDATE +2 +8 30
  74. "Press the [Enter] key to continue."
  75. WAIT +36 +8                                ' wait for the enter key
  76. WINCLOSE                                   ' close the window
  77.  
  78. BORDER 2                                   ' double line border
  79. ' window = blue with green border
  80. WINOPEN 0 5 18
  81. "                                           "  ' widest message determines
  82. ""                                             ' the width of the window
  83. ""                                             ' this window is nine lines
  84. ""                                             ' long.
  85. ""
  86. ""
  87. ""
  88. ""
  89.  
  90. ' white letters inside window
  91. WINUPDATE +2 +2 31
  92. "■ Is Rich with Powerful Features"
  93. ""
  94. "■ Is Easy to Learn"
  95. "  (Look at INSTALL.FIL for this script)"
  96. ""
  97. "■ Can be as simple or complex as you want"
  98.  
  99. ' heading = yellow text on green
  100. WINUPDATE +14 +0 46               ' +0 = top border
  101. " THE FINISHING TOUCH "
  102.  
  103. ' bottom of window green / blue letters
  104. WINUPDATE +16 +9 33               ' +9 = bottom border
  105. " Press [Enter] "                 ' (good when space is tight)
  106. WAIT +30 +9                       ' wait for enter key, cursor location
  107. WINCLOSE                          ' close window
  108.  
  109. BORDER 1                          ' personally, I like single borders
  110. WINOPEN 0 5 31
  111. "This sample installation file will demonstrate some of"
  112. "THE FINISHING TOUCH'S features by installing a FREE"
  113. "file date and time stamping utility."
  114. ""
  115.  
  116. WINUPDATE +49 +2 27                        ' change the color of
  117. "FREE"                                     ' the word "free" to cyan
  118.  
  119. WINUPDATE +15 +5 31                         ' write on top of bottom border
  120. " Press [Enter] to continue "              ' (good when space is tight)
  121.  
  122. WINUPDATE +22 +5 30                        ' yellow text
  123. "[Enter]"
  124.  
  125. WAIT +41 +5                                ' wait for the enter key
  126. WINCLOSE                                   ' close the window
  127.  
  128. ' Tell INSTALL the minimum amount of required disk space
  129. SPACE 7                          ' This sample is tiny, only 7K required.
  130.  
  131. '  Prompt for the drive to install to:
  132. DRIVE C 0 12 31 15 32 14 79
  133. '         C = drive C, the pre-stuffed drive letter
  134. '         0 = center window horizontally
  135. '        12 =              and  12  rows down
  136. '        31 = blue background and high intensity white foreground
  137. '        15 = input on a black background w/ high intensity white letters
  138. '        32 = error message located at 32 characters across
  139. '        14 =                      and 14 rows down
  140. '        79 = any error message will appear in a red window with
  141. '             high intensity white letters
  142.  
  143. ' After  the user selects a drive and presses [Enter], the first  thing
  144. ' the  DRIVE command does is make sure the drive exists.  Next it  will
  145. ' check  for the required disk space.  If the drive does not exist,  or
  146. ' there is not enough space, an error message appears, and the user  is
  147. ' required to pick a different drive, or quit.
  148.  
  149. ' Prompt with default path \SAMPLE
  150. ' INSTALL.EXE  will work the same way whether the user enters SAMPLE,
  151. ' \SAMPLE\, or \SAMPLE.  Mutiple directories such as \SAMPLE\UTIL\FREE
  152. ' are also supported.
  153. PATH \SAMPLE 0 12 31 15 32 14 79
  154.  
  155. ' the numbers above represent window locations and colors.  See the
  156. ' documentation for more details
  157.  
  158. '  Unpack the files from the floppy drive.
  159.  
  160. UNPACK SAMPLE.PAK 0 12 31 32 14 79
  161. ' SAMPLE.PAK was compressed using the enclosed PACKER utility.  This
  162. ' utility will compress files 50% or more depending on the file type.
  163. ' you should get compression results close to that of PKZIP.
  164. ' the numbers above represent window locations and colors.  See the
  165. ' documentation for more details
  166.  
  167. ' just for fun, open the disk drive right in the middle of the installation
  168. ' and see what happens.  This is only one of four "jump" commands supported.
  169. ' see the documentation for JUMP, JUMP.NO, and JUMP.YES commands.
  170.  
  171. JUMP.FAIL INSTALL_FAILURE
  172.  
  173. WINOPEN 0 5 31
  174.  
  175. "A FREE file stamping utility has been installed on your"
  176. "computer in the directory"
  177. ""
  178. "This is our way of saying THANKS for taking the time to"
  179. "review the THE FINISHING TOUCH!"
  180. ""
  181. "Press the [Enter] key to continue."
  182.  
  183. WINUPDATE +28 +2 30                       ' display text in yellow
  184. "~1~2."
  185.  
  186. WINUPDATE +28 +4 27                       ' cyan
  187. "THANKS"
  188.  
  189. WAIT +36 +7
  190. ' Wait for the user to press the [Enter] key so they can
  191. ' read the above window.
  192. ' The plus signs denote that you want the cursor located relative to
  193. ' the upper left hand corner of the window (position 0, 0) 7 rows down
  194. ' and 36 characters across.
  195.  
  196. WINCLOSE                         ' close the above window
  197.  
  198. ' ------------------------------------------------------
  199. ' Ask user if they would like to view the utility's docs
  200. ' ------------------------------------------------------
  201. WINOPEN 0 5 31
  202. "Would you like to see the new utility's documentation?"
  203. ""                            ' this is necessary so that the winupdate
  204.                               ' command will have some place to display the
  205.                               ' (Y or N)
  206.  
  207. WINUPDATE +25 +2 30           ' yellow text
  208. "(Y or N)"
  209.  
  210. ASK +33 +2                    ' one method of providing a "conditional" jump
  211.                               ' note relative cursor positioning
  212.  
  213. WINCLOSE                      ' close the above window
  214.  
  215. JUMP.NO VIEW_INSTALL.TXT      ' skip the view command if the user
  216.                               ' hits the "N" key from the above
  217.                               ' ASK statement.
  218.  
  219. VIEW ~1~2\STAMP.TXT 79 31     ' as you can see, The Finishing Touch
  220.                               ' has a built-in file viewer
  221.  
  222. ' -----------------------------------------------------
  223. ' Ask user if they would like to view the documentation
  224. ' -----------------------------------------------------
  225. :VIEW_INSTALL.TXT
  226. WINOPEN 0 5 31
  227. "Would you like to SEE the documentation for THE FINISHING TOUCH?"
  228. ""
  229.  
  230. WINUPDATE +31 +2 30            ' yellow text
  231. "(Y or N)"
  232.  
  233. ASK +39 +2                     ' one method of providing a "conditional" jump
  234.                                ' again, relative cursors are easier
  235.  
  236. WINCLOSE                       ' close the above window
  237.  
  238. JUMP.NO PRINT_INSTALL.TXT      ' again, skip the view command if the user
  239.                                ' hits the "N" key from the above ASK statement.
  240.  
  241. WINOPEN 0 0 31                ' large file takes a while from floppy ...
  242. "Loading 67 Pages ..."
  243. VIEW ~0\INSTALL.TXT 79 31
  244. WINCLOSE                      ' close the above window
  245.  
  246. ' -------------------------------------------------------
  247. ' Ask user if they would like to print the documentation
  248. ' -------------------------------------------------------
  249. :PRINT_INSTALL.TXT
  250. WINOPEN 0 12 31
  251. "Would you like to PRINT the documentation for THE FINISHING TOUCH?"
  252. ""
  253.  
  254. WINUPDATE +31 +2 30           ' yellow text
  255. "(Y or N)"
  256.  
  257. ASK +39 +2                    ' one method of providing a "conditional" jump
  258.  
  259. WINCLOSE                      ' close the above window
  260. JUMP.NO EXIT
  261.  
  262. WINOPEN 0 0 31                ' printing large file takes a while ...
  263. ""
  264. "  Printing 67 Pages ...  "
  265. ""
  266. PRINT ~0\INSTALL.TXT
  267. WINCLOSE                      ' close the above window
  268. JUMP.FAIL PRINTER_ERROR       ' jump on fatal error
  269. JUMP EXIT                     ' print successful, skip next
  270.  
  271. :PRINTER_ERROR                ' label for error condition
  272. WINOPEN 0 5 79                ' open the following window
  273. "Your printer is not responding.  Possible problems:"
  274. "   -- Printer is not turned on"
  275. "   -- Printer is out of paper"
  276. "   -- Printer is not attached to LPT1 (parallel port 1)"
  277. ""
  278. "Do you want to try to print again  (Y or N)?"
  279. ASK 57 18                     ' prompt for Y or N key  (fixed cursor position)
  280. WINCLOSE                      ' close this window
  281. JUMP.YES PRINT_INSTALL.TXT    ' y key pressed, print
  282.  
  283. ' ----------------------
  284. ' display closing window
  285. ' ----------------------
  286. :EXIT
  287.  
  288. WINOPEN 0 5 31                ' window is centered on screen
  289. "Thank you for running the installation demonstration for the"
  290. ""
  291. "                   THE FINISHING TOUCH"
  292. "          The Professional Installation Program"
  293. ""
  294. "You have a fully working shareware evaluation copy.  We hope"
  295. "that you will find THE FINISHING TOUCH is the most powerful,"
  296. "smallest, easiest to use, software installer with the best"
  297. "file compression available anywhere.  ENJOY!"
  298. ""
  299.  
  300. WINUPDATE +21 +3 30
  301. "THE FINISHING TOUCH"                    ' yellow text
  302. WINUPDATE +40 +9 27
  303. "ENJOY!"                                 ' cyan text
  304. WINUPDATE +12 +11 31                     ' write on top of bottom border
  305. "┤ Press the [Enter] key to continue ├"  ' (good when space is tight)
  306. WINUPDATE +24 +11 30
  307. "[Enter]"
  308. WAIT +47 +11
  309. WINCLOSE
  310.  
  311. ' display our bbs phone number
  312. BORDER 2                                ' double line borders supported
  313.                                         ' for no border, use BORDER 0
  314. WINOPEN 0 5 110
  315. " If you're not sure you have the latest shareware copy of "
  316. " THE FINISHING TOUCH, call our BBS:"
  317. ""
  318. ""
  319. ""
  320. ""
  321. ""
  322. "Press the [Enter] key to continue."
  323.  
  324. WINUPDATE +17 +4 107
  325. "ImagiSOFT's Free, No Hastle BBS"
  326. WINUPDATE +20 +5 106
  327. "On Line 24 Hours per Day!"
  328. WINUPDATE +17 +6 111                         ' you can winupdate more than
  329. "(505) 275-9697     2400 - 28.8K"            ' one line at a time
  330.  
  331. WAIT +36 +8                                  ' wait for the enter key
  332.  
  333. END            ' exit the system normally
  334.  
  335. ' ---------------------------------------------------
  336. ' Installation Failure. It is a good idea to add a
  337. ' similar routine to the bottom of all script files.
  338. ' ---------------------------------------------------
  339. :INSTALL_FAILURE
  340. WINOPEN 0 12 79
  341. "THE INSTALLATION PROGRAM FAILED PRIOR TO COMPLETION"
  342. ""
  343. "Possible reasons:"
  344. "   -- The floppy disk was removed prior to completion."
  345. "   -- The floppy disk was damaged during shipping."
  346. "   -- Your disk drive is out of alignment."
  347. ""
  348. "Press [Enter] to remove incomplete program files."
  349. WAIT 62 20
  350. ' delete all partial files using internal variables
  351. '   ~1 = the drive the user installed to (C: was the default)
  352. '   ~2 = the path the user installed to (\SAMPLE was the default)
  353. DELETE ~1~2\*.* 0 0 31
  354. ' now remove the directory
  355. RD ~1~2
  356. WINCLOSE
  357. WINOPEN 0 12 31
  358. "Partially Installed Files are Now Deleted."
  359. ""
  360. "      Press [Enter] to Quit."
  361. WAIT 47 15
  362.