home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
CALLBOX.ZIP
/
README.DOC
< prev
Wrap
Text File
|
1989-10-22
|
2KB
|
51 lines
"It's a HACK".
This is a nasty set of os/2 programs that, to my surprise
<chagrin>, works.
BOXMON is run in the Dos Box. It keeps on trying to open a named
pipe. Once opened, it grabs whatever is in there and calls
system() with it.
CALLBOX is run from an os/2 1.10 command prompt (full screen or
VIO). It installs a keyboard monitor that stuffs the following key
sequence into KBD$: CTRL-ESC, HOME, ENTER. This brings up the Task
Manager (ctrl-esc), moves to the first "running program" (home),
which is the "Dos command prompt", and switches to it <enter>. As
DOS comes to life, CALLBOX creates the named pipe that BOXMON is
looking for, and writes the command to it. CALLBOX then waits for
BOXMON to send it a "Ok, I'm done" command before exiting. BOXMON
then goes back into a wait state, waiting for the next command from
CALLBOX.
It doesn't matter which program you start first.
Let's say you just booted your system. (I assume that your
config.sys says PROTECTONLY=NO). Your autoexec.bat it set up so that
at some point calls BOXMON.EXE. At any time during an os/2 session
(perhaps in startup.cmd), you can call "CALLBOX <dos arguments>" do
activate the DOS BOX. Since this is the first time the dos box has
been accessed, autoexec.bat will be run. As soon as BOXMON is
invoked, whamo -- <dos arguments> will be run. When the dos command
is done, the os/2 session that called the dos box will come back to
the foreground. BOXMON will be waiting for the next command. (If
the command IS 'command', command.com will be loaded. When you type
EXIT, you will go back to the os/2 session. Now THIS is what you
call a dos shell!)
Only one os/2 session at a time can call CALLBOX. If you try to do
this, the second CALLBOX will give an error "Couldn't make
\PIPE\DOSTALK, error 00e7", and fail (with errorlevel > 1).
The concept for using a keyboard monitor to bring up the Task Manger
was taken from some sample code posted on Microsoft ONLINE.
I actually have no use for this program -- someone else baited me
with "can it be done". Let me know what you do with it.
Peter Fitzsimmons.
Usenet: pete@gompa
FidoNet: 1:250/628
BBS: (416)867-9663.