Redirecting output of DOS app run in DOS box

Redirecting output of DOS app run in DOS box

Post by Bill Ray » Sat, 25 Mar 1995 17:40:54



Hi

I've recently been experimenting with running DOS apps under
Windows using WinExec(), and by running them directly from
the file manager or program manager.

I've found that using WFW3.11 the command line redirection
facility doesn't work. EG if you type

  format /? > 1.tmp

in a DOS shell or under DOS, the format help screen ends up
in the text file 1.tmp, as it should. But if you type the
command in under Windows it ignores the redirection. This
applies whether I run the command from the program manager
or by using WinExec from a program.

I've found a workaround is to call a command shell to do
the redirection:-

  command /c format /? > 1.tmp

and this works OK. Still it seems a bit clunky. Does anyone
have any ideas?

Bill Rayer

Lingo Language                                      __--_|\
PO Box 527, Applecross                             /       \
WA 6153 AUSTRALIA                                 (   AUS   )

                                                          v

 
 
 

1. Disable 'close' button for NTVDM dos box running DOS app

Is there any way to disable the 'X' button for a NTVDM (dos box)
process that is running a 16 bit DOS application?  I want to prevent
the user from exiting abnormally.

I scoured MSDN and dejanews for articles related to SetWindowLong and
found only one mention that it cannot be done.  It this true?

Thx,
        - Chris

2. UPLOADING

3. Run DOS app invisibly and capture output to Windows app?

4. A log for mysqlimport.

5. Can't redirect output from a DOS box

6. Resource editor on Windows

7. How do I run a DOS program without a DOS Box????

8. determine incoming call

9. How to distinguish Dos and Dos Box under Windows in run time.

10. Running DOS apps and displaying output

11. Win app to exit & run dos app w/out checking for existing apps.

12. how do I disable my app when running % done modeless dialog box?

13. Full screen DOS box freezes (Dos box scheduler problem?)