From: Pedro C. Arias on
Hello, I'm working with a DOS application in TS, I need to capture the
printer thaht i've in my session to a port lpt1, someone has any script that
can detect the TS default printer, share it and use it as LPT1?

--

Saluda Atte.
------------------------------------------------------------------------------------
Pedro C. Arias.
-----------------------------------------------------------------------------------


From: Grant Taylor on
On 06/04/10 08:47, Pedro C. Arias wrote:
> Hello, I'm working with a DOS application in TS, I need to capture
> the printer thaht i've in my session to a port lpt1, someone has any
> script that can detect the TS default printer, share it and use it as
> LPT1?

I don't recall the name of an example, but I have run across programs
that will install and (more) emulate LPT1 (than capture) in such as they
both capture the traffic to the port as well as interpret the raw ASCII
to what printers typically expect. That way, you can print raw ASCII to
dumb printers that would other wise loose their minds, like most cheep
USB printers.

I don't know if these will scale up to dynamically detect which printer
is the default in a terminal services session or not.

I don't think any part of what you are asking for is overly difficult,
but it is a combination of a number of things:

- Capturing the printer port (local to your terminal services session).
- Interpreting the ASCII to GDI printing.
- Redirect the print job to the default printer for the terminal
services session.

I think the last one will be more of the problem. You may find that it
is easier to use network printing and have the terminal server print to
a shared / networked printer that is close to the client.



Grant. . . .