home *** CD-ROM | disk | FTP | other *** search
/ Byte OS/2 Programmer's Cookbook / OS2TOOLS.ISO / ibminfo / windos.txt < prev    next >
Text File  |  1992-08-04  |  11KB  |  293 lines

  1.         July 25, 1992; Revised August 05, 1992
  2.  
  3.   The following is copyright 1992 Jesse F. Knecht, RN.
  4.   All rights reserved.
  5.  
  6.   Information provided is without warranty.
  7.  
  8.   This information is not free, but may be distributed freely if
  9. not packaged with any other product.  This document must be
  10. distributed in unmodified form.  The procedure(s) are to be
  11. considered Shareware.
  12.   If it works for you and you use it for 10 days, a $1.25 per
  13. PC/Workstation registration fee is required.
  14.   You are simply being allowed to read/try/test the below
  15. described procedure(s) before paying for them.
  16.  
  17. Mail fee(s), name, address to:
  18. QHS, Inc.
  19. P.O. Box 8692
  20. Metairie, LA 70011
  21.  
  22. The author may be reached at the above address and also via email.
  23. CompuServe: 70400,600
  24. America Online: JFK RN
  25. Prodigy: MRSV81A
  26.  
  27. All trademarks of products referenced belong to their
  28. respective owners.
  29.  
  30.        "Shell to DOS from Windows running under OS/2 2.0"
  31.  
  32.   The following is quoted from the OS/2 2.0 README file.
  33.  
  34. "o   Windows programs cannot start DOS sessions or
  35.     DOS programs."
  36.  
  37.   IBM says you can't run Windows apps. in OS/2 2.0 that shell to DOS.
  38.  
  39.   I say you can!
  40.  
  41.   Do you NEED to shell to DOS from Windows under OS/2???
  42. There is a little Windows zip file utility and some WinBatch stuff
  43. I like to use, but sometimes they shell to DOS.  Now I (and you)
  44. can use these and many other programs that shell to DOS from
  45. Windows when in OS/2. NO REBOOTING TO USE THEM!
  46.  
  47.   What do you end up with?  Windows 3.0 in Real Mode (Large Frame
  48. EMS) that can shell to DOS.  I end up with 540k+ (550k+ using DRDOS)
  49. free conventional memory after after starting a DOS session
  50. from Windows 3.0 under OS/2.
  51.  
  52.   It's a fairly easy 6 part procedure.
  53.  
  54.   1) Backup your files
  55.   2) Create a DOS *.IMG file (can use a boot floppy instead)
  56.   3) Model the IMG config.sys & autoexec.bat files after the
  57.      below examples. Use your particular directory/drive names.
  58.   4) Adjust settings for the IMG file
  59.   5) Edit the Windows 3.0 system.ini file
  60.   6) Run it (WIN /R)
  61.  
  62.   I have not patched any of the OS/2, Windows, or DOS files; I use
  63. the 3-30-92 OS/2 kernel, but have downloaded a couple of other
  64. fixes (REXX, com & floppy, VEMM, and Trident video drivers).
  65.  
  66.   What do you need?
  67.  
  68.   You need Microsoft Windows 3.0 and Win3 needs to be started from
  69. a DOS *.IMG file (MS DOS 5 and DR DOS 6 both work) or Drive A:
  70. DOS.  It also helps to have 4DOS.COM (shareware) replace COMMAND.COM
  71. as 4DOS can load conventional, XMS, EMS or swap to disk if needed.
  72. 4DOS gives me almost 10k more of 1st 640k than COMMAND.COM.
  73.  
  74.   I have both MSDOS.IMG and DRDOS.IMG files I use. The only
  75. difference seems to be that DEVICEHIGH= (HIDEVICE) doesn't
  76. seem to work on the DRDOS.IMG; the files load low with every
  77. combination I've tried.
  78.  
  79.   The following refers to a MSDOS.IMG file but can be used for
  80. DRDOS as well.
  81.  
  82.   Create your IMG file as per OS/2 online instructions.
  83. To save hard drive space use the smallest floppy available to create
  84. your IMG file.  I dusted off an old single-side 1D floppy (160k) for
  85. my IMG files.  Do they still make 160k floppies?
  86.  
  87.   Sample IMG config.sys:
  88.  
  89. DEVICE=FSFILTER.SYS
  90. DEVICE=F:\OS2\MDOS\HIMEM.SYS
  91. DEVICE=F:\OS2\MDOS\EMM386.SYS
  92. REM Next line for DRDOS IMG
  93. REM DEVICE=C:\DOS\HIDOS.SYS /B=FFFF
  94. DOS=HIGH,UMB
  95. REM Do not use \os2\mdos\COMMAND.COM supplied with OS/2
  96. REM SHELL=C:\COMMAND.COM C:\ /P /E:1024
  97. SHELL=F:\4D\4DOS.COM F:\4D @F:\4D\MSDOSIMG.INI /P
  98. REM May use fewer files
  99. FILES=99
  100. REM Use HIBUFFERS for DRDOS
  101. BUFFERS=25
  102. DEVICEHIGH=F:\OS2\MDOS\ANSI.SYS
  103.  
  104.   Sample IMG autoexec.bat:
  105. (If you mention WINOS2 in your PATH, place your Windows 3.0
  106. directory before it; your true DOS should be before \os2\mdos)
  107.  
  108. @ECHO OFF
  109. SET PCTOOLS=D:\PCT\DATA
  110. SET TEMP=E:\TEMP
  111. SET TMP=E:\TEMP
  112. REM Next line I use for WinBatch
  113. SET IMGFIL=YES
  114. REM Next line is for 4DOS
  115. SET _CDPATH=D:\QHS;D:\;D:\WIN;E:\;F:\;C:\;D:\OV;D:\WS;F:\OS2;D:\;F:\OS2\MDOS;
  116. PATH F:\4D;C:\DD;D:\WIN;C:\DOS;D:\WP;D:\XL;D:\OV;D:\WS;D:\CC;D:\CC\CAM;D:\PCT;
  117. REM Next 2 lines activate my numlock and capslock that OS/2 turns off
  118. NUMLOCK
  119. CAPSLOCK
  120. PROMPT $i$E[1;32mTime $T$_Date $D$E[1;31m [MSDOS IMG] $P$G$E[0;1m
  121. F:\OS2\MDOS\MOUSE
  122. REM Next 2 lines are for 4DOS
  123. ALIAS /P /R F:\4D\ALIASMSD.TXT
  124. HISTORY /R F:\4D\HISTQHS.TXT
  125. F:
  126. ECHO Edit IMG files now if needed.
  127. ECHO   Enter FSACCESS A: for "normal" A: drive access.
  128.  
  129.   My "settings" for MSDOS.IMG include DOS full screen DOS_RMSIZE 640,
  130. KBD_CRTL_BYPASS CTRL_ESC, EMS_FRAME_LOCATION AUTO,
  131. EMS_MEMORY_LIMIT 2048, XMS_MEMORY_LIMIT 2048,
  132. DOS_STARTUP_DRIVE F:\OS2\MSDOS.IMG, DOS_UMB ON, DOS_HIGH ON.
  133.  
  134.   Lastly, you need to make a slight change to the Windows 3.0
  135. system.ini file if you want to use your mouse.  In the [BOOT]
  136. section there is the line: mouse.drv=mouse.drv
  137.  
  138.   REM the line by placing a semicolon ";" in front of it.
  139.  
  140. ;mouse.drv=mouse.drv
  141.  
  142.   Add the line:
  143.  
  144. mouse.drv=<your drive>:\os2\mdos\winos2\system\mouse.drv
  145.  
  146.   Use the full path as above.  DO NOT overwrite your "normal"
  147. Windows mouse.drv by copying the file from OS/2 (read on).
  148.  
  149.   Doing the above system.ini editing substitutes the winos2 driver
  150. for the the Windows 3.0 mouse driver.  The above assumes a standard
  151. Microsoft compatable mouse.  Note, if you later decide to boot
  152. DOS and want to run Windows 3.0, REM out ";" the winos2 driver
  153. and unREM the regular Windows 3.0 driver.  Windows 3.0 may not start
  154. under DOS if the winos2 driver is used.
  155.                          Addendum (revised 08-05-92)
  156.  
  157.   DR DOS USERS: Include both HIDOS=ON and DOS=LOW,UMB in your
  158.                 IMG config.sys.  You'll add almost 8k to your
  159.                 available 1st 640k in the session.
  160.  
  161.                 ***Potential problem areas & solutions.***
  162.  
  163.   ALL USERS:    The mouse command in the IMG autoexec.bat is
  164.                 required for mouse use.  This is in addition
  165.                 to editing Windows 3.0 system.ini.
  166.  
  167.                 In the IMG file autoexec.bat, set your TEMP
  168.                 (TMP) environment to some drive and/or
  169.                 directory other than where your OS/2 swappath
  170.                 is.  Check your OS/2 config.sys.  You'll find
  171.                 a line similar to:
  172.                              SWAPPATH=E:\ 2048 2048
  173.                 In the above example OS/2 is swapping to the
  174.                 root directory on E drive.  For this example you'd
  175.                 set your IMG file TEMP environment somewhere other
  176.                 than the root directory of E.
  177.                 SET TEMP=E:\TEMP works in my IMG file autoexec.bat.
  178.  
  179.                 If you have 2048k or less free on the SWAPPATH drive
  180.                 (referring to above example), set the IMG's TEMP to
  181.                 a different drive.
  182.  
  183.                 In Windows 3.0 SYSTEM.INI there is a section: [NonWindowsApp]
  184.                 You may or may not have any entries in the section.  If,
  185.                 however, there is an entry that begins
  186.                 swapdisk=
  187.                 be sure it does not point to the SWAPPATH directory.
  188.                 Swapdisk= tells windows where to swap non-windows apps.
  189.                 when in standard and REAL modes.  The Windows default
  190.                 (no entry) is the TEMP environment or the Windows directory
  191.                 if there is no TEMP environment.  You may need to REM
  192.                 the line (use a semicolon ";" as instructed earlier).
  193.                 See sysini.txt.
  194.  
  195.                 In Windows 3.0 WIN.INI the [windows] section may
  196.                 contain the line: swapdisk=
  197.                 This is in addition to the SYSTEM.INI entry.
  198.                 This entry should indicate the same path as the
  199.                 SYSTEM.INI notation.  If there is no SYSTEM.INI
  200.                 entry or you used the REM ";" suggestion, then the
  201.                 WIN.INI should be:
  202.                 swapdisk=
  203.                 (nothing after "=")
  204.  
  205.                 OS/2 config.sys should include DOS=HIGH,UMB;
  206.                 RMSIZE=640; along with all the v*.sys statements OS/2 adds.
  207.                 Be sure your OS/2 config.s