home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / cmdbt10.zip / CMDBOOT.DOC < prev    next >
Text File  |  1996-04-15  |  5KB  |  121 lines

  1. Here's yet ANOTHER utility in an endless stream of simple-but-highly-useful
  2. programs by me.
  3.  
  4.  
  5. WHAT IS THIS THING, ANYWAYS?
  6. ----------------------------
  7.  
  8. I call this one CMD boot. It does this:
  9.  
  10. [c:\nifties]cmdboot.exe
  11.  
  12. CMD boot v1.0
  13.   Copyright (c) Lighting and Sound Technologies, 1996
  14.   Written by Ryan C. Gordon.
  15.  
  16. Will run c:\os2\cmd.exe if key is pressed within 5 seconds...
  17. 5...4...3...2...1...
  18.  
  19.  
  20. Get the point? It allows you to run an executable, provided you hit a key
  21. within X seconds. 
  22.  
  23. Ok, so where is THIS one gonna come in handy? Easy. Stick this at the end of
  24. your config.sys:
  25.  
  26. CALL=x:\path\cmdboot.exe
  27.  
  28. (where "x:\path\" is where you stuck cmdboot.exe...)
  29.  
  30. And everytime you boot OS/2, it'll give you the option to stop, after loading
  31. all your drivers, but just before the Workplace Shell loads, and drop to a
  32. command prompt. This is a good precaution against things such as programs that
  33. screw up something crucial to the WPS (such as a new video driver that doesn't
  34. work). With this, if the need arises, smack a key before the seconds count
  35. hits zero, and you can go to a command prompt and fix things. If the need
  36. hasn't arisen, in a mattter of seconds, the bootup process will continue as
  37. normal.
  38.  
  39. This is also handy for manipulating DLLs and other files that the Workplace
  40. Shell locks when loaded. CMD boot will put you at a cmd prompt before these
  41. files are locked, so you may replace them, or remove them.
  42.  
  43.  
  44. CMD boot has other handy uses, for example, you may want to run an Antivirus
  45. program at bootup time, but you don't want to waste ALL THAT TIME whenever you
  46. hit CTRL-ALT-DEL (After all, if you just checked for viruses, and reboot
  47. without doing anything that could infect your system, then why check again?)
  48. Now you need only run that program when you feel like it.
  49.  
  50. CMD boot is also handy in batch files. As always, be creative.
  51.  
  52.  
  53. HOW TO INSTALL:
  54. ---------------
  55. 0.5) Make sure the EMX runtime is installed. The binaries and installation
  56.      instructions for this package can be found at
  57.          ftp://hobbes.nmsu.edu/unix/emx09b/emxrt.zip
  58.  
  59.      Once you install this, continue on to #1...
  60.  
  61.   1) Unzip CMD boot's archive. You've probably already done this if you are
  62.      reading this text file.
  63.   2) Copy cmdboot.exe somewhere. (Preferably, but necessarily, into your path.)
  64.   3) To have it optionally drop you to a CMD.EXE prompt at bootup time, add this
  65.      line to the very end of your CONFIG.SYS:
  66.  
  67. CALL=x:\path\cmdboot.exe
  68.  
  69. (where "x:\path\" is where you've hidden cmdboot.exe.)
  70.  
  71. 4) Email Ryan at warped42@ix.netcom.com and tell him you like this program.
  72.  
  73.  
  74.  
  75. COMMAND LINE OPTIONS:
  76. ---------------------
  77.  USAGE : cmdboot.exe [timetowait] [progtorun.exe] [arguments...]
  78.  
  79.  [timetowait] is optional # of seconds to wait before running.
  80.                Defaults to 5. You must specify this option if you want to
  81.                specify...
  82.  [progtorun.exe] Optional executable to run. Defaults to c:\os2\cmd.exe
  83.                  you must specify this option if you want to specify...
  84.  [arguments...] variable number of arguments to pass to [progtorun.exe]
  85.  
  86.  
  87.  
  88. LIMITATIONS:
  89. ------------
  90. Ok, no program is perfect, and here's what this program can NOT do:
  91. 1) If you boot to CMD.EXE without the workplace shell loaded, you cannot run
  92.    DOS apps, WinOS/2 apps, or presentation manager apps. Just OS/2 text-based
  93.    (VIO) programs. Full screen or windowed is fine. They both work full screen
  94.    in this context.
  95. 2) You can't start PM, DOS, or WinOS/2 apps directly from CMD boot. However,
  96.    you can start "cmd.exe /c mypmProg.exe" from CMD boot. This'll run them.
  97.    That is, if you aren't falling into the parameters of limitation #1.
  98.  
  99. Er...that's all, I think.
  100.  
  101.  
  102.  
  103. FINAL THOUGHTS ON THE MATTER:
  104. -----------------------------
  105. The source code is included. This one is incredibly simple. I couldn't find
  106. ANY docs on the Kbd* APIs, but I think I've found a good way to see if a key
  107. has been pressed (best I could do with nothing more than os2emx.h for
  108. documentation. :)  )...let me know if you have a better way.
  109.  
  110. Feel free to use the source code anyway you like. I'd appreciate an email if
  111. you get use of this program or source code in any way...mainly to feed my over-
  112. inflated programmer's ego. :)   (mailto:warped42@ix.netcom.com) 
  113.  
  114. Oh, and obviously, this program is freeware. Go forth and multiply the OS/2
  115. populations though petitioning software/hardware designers to support OS/2 if
  116. you feel you owe me anything. :)   Enjoy.
  117.  
  118.                                     --Ryan C. Gordon
  119.                                          Lighting and Sound Technologies, 1996.
  120.  
  121.