home *** CD-ROM | disk | FTP | other *** search
- ' Sample Install Script for
- ' The Finishing Touch
- ' Professional Software Installer
- ' Copyright 1992, ImagiSOFT, Inc.
- ' June 15, 1992
-
- ' NOTE: This script file takes a long time to load (and requires more
- ' disk space because it has lots of comments. The script files
- ' you create should well commented, but be sure to remove most
- ' of the comments on the final distribution copy so it will
- ' be as small as possible. There is a 400 line maximum for any
- ' one script file. However, this limitation can be overcome with
- ' the SCRIPT command.
-
- ' Note: This script file doesn't use all the possible commands.
- ' See the documentation for the commands to check hardware,
- ' perform conditional jumps, view ASCII files, run or shell
- ' to DOS programs, change AUTOEXEC.BAT and CONFIG.SYS,
- ' invoke other script files, and more!
-
-
- ' display cyan colored background (see color chart in docs)
-
- BACKGROUND 63
-
-
- ' French, German, and Spanish are also supported. English is the default
- ' so this command is used as an example only.
-
- LANGUAGE ENGLISH
-
-
- ' turn off "exploding" or telescoping windows for first window
- ' this will make the window instantly appear
-
- TELESCOPE OFF
-
-
- ' display the heading in a window
- ' located at 18 characters across
- ' 2 rows down with a
- ' magenta background and high intensity white letters (see color chart)
-
- ' the screen
- WINOPEN 18 2 95
-
- " ImagiSOFT, Inc."
- "Where Imagination Brings Software to Life"
- ""
- " THE FINISHING TOUCH"
- " Sample Installation Script File"
- " (Loads a Free Utility)"
-
- ' WINOPEN 0 2 95 ' use this command instead
- ' to make sure the window is
- ' centered horizontally on
-
- ' turn on telescoping windows for the rest of the messages
-
- TELESCOPE ON
-
-
- ' display all messages from this point on in a "shadowed" window
- ' the default is "OFF". This feature can be turned on and off as many
- ' times as you want
-
- SHADOW ON
-
-
- ' Tell INSTALL the minimum amount of required disk space
-
- SPACE 7 ' This sample is tiny, only 7K required.
-
-
- ' Prompt for the drive to install to:
-
- DRIVE C 28 12 31 15 32 14 79
- ' C = drive C, the pre-stuffed drive letter
- ' 28 = locate window at 28 characters across
- ' 12 = and 12 rows down
- ' 31 = blue background and high intensity white foreground
- ' 15 = input on a black background w/ high intensity white letters
- ' 32 = error message located at 32 characters across
- ' 14 = and 14 rows down
- ' 79 = any error message will appear in a red window with
- ' high intensity white letters
-
- ' After the user selects a drive and presses [Enter], the first thing
- ' the DRIVE command does is make sure the drive exists. Next it will
- ' check for the required disk space. If the drive does not exist, or
- ' there is not enough space, an error message appears, and the user is
- ' required to pick a different drive, or quit.
-
-
- ' Prompt with default path \SAMPLE
-
- ' INSTALL.EXE will work the same way whether the user enters SAMPLE,
- ' \SAMPLE\, or \SAMPLE. Mutiple directories such as \SAMPLE\UTIL\FREE
- ' are also supported.
-
- PATH \SAMPLE 0 12 31 15 32 14 79
-
- ' the numbers above represent window locations and colors. See the
- ' documentation for more details
-
-
- ' Unpack the files from the floppy drive.
-
- UNPACK SAMPLE.PAK 0 12 31 32 14 79
-
- ' SAMPLE.PAK was compressed using the enclosed PACKER utility. This
- ' utility will compress files 50% or more depending on the file type.
- ' you should get compression results close to that of PKZIP.
-
- ' the numbers above represent window locations and colors. See the
- ' documentation for more details
-
-
- ' just for fun, open the disk drive right in the middle of the installation
- ' and see what happens. This is only one of four "jump" commands supported.
- ' see the documentation for JUMP, JUMP.NO, and JUMP.YES commands.
-
- JUMP.FAIL INSTALL_FAILURE
-
-
- ' Inform user that software installation is now complete
-
- WINOPEN 0 12 31
-
- "A FREE utility is now installed on your computer."
- "To see what it is, use the following command:"
- " CD~2 from drive ~1"
- "Our way of saying THANKS for taking the time to"
- "review the THE FINISHING TOUCH Software Installer."
- ""
- "Press the [Enter] key to continue."
-
-
- ' Wait for the user to press the [Enter] key so they can
- ' read the above window.
-
- ' The plus signs denote that you want the cursor located relative to
- ' the upper left hand corner of the window (position 0, 0) 7 rows down
- ' and 36 characters across.
-
- WAIT +36 +7
-
- WINCLOSE ' close the above window
-
- ' ------------------------------------------------------
- ' Ask user if they would like to view the utility's docs
- ' ------------------------------------------------------
- WINOPEN 0 12 31
- "Would you like to see the new utility's documentation?"
- " (Y or N)"
-
- ASK +33 +2 ' one method of providing a "conditional" jump
- ' note relative cursor positioning
-
- WINCLOSE ' close the above window
-
- JUMP.NO VIEW_INSTALL.TXT ' skip the view command if the user
- ' hits the "N" key from the above
- ' ASK statement.
-
- VIEW ~1~2\STAMP.TXT 79 31 ' as you can see, The Finishing Touch
- ' has a built-in file viewer
-
- ' -----------------------------------------------------
- ' Ask user if they would like to view the documentation
- ' -----------------------------------------------------
- :VIEW_INSTALL.TXT
- WINOPEN 0 12 31
- "Would you like to SEE the documentation for THE FINISHING TOUCH?"
- " (Y or N)"
-
- ASK +39 +2 ' one method of providing a "conditional" jump
- ' again, relative cursors are easier
-
- WINCLOSE ' close the above window
-
- JUMP.NO PRINT_INSTALL.TXT ' again, skip the view command if the user
- ' hits the "N" key from the above ASK statement.
-
- WINOPEN 0 0 31 ' large file takes a while from floppy ...
- "Loading 67 Pages ..."
- VIEW ~0\INSTALL.TXT 79 31
- WINCLOSE ' close the above window
-
- ' -------------------------------------------------------
- ' Ask user if they would like to print the documentation
- ' -------------------------------------------------------
- :PRINT_INSTALL.TXT
- WINOPEN 0 12 31
- "Would you like to PRINT the documentation for THE FINISHING TOUCH?"
- " (Y or N)"
-
- ASK 44 14 ' one method of providing a "conditional" jump
- ' cursor is fixed this time
-
- WINCLOSE ' close the above window
- JUMP.NO EXIT
-
- WINOPEN 0 0 31 ' printing large file takes a while ...
- "Printing 67 Pages ..."
- PRINT ~0\INSTALL.TXT
- WINCLOSE ' close the above window
- JUMP.FAIL PRINTER_ERROR ' jump on fatal error
- JUMP EXIT ' print successful, skip next
-
- :PRINTER_ERROR ' label for error condition
- WINOPEN 0 12 31 ' open the following window
- "Your printer is not responding. Possible problems:"
- " -- Printer is not turned on"
- " -- Printer is out of paper"
- " -- Printer is not attached to LPT1 (parallel port 1)"
- ""
- "Do you want to try to print again (Y or N)?"
- ASK 57 18 ' prompt for Y or N key
- WINCLOSE ' close this window
- JUMP.YES PRINT_INSTALL.TXT ' y key pressed, print
-
-
- ' ----------------------
- ' display closing window
- ' ----------------------
- :EXIT
-
- WINCLOSE ' close the ImagiSOFT window
-
- WINOPEN 0 0 31
- "Thank you for running the installation demonstration for the"
- ""
- " THE FINISHING TOUCH"
- " The Professional Installation Program"
- ""
- "You have a fully working shareware evaluation copy. We hope"
- "that you will find THE FINISHING TOUCH is the most powerful,"
- "smallest, easiest to use, software installer with the best"
- "file compression available anywhere. ENJOY!"
- ""
- "Press the [Enter] key to continue."
- WAIT +36 +11
-
- ' ------------------------
- ' exit the system normally
- ' ------------------------
-
- END
-
-
- ' ----------------------
- ' Installation Failure.
- ' It is a good idea to
- ' add a similar routine
- ' to the bottom of all
- ' script files.
- ' ----------------------
-
- :INSTALL_FAILURE
-
- ' labels begin with a colon and can be up to 32 characters long.
-
- WINOPEN 0 12 79
-
- ' the easiest way to center a message on the screen is to make
- ' either the x or y coordinates "0".
- ' 79 is a red window with emphasized white letters (good for error messages)
-
- "THE INSTALLATION PROGRAM FAILED PRIOR TO COMPLETION"
- ""
- "Possible reasons:"
- " -- The floppy disk was removed prior to completion."
- " -- The floppy disk was damaged during shipping."
- " -- Your disk drive is out of alignment."
- ""
- "Press [Enter] to remove incomplete program files."
-
- WAIT 62 20
-
-
- ' delete all partial files using internal variables
- ' ~1 = the drive the user installed to (C: was the default)
- ' ~2 = the path the user installed to (\SAMPLE was the default)
-
- DELETE ~1~2\*.* 0 0 31
-
- ' now remove the directory
-
- RD ~1~2
-
- WINCLOSE
-
-
- WINOPEN 0 12 31
-
- "Partially Installed Files are Now Deleted."
- ""
- " Press [Enter] to Quit."
-
- WAIT 47 15
-