home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / utils / assort.zip / ONBOOT.DOC < prev    next >
Text File  |  1989-02-17  |  11KB  |  251 lines

  1.                                   ONBOOT 1.01
  2.                                   -----------
  3.  
  4.         Purpose
  5.         -------
  6.         ONBOOT is a simple utility designed for your AUTOEXEC.BAT.  It
  7.         allows you to have AUTOEXEC run selected programs only during a
  8.         warm boot (Ctl-Alt-Del), a cold boot (power on), or the first
  9.         boot of the day.  For example, placing the command "ONBOOT DAILY
  10.         CHKDSK" into AUTOEXEC will cause AUTOEXEC to run CHKDSK only
  11.         once a day, the first time the PC is turned on.
  12.  
  13.         ONBOOT requires DOS 3.0 or later in DAILY mode, 2.0 or later in
  14.         WARM/COLD modes.
  15.  
  16.  
  17.         Use
  18.         ---
  19.         Using ONBOOT is quite simple.  The full command is:
  20.  
  21.             onboot WARM|COLD|DAILY [/C] command [parameters]
  22.  
  23.         The first parameter must be one of the three boot selectors,
  24.         "WARM", "COLD", or "DAILY":
  25.  
  26.             WARM    Execute the command only if this is a warm boot.  A
  27.                     warm boot is a "reboot", caused by pressing
  28.                     Ctl-Alt-Del or, on some machines, a reset switch.
  29.  
  30.             COLD    Execute the command only if this is a cold boot.  A
  31.                     cold boot is a power-up boot, resulting from turning
  32.                     the machine on.
  33.  
  34.             DAILY   Execute the command only if the system date has
  35.                     changed since the last time ONBOOT DAILY was run.
  36.  
  37.         "Command" can be any command that you would normally put into
  38.         AUTOEXEC.BAT (with minor restrictions as explained below), or it
  39.         can be another batch file.  It is specified exactly as you would
  40.         specify it if you were running it directly.  For example, a path
  41.         is required if the command to be executed is not in the current
  42.         directory or anywhere in the current PATH.  File extensions
  43.         (COM, EXE, BAT) are not required.
  44.  
  45.         Parameters to the command are also specified normally.
  46.  
  47.         Examples:
  48.  
  49.             onboot daily chkdsk
  50.             onboot cold ramtest full /count=3
  51.             onboot warm ramtest quick
  52.  
  53.       | If ONBOOT doesn't correctly distinguish between a warm and a
  54.       | cold boot, see "Use on compatibles" below, which explains about
  55.       | the /C switch.
  56.  
  57.  
  58.         Restrictions on commands
  59.         ------------------------
  60.         ONBOOT executes the requested command by giving it to a
  61.         secondary copy of the command shell (normally COMMAND.COM) for
  62.         processing.  Thus, anything you could normally execute at the
  63.         DOS prompt can be run by ONBOOT:  an internal DOS command, a
  64.         program or external DOS command (COM and EXE files), or a batch
  65.         file.  There are only two restrictions:
  66.  
  67.         1. Because the new copy of the command shell will drag along a
  68.         new copy of the environment, commands that set or modify
  69.         environment strings will not work as you expect.  Therefore,
  70.         don't use ONBOOT to execute SET, PATH, or PROMPT commands.
  71.  
  72.         2. Don't use ONBOOT to execute commands or batches that will
  73.         load resident programs (TSRs).  These include the obvious ones
  74.         like Sidekick, et al, as well as some DOS programs such as
  75.         PRINT, certain variants of MODE, etc.
  76.  
  77.         It is difficult to imagine why you would want to load TSRs or
  78.         set strings in the environment only on certain kinds of boots,
  79.         so these restrictions should not present any real problems.
  80.  
  81.  
  82.         Running multiple commands DAILY
  83.         -------------------------------
  84.         You can use as many ONBOOT WARM and ONBOOT COLD commands in
  85.         AUTOEXEC as you wish.  However, ONBOOT DAILY will only run once
  86.         a day, so having more than one ONBOOT DAILY command in AUTOEXEC
  87.         doesn't make sense; only the first one will ever get run.
  88.  
  89.         If you want to execute more than one command DAILY, put them in
  90.         a separate batch file and execute it DAILY from AUTOEXEC.  For
  91.         example:
  92.  
  93.             AUTOEXEC.BAT:
  94.                 ...
  95.                 onboot daily onceaday
  96.                 ...
  97.  
  98.             ONCEADAY.BAT:
  99.                 chkdsk
  100.                 ramtest massive
  101.                 otherstuff
  102.  
  103.         Each day, ONBOOT will run ONCEADAY.BAT, which will then run the
  104.         three commands shown.  When ONCEADAY.BAT is done, AUTOEXEC will
  105.         pick up again with the next command.
  106.  
  107.  
  108.         ONBOOT.EXE date stamp
  109.         ---------------------
  110.         ONBOOT determines how recently it was run by the simple
  111.         expedient of looking at its own date stamp.  Each time ONBOOT
  112.         DAILY is run successfully, ONBOOT updates the date stamp of the
  113.         program file, ONBOOT.EXE (this eliminates the need for a
  114.         separate data file to track dates).  If the date of ONBOOT.EXE
  115.         is different from the current system date, the DAILY stuff will
  116.         get executed.  If they are the same, DAILY has already run
  117.         today, and the command will not be executed.
  118.  
  119.         You don't really need to know this; it's just in case you ever
  120.         wondered why ONBOOT.EXE always appears to be brand new in your
  121.         directory displays.
  122.  
  123.  
  124.       | Use on compatibles
  125.       | ------------------
  126.       | ONBOOT determines whether the boot is warm or cold by looking at
  127.       | a flag in BIOS's data area.  It has been reported that some
  128.       | IBM-compatible computers don't use this flag in the same way
  129.       | that IBM machines do, so it's possible that ONBOOT may not be
  130.       | able to correctly distinguish between warm and cold boots on all
  131.       | systems.  In particular, problems have been reported with some
  132.       | AST machines (AST Premium 286, for example).
  133.       |
  134.       | This may also occur on IBM systems if the BIOS boot flag has
  135.       | been altered since the last boot.
  136.       |
  137.       | If your machine does not seem to be correctly determining warm
  138.       | vs. cold boots, try adding a /C switch between the WARM or COLD
  139.       | and the command:
  140.       |
  141.       |     onboot cold /C chkdsk
  142.       |
  143.       | The /C (for Compatible) switch slightly alters ONBOOT's boot
  144.       | determination, and it might work correctly on your system.
  145.       |
  146.       | The switch MUST appear between the WARM or COLD and the command.
  147.       | It has no effect on DAILY boots.
  148.  
  149.  
  150.         Memory use
  151.         ----------
  152.         ONBOOT uses a bit under 2K of memory for itself.  The command
  153.         procesoor uses a bit more, typically under 4K for COMMAND.COM.
  154.         Thus, the commands run by ONBOOT will have about 6K less memory
  155.         to work with than normal.  ONBOOT is not resident, so it uses no
  156.         memory except when it is actually executed.
  157.  
  158.  
  159.         Error messages
  160.         --------------
  161.         Incorrect version of DOS
  162.             ONBOOT requires DOS 2.0 or later for WARM/COLD, and DOS 3.0
  163.             or later for DAILY.
  164.  
  165.         You must supply a command to be run
  166.             You didn't give ONBOOT a command to be executed.
  167.  
  168.         Can't find COMSPEC= in environment
  169.             Your environment must contain a COMSPEC statement to help
  170.             ONBOOT find the command processor.  DOS does this
  171.             automatically, so it will only be missing if you have taken
  172.             specific action to eliminate it, i.e., by executing a
  173.  
  174.                     SET COMSPEC=
  175.  
  176.             in AUTOEXEC before running ONBOOT.
  177.  
  178.         Problem executing command shell
  179.             ONBOOT wasn't able to give your command to the command
  180.             processor (COMMAND.COM) for execution.  Either the command
  181.             processor is missing (isn't where COMSPEC says it is) or
  182.             there isn't enough memory available.
  183.  
  184.         Error opening ONBOOT.EXE for date check
  185.             ONBOOT wasn't able to locate and open the program file
  186.             ONBOOT.EXE so that it could check its date.
  187.  
  188.         Unable to update timestamp on ONBOOT.EXE
  189.             ONBOOT wasn't able to change the date of ONBOOT.EXE to
  190.             today's date.  DAILY commands will continue to run with
  191.             every boot until you locate the source of the problem.
  192.  
  193.  
  194.         Version history
  195.         ---------------
  196.         1.01 02/17/89
  197.             Added /C switch.
  198.  
  199.         1.00 08/03/88
  200.             Initial release.
  201.  
  202.  
  203.         Copyright/License/Warranty
  204.         --------------------------
  205.         This document and the program file ONBOOT.EXE ("the software")
  206.         are copyrighted by the author.  The copyright owner hereby
  207.         licenses you to:  use the software; make as many copies of the
  208.         program and documentation as you wish; give such copies to
  209.         anyone; and distribute the software and documentation via
  210.         electronic means.  There is no charge for any of the above.
  211.  
  212.         However, you are specifically prohibited from charging, or
  213.         requesting donations, for any such copies, however made; and
  214.         from distributing the software and/or documentation with
  215.         commercial products without prior permission.  An exception is
  216.         granted to not-for-profit user's groups, which are authorized to
  217.         charge a small fee (not to exceed $7) for materials, handling,
  218.         postage, and general overhead.  NO FOR-PROFIT ORGANIZATION IS
  219.         AUTHORIZED TO CHARGE ANY AMOUNT FOR DISTRIBUTION OF COPIES OF
  220.         THE SOFTWARE OR DOCUMENTATION, OR TO INCLUDE COPIES OF THE
  221.         SOFTWARE OR DOCUMENTATION WITH SALES OF THEIR OWN PRODUCTS.
  222.  
  223.         THIS INCLUDES A SPECIFIC PROHIBITION AGAINST FOR-PROFIT
  224.         ORGANIZATIONS DISTRIBUTING THE SOFTWARE, EITHER ALONE OR WITH
  225.         OTHER SOFTWARE, AND CHARGING A "HANDLING" OR "MATERIALS" FEE OR
  226.         ANY OTHER SUCH FEE FOR THE DISTRIBUTION.  NO FOR-PROFIT
  227.         ORGANIZATION IS AUTHORIZED TO INCLUDE THE SOFTWARE ON ANY MEDIA
  228.         FOR WHICH MONEY IS CHARGED.
  229.  
  230.         The software may not be included with distribution of commercial
  231.         or "shareware" software without a license from The Cove Software
  232.         Group.
  233.  
  234.         No copy of the software may be distributed or given away without
  235.         this document; and this notice must not be removed.
  236.  
  237.         There is no warranty of any kind, and the copyright owner is not
  238.         liable for damages of any kind.  By using this free software,
  239.         you agree to this.
  240.  
  241.         The software and documentation are:
  242.  
  243.                           Copyright (C) 1988, 1989 by
  244.                             The Cove Software Group
  245.                              Christopher J. Dunford
  246.                                  P.O. Box 1072
  247.                             Columbia, Maryland 21044
  248.  
  249.                                  (301) 992-9371
  250.                          CompuServe 76703,2002 [IBMNET]
  251.