home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / pstrt101.zip / PMSTART.DOC < prev    next >
Text File  |  1994-12-11  |  9KB  |  274 lines

  1. ///////////////////////////////////////////////////////////////////////////
  2. // PMStart 1.01 - OS/2 PM Based Session Starter
  3. //
  4. // Copyright (c) 1993-1994  John Morris   All Rights Reserved
  5. //
  6.  
  7. WHAT IS PMSTART
  8. ---------------
  9.  
  10. PMStart will start any program that OS/2 2.x will allow.  I developed PMStart
  11. to start DOS (and other) programs on my BBS.  Having tried several programs
  12. which used DosStartSession, I ended up unhappy with the stability of my
  13. system. I believe this instability is not a result of these programs in 
  14. particular, but the DOS programs seemed to be currupting OS/2 in some way.
  15.  
  16. I wrote this PM app to start up child sessions from the OS/2 command
  17. line, using WinStartApp in an attempt to more closely emulate the OS/2 shell.
  18. Whether this is a waste or not is something that will be decided over time.
  19.  
  20. Remember this is PMStart   1.01   I'll be fixing any bugs, and adding features
  21. to it in the near future.
  22.  
  23. PMSTART IS SHAREWARE
  24. --------------------
  25.  
  26.   PMStart is copyrighted software. However, you are encouraged to copy and
  27. share it with others according to the following requirements:
  28.  
  29.       The standard version of PMStart may be freely copied and shared
  30.       with others, so long as no charge is made for the software, and it
  31.       is unmodified and copied in its entirety, including all program
  32.       documentation and all support files. It may be distributed via
  33.       modem, provided that all files are transmitted (archived) together.
  34.  
  35.   Notice that ShareWare is copyrighted software. It is not "Public Domain"
  36. software, nor is it "free" software. If you continue to use this program
  37. beyond a reasonable "trial period", not to exceed 21 days, you must pay for it
  38. by registering.
  39.  
  40. Registration for PMStart is $5 US Dollars.
  41.  
  42. If you use PMStart for commercial purposes you must register!
  43.  
  44. See REGISTER.DOC for more information.
  45.  
  46. PMSTART WARRANTY
  47. ----------------
  48.  
  49. Warranty? Are you kidding!?
  50.  
  51.   PMStart is provided AS IS without any warranty, expressed or implied.
  52.  
  53.   I shall not be liable for any damages, whether direct, indirect,
  54. special, or consequential arising from a failure of this program or 
  55. accompanying files to operate in a manner desired by the user. 
  56.  
  57.   I shall not be liable for any damage to data or property which may by
  58. caused directly or indirectly by use of this program.
  59.  
  60.   In no event will I be liable to you for any damages, including any lost
  61. profits, lost savings or other incidental or consequential damages arising
  62. out of your use or inability to use the program, or for any claim by any
  63. other party.
  64.  
  65. Enough of the legalities. Onward and upward.
  66.  
  67. PMSTART COMMAND LINE SWITCHES
  68. -----------------------------
  69.  
  70. Syntax:
  71.  
  72. PMSTART [switches] [pgm] [pgm switches]
  73.  
  74. Switches:
  75.  
  76. /B      - Start child session in background
  77.  
  78. /C      - Close session when completed (used when loading command shell
  79.           like CMD.EXE or COMMAND.COM)
  80.  
  81. /D      - Start a DOS session
  82.  
  83. /DS xxx - Use information found in the file 'xxx' for DOS settings
  84.  
  85. /F      - Start child session in foreground
  86.  
  87. /FS     - Start a full screen session
  88.  
  89. /H      - Hide the PMStart 'window'
  90.  
  91. /K      - Keep command processor after child is finished (used when
  92.           loading command shell like CMD.EXE or COMMAND.COM)
  93.  
  94. /MAX    - Start child maximized
  95.  
  96. /MIN    - Start child minimized
  97.  
  98. /N      - Start child without loading command processor (like CMD.EXE
  99.           and COMMAND.COM)
  100.  
  101. /NDx    - Set a unique identity for this instance of PMStart. This should
  102.           be a number. For example:  /ND1  or  /ND3    This is used
  103.           only when creating PMStart's "window" (and I use the term
  104.           "window" loosely)
  105.  
  106. /PM     - Start a PM type program
  107.  
  108. /POS=x,y,x1,y1
  109.         - Set window position (x,y)  and size (x1,y1)   x,y,x1,y1 must
  110.           all be included, otherwise PMStart will fail. (I'll fix this
  111.           later)
  112.  
  113. /WIN    - Start child in a windowed session
  114.  
  115. /WAIT   - Wait for child to end before ending PMStart
  116.  
  117.  
  118. To tell PMStart to run a specific program always put the name of the program
  119. (and its command line parameters) last on the PMStart command line.
  120.  
  121. Without any command line parameters, PMStart will start an OS/2
  122. windowed session. Therefore the default is to load an OS/2
  123. program in a window.  If you wish to use a DOS program you need
  124. to set the /D switch, and optionally use the /DS xxx  to tell PMStart
  125. the DOS settings for the program you wish to run. Also, when running
  126. a DOS session the default session type switches from windowed to full
  127. screen mode.
  128.  
  129. For Example: to run DOS COMMAND.COM in a window, use:
  130.  
  131. PMStart /D /WIN
  132.  
  133. To start COMMAND.COM again, but you wish to use the DOS settings
  134. in the file 'Settings.Dat', use:
  135.  
  136. PMStart /D /WIN /DS Settings.Dat
  137.  
  138. To run the DOS program FLAKEY.EXE with the command line of '/D /WE'
  139. in a windowed session, use:
  140.  
  141. PMStart /D /WIN FLAKEY.EXE /D /WE
  142.  
  143.  
  144. DOS SETTINGS FILE
  145. -----------------
  146.  
  147. You can use the '/DS filename' command line parameter to tell PMStart
  148. which settings to set for the DOS program you are about to start.
  149.  
  150. The DOS settings file is compatible with the settings file used in
  151. HSWITCH by Henk Kelder. In that case each line would begin with
  152. 'SET ' followed by the DOS setting. PMStart does NOT require a line
  153. to start with 'SET '.
  154.  
  155. The settings file is a simple text file.
  156. Example:
  157.  
  158. DOS_RMSIZE=200;
  159. DOS_DEVICE=C:\OS2\MDOS\ANSI.SYS,C:\OS2\MDOS\VX00.SYS;
  160. DOS_AUTOEXEC=C:\DOS\AUTOEXE1.BAT;
  161. EMS_MEMORY_LIMIT=368;
  162. XMS_MEMORY_LIMIT=0;
  163.  
  164. As you can see, each line is a DOS setting found in the DOS settings 
  165. dialog in OS/2. Each line ends with a semi-colon. This is to allow
  166. you to be able to embed some spaces at the end of a setting. The
  167. semi-colons are required.  The settings DOS_DEVICE, and DOS_VERSION,
  168. may take multiple parameters. These parameters should be separated by
  169. a comma. If you need to put commas and/or semi-colons in the parameter
  170. itself, you must proceed it with a caret '^'.
  171.  
  172. SET DOS_RMSIZE=512;
  173. SET DOS_DEVICE=C:\OS2\MDOS\ANSI.SYS,C:\OS2\MDOS\VX00.SYS,D:\DRIVERS\TESTDRVR.BIN;
  174. SET DOS_VERSION=NETX.EXE^,5^,00^,255,MSD.EXE^,5^,0^,255;
  175. * This is a comment
  176. SET DOS_AUTOEXEC=C:\DOS\AUTOEXE1.BAT;
  177. SET EMS_MEMORY_LIMIT=384;
  178. SET HW_ROM_TO_RAM=1;
  179.  
  180. In this example, I load three device drivers.  The DOS memory size is
  181. 512K, with 384K of EMS memory available.  Once COMMAND.COM is loaded,
  182. the batch file C:\DOS\AUTOEXE1.BAT is executed.  The DOS_VERSION line
  183. is parsed to remove the caret '^' symbols.
  184.  
  185. Some DOS settings are only switches. You specify the switch by using the
  186. numbers 1 (YES), and 0 (NO).   Example:
  187.  
  188. INT_DURING_IO=1
  189.  
  190. This turns INT_DURING_IO on.
  191.  
  192. Some DOS settings take numbers:
  193.  
  194. DOS_RMSIZE=640
  195.  
  196. This sets the DOS memory size to 640K
  197.  
  198. Other DOS settings take keywords:
  199.  
  200. DPMI_DOS_API=ENABLED
  201.  
  202. If you use the VIDEO_MODE_RESTRICTION setting, you must pad the setting
  203. to have 15 characters!  Examples:
  204.  
  205. SET VIDEO_MODE_RESTRICTION=CGA            ;
  206. SET VIDEO_MODE_RESTRICTION=NONE           ;
  207. SET VIDEO_MODE_RESTRICTION=MONO           ;
  208.  
  209. I'm not sure why these need to be padded to 15 characters. Maybe someone
  210. can clue me in.
  211.  
  212. You can put comments in the settings file. Comments can go after the last
  213. semi-colon on the line, or start a line with a star '*'
  214.  
  215. SETTING SWITCHES VIA THE OS/2 ENVIRONMENT
  216. -----------------------------------------
  217.  
  218. You can set your most frequently used PMStart switches by setting the
  219. PMS_SWITCHES environment variable.  You would set them in this manner:
  220.  
  221. SET PMS_SWITCHES=/DOS /WIN /MIN
  222.  
  223. PMStart will use these in conjunction with the regular command line
  224. parameters, or in place of them. PMS_SWITCHES are parsed after the
  225. regular command line switches, so they will take precedence.
  226.  
  227. You can also set the title of the child window using the environment
  228. variable PMS_TITLE.  An example:
  229.  
  230. SET PMS_TITLE=My DOS Window
  231.  
  232. UNDOCUMENTED SWITCHES
  233. ---------------------
  234.  
  235. There are some undocumented switches in PMStart. All concern the starting
  236. of windows apps.  I somehow lost the ability to start seamless windows apps
  237. on my 8514 once I installed my toolkits (and re-installing WinOS2 didn't
  238. fix the problem) So I can't check the functionality of these switches.   
  239.  
  240. Contact me for info on these switches.
  241.  
  242. HOW TO REACH ME
  243. ---------------
  244.  
  245. I will support this program to the best of my ability. There are several 
  246. different ways of contacting me.
  247.  
  248. Mail:
  249.  
  250. John Morris
  251. 1718 Woodhaven Ln.
  252. Sparks, NV 89434
  253.  
  254. E-mail:
  255.  
  256. DoctorX@Sierra.Net
  257.  
  258. Compuserve:
  259.  
  260. 71562,3235
  261.  
  262. Netmail:
  263.  
  264. RBBS-Net 8:919/1 or 2   -OR-   Fidonet  1:213/760 or 761
  265.  
  266. BBS:
  267. The Abandoned Land
  268. (702) 359-1138
  269. (702) 359-0629
  270.  
  271. Voice:
  272. (702) 359-1303  best times are 6pm to 10pm Pacific Time
  273.  
  274.