A while back someone asked how to exit win3x to ``real'' dos, run a dos
program and automatically restart windows. I thought I'd share what I
learned about this for those might benefit. Other readers, please excuse
the length of this post and hit the ``delete'' button.
There are are about 4 ways to progressively expand a dos box to real dos:
Give Dos Boxes more Memory:
--------------------------
Programs that don't get enough of, or the right kind of, memory from dos boxes
might be helped by changing a few windows settings:
In your system.ini file:
o InDosPolling=On will slow windows a bit but will give
dos TSRs access to certain critical memory regions.
o LocalLoadHigh=1 will assure that dos boxes have
upper memory blocks available.
o CommandEnvSize=1048 will make, for instance 1048KB available
for dos environment variables instead of the usual minimal
environment.
In your Program Information File (PIF) for a Dos Box:
o Set Video Memory to Text to use less memory for video
o Set Memory Required = -1 Desired=-1 to
allocate a maximal amount of conventional memory.
o Set XMS memory Desired = -1 to give a dos box the
maximum amount of XMS memory available, if it requests it.
o Set Execution to Exclusive to dedicate the CPU
to computing things for the Dos box.
Exit ``most'' of windows to ``almost real'' Dos
-----------------------------------------------
If your program still is not happy with expansions like the above,
windows contains a function call that was designed to help
installation programs alter critical files. Windows can be ``asked''
to remove almost all of itself from memory, except for about a 2k
stub of win.com, run a dos program or command.com, and then automatically
restart. Innumerable little programs, mostly freeware, take
advantage of this function to exit and then restart windows. They include,
restart ewexec
windos the Restart command of the Batsh program
exitexec the -y option of the winforce program
egress exw31a
Egress and windos are shareware ($5.); the rest are freeware. The
windos author told me, ``Just give $5. to your favorite charity.''
exw31a is a noteworthy win magazine utility: You can drop to real
dos and run a dos program, by dragging and dropping the program on
the exw31a icon.
When exiting to dos in this way, a stub of win.com remains in memory,
the variable windir remains defined, and when you restart windows, it takes
virtually as much time as a full windows restart. The programs themselves
differ considerably in size, ram used, and language used for the source
code. Therefore, some may work better than others for particular dos
programs.
Some dos programs -for instance, those that check for win.com or for windir-
may still refuse to run, in the ``almost real dos'' produced by these
programs.
Exit to REAL Dos, automatically Restart Windows
-----------------------------------------------
It is possible to completely exist windows to real dos, and still
restart windows, automatically. The strategy for doing this is to start
windows from a batch file or doskey macro. Then one does something while
in windows, to tell the batch file or macro to automatically restart
windows after you exit. A sample batch file - startwin.bat:
win.com
if exist %tmp%\run.bat for %ss in (call del %0) %%s %tmp%\run.bat
If run.bat exists, the second line above executes it, deletes it and
then reruns startwin.bat (which restarts windows).
To make windows auto-restart, one must create the file, run.bat, while
in windows. The windows recorder can be used to do this, but I prefer
one of several, freeware programs which run batch files for windows:
wincmd batsh
winforce winx
All of these will run a sequence of dos and/or windows
commands, while in windows.
As an example, say i want to use batsh.exe to run the dos program,
game.exe, by creating run.bat, while I'm in windows. I create a file
called, game.bsh:
command /c game.exe > %tmp%\run.bat
wait
exit
Note: the ``exit'' command above is one of those quick windows exit
programs. Now I create a ``new'' program item in program manager:
Command line: batch.exe game.bash
Working Directory: c:\windows
Description: Run Game.exe
Icon: C:\windows\icon.ico
When I double click this item, the line ``game.exe'' is placed in the
file, run.bat. Then windows is closed (using exit.exe). Since I created,
run.bat, the batch file kicks in after windows closes: It runs run.bat
which executes game.exe; it deletes run.bat, and it then restarts
windows. To the user, (s)he goes from windows to the game and then back
to windows -- automatically. One can restart windows like this for any
number of of dos programs.
Exit windows to real dos; restart windows with identical desktop
----------------------------------------------------------------
The previous procedure drops to Real Dos at some considerable
cost: When you return to windows you don't end up where you started when
you left, and restarting windows this way takes a considerable amount of
time.
Memory gurus may know how to restart windows faster by disk swapping/
caching techniques -- but I don't. However, I did find out how to return to
windows at the same place you left it.
Winsaver is a nifty freeware program that will save both your windows
settings AND your open applications. When you exit windows, and then
return, you end up with exactly the same desktop as when you left.
Winsaver can be used as a general utility, and will optionally prompt
you to save the entire desktop each time you leave windows.
However, if you want to run it, only for dropping to
a ``Real Dos'' box , add a line to each of the batch files above:
winstart.bat
------------
if "%1"=="" win.com
if not "%1"=="" win.com winsaver.exe
if exist %tmp%\run.bat for %ss in (call del %0) %%s %tmp%\run.bat
run-game.bsh
------------
winsaver.exe
command /c game.exe > %tmp%\run.bat
exit
There is another program, recently made freeware, called qrestart (quick
restart). It accomplishes much the same thing as the above batch files, by using a
DOS, TSR, which save an image of your windows desktop to disk.
Quick Restart also includes options to suspend a running windows program,
or completely reboot the machine. Frankly, I could not get the program to
restart windows with my old trident video card. But this has happened to me
with other programs I know to be perfectly good.
You can find the programs mentioned above at:
-----------------------------------------------
http://www.winsite.com/info/pc/win3/util/exit10.zip
http://www.winsite.com/info/pc/win3/util/ewexec15.zip
http://www.winsite.com/info/pc/win3/util/windos.zip
http://www.winsite.com/info/pc/win3/util/winsaver.zip
http://www.winsite.com/info/pc/win3/util/wincmd12.zip
http://www.winsite.com/info/pc/win3/util/wlib.zip
http://www.calmira.org/downloads/exitexec.ese
ftp://ftp.thomson.com/galetech/Batsh228.zip.gz
http://www.geocities.com/Heartland/3619/WinForce.ZIP
http://www.simtel.net/pub/simtelnet/win3/util/qrver150.zip (qrestart)
http://www.simtel.net/pub/simtelnet/win3/util/winx15.zip
http://www.rad.kumc.edu/share/win31/exit/egress12.zip
http://www.rad.kumc.edu/share/win31/exit/exw31a.zip
ftp://zdftp.zdnet.com/pcmag/1994/0628/wcl2.zip
To unsubscribe from SURVPC send a message to [EMAIL PROTECTED] with
unsubscribe SURVPC in the body of the message.
Also, trim this footer from any quoted replies.
More info can be found at;
http://www.softcon.com/archives/SURVPC.html