Printing on Remote Desktop session

windows-terminal-services

We have to connect a Windows 2008 server using Remote Desktop from Windows XP machine. A Barcode Printer is attached with XP machine and the printer is shared as Local Resource in RDC session to the server.

On the server we have to print from an application which prints either to LPT port or shared printer (UNC path). For this I use to configure print pooling combining LPT1 and (Terminal Server) TSxxx port. As I don't know the option to access the Terminal Session printer via UNC path.

But I have the following issues –

Every time I connect to a remote session, the printer from my local Win XP machine is showing in Printers and Faxes on Win 2008 Server (Terminal Server), but I am not allowed to manage the Win XP printer from Terminal Server to enable pooling. On the server I have to change the security permission every time and then enable print pooling. How can I keep the security permission unchanged?

Secondly I created a batch file to enable print pooling.

rundll32 printui.dll,PrintUIEntry /Xs /n "Printer (from CLIENT)" Portname "LPT1:,TS005"

But every time the printer in terminal session connects in diffrent terminal Session port. Any solution to make the TS port fixed?

Help from anyone will be highly appreciated.

Best Answer

You can't get the parameters you are asking for "fixed" as printers are removed and re-created on every session disconnect/connect. So obviously, getting the application changed looks like the cleanest solution. If it can't be changed, you obviously could do a bit of scripting around the problem to ease the pain:

If your Windows XP machine is accessible through SMB from the terminal server, you obviously could just share the printer there and use the \\%clientname%\<printer> notation, but you probably have already thought of that and dismissed it for one reason or the other.