Re: To redirect cmd.exe to COM1

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Brian (brian_at_nospam.com)
Date: 07/19/04


Date: Mon, 19 Jul 2004 09:48:13 -0400

joseph wrote:
> Hi folks,
> Do anyone of you know how to redirect the cmd.exe output to serial
> port(COM1)?
> Mine is a headless platform and I have to do it.I went through the
> documentation and inserted the following registry entries in
>...

Raphael is right about the baudrate. But beyond that, you may run into
another problem: you can run cmd.exe and get it's io to the serial port,
but child processes (say, running ipfonfig inside that shell) cause the
console driver to try to open the serial port a second time, which
fails, so you never see their output. The best you can do is either pipe
output to a file and then 'type' the file, or abandon the built-in
serial console and write your own, actually capturing stdin, stdout, and
stderr of the cmd.exe process and piping it to the serial port yourself.
Or maybe modify the serial driver.

(Oh, and it doesn't pass things like CTL-C, so take care not to run any
processes that don't exit on their own!)

  - Brian Bender



Relevant Pages

  • Re: Headless Device
    ... I want to know How I should see the COM1 outputs!!! ... > debug serial port). ... > The remote console has nothing to do with the debug serial port: ... I want to know how to redirect all the input and output to a serial ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Serial port access through terminal server on Solaris
    ... you might want to boot solaris without the -B stuff. ... That way the BIOS stuff would go to the VGA ... and the serial port would be idle until Solaris booted up and ... I am able to redirect "GRUB" to the serial also. ...
    (comp.unix.solaris)
  • Re: Redirection in gforth
    ... to send ASCII chars out a serial port, as well as to STDIN (the ... You can redirect the Gforth output from the shell command line with ... you can use OUTFILE-EXECUTE to redirect the output of ... M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html ...
    (comp.lang.forth)
  • Questions on printk and console_drivers
    ... I got a questions on printk and console_drivers. ... So I registered 2 console driver using register_console. ... I can see the output from serial port 1 after it was registered, but can't see any output from it after serial port 2 has been registered. ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)