[comp.os.msdos.misc] Stdout redirection in config.sys

m2c11@dbf.kun.nl (John Graat) (04/29/91)

Hi there,

is there anyone who knows if it is possible (and if so, how) to redirect the
standard output within the config.sys? It is obvious to me that a '>' does
not work. It is of course possible to change some instructions in some of the
.sys files by nop's, but then I have to debug the .sys files, which I
am not very interested in.

Thanks in advance.

------------------------------------------------------------------------------
John Graat			| "When DoD takes a big bag of money and 
Faculty of Mathematics and      |  paints 'AI' on it, this instantly creates
Computer Science                |  a lot of believers in artificial
KU Nijmegen                     |  intelligence", Gary Martins.
The Netherlands
email: m2c11@sci.kun.nl or
       bs2@nemesis.iaci.kun.nl
------------------------------------------------------------------------------

leonard@qiclab.scn.rain.com (Leonard Erickson) (05/17/91)

m2c11@dbf.kun.nl (John Graat) writes:

>is there anyone who knows if it is possible (and if so, how) to redirect the
>standard output within the config.sys? It is obvious to me that a '>' does
>not work. It is of course possible to change some instructions in some of the
>.sys files by nop's, but then I have to debug the .sys files, which I
>am not very interested in.

This is only documented in a few OEM manuals, and thus may be subject
to change without notice. You can't redirect *just* stdin. But you can
redirect STDIN and STDOUT.

shell=command.com NUL /e:1024 /p

NUL will be the console device until you change it. Obviously, this
requires a CTTY CON statement in your AUTOEXEC.BAT...

Note that you will still lose file handles if you install any TSRs. Just
as if you'd put "TSR >NUL" in AUTOEXEC.BAT. 

Any device is apparently usable. My notes say that anything on the shell
line that doesn't start with a switch character will be checked. If it is
a device, that becomes the console device. If it is a directory, that
is where COMSPEC will point, and where DOS will look for things like 
COUNTRY.SYS.

-- 
Leonard Erickson			leonard@qiclab.uucp
personal:	CIS: [70465,203]	70465.203@compuserve.com
business:	CIS: [76376,1107]	76376.1107@compuserve.com