Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to print to remote printer from 2008 Terminal Services

Posted on 2010-08-29
5
Medium Priority
?
1,040 Views
Last Modified: 2013-11-21
A client has a 2008 Foundation server configured with the Terminal Services role. LAN users and WAN users (via Terminal Services Gateway) logon using RDP to access the line of business application.

LAN users can print to printers on the LAN and WAN users can print to their local printers.

The problem is that the LAN users also need to be able to print to the WAN users local printers.

The WAN users local printers are a mixture of USB and network attached printers. None of the WAN user locations have fixed IP addresses and all of the WAN user locations only have very basic DSL routers (not VPN capable).

What is easist way of making this happen?
0
Comment
Question by:bosshognz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 27

Accepted Solution

by:
davorin earned 1000 total points
ID: 33556353
You can try to print to printer which is automatically created when TS user logs on the terminal server.
(Printer www on yyy created in sesion 11). I have never tried that. Another problem is that that printers are created and deleted all the time and session number is never the same. And you could have permission problems at remote sites as they are not part of your domain.
For other possibility you already answered to yourself. You would need VPN connection between remote sites with static IPs or dyndns.
0
 

Expert Comment

by:SYSKING
ID: 33556720
When a user logs on to a Windows Terminal Server with the Microsoft Remote Desktop Client, the client sends information about the client’s printers to the Terminal Server. The Terminal Server uses this information to auto-create printers in the user’s session that correlate to the user’s local or network printers. If the name of the client printer driver matches “exactly” that of a printer driver that is installed on the Terminal Server, or is listed in the ntprint.inf (the file that lists the printer drivers that are built-in to the Windows Server installation, and can be loaded on demand) the client printer is successfully auto-created. Print jobs created in the user’s session are routed from the Terminal Server to the associated client printer by way of a virtual channel in the RDP Protocol.

If an exact name match does not exist between the client and Terminal Server printer driver, auto-creation fails and errors 1111 and 1106 are written to the system event log. For this client printer auto-creation to happen, several conditions must exist:

The Remote Desktop Client (mstsc.exe) must have Printers enabled.
2.If users are connecting via the Remote Desktop Web Connection (AKA Tsweb) the following must be set to “true” in the default.htm file.
'Device redirection options

   MsRdpClient.AdvancedSettings2.RedirectPrinters   = True

3.In the Terminal Services Configuration Administrative Tool (tscc.msc) -> Connections -> RDP-Tcp -> Properties, Windows Printer Mapping must not be disabled, and connect client printers at logon should be enabled.

4.In the user’s account (Active Directory or Windows Local Security Accounts Manager) -> Environment -> Client Devices, Connect client printers at logon should be enabled.

5.In Group Policy, “Do not allow client printer redirection” should not be enabled.

7.The printer must NOT be a Host-based printer (AKA GDI or Windows-only Printer). Host-based Printers, like Hewlett Packard Printers that utilize  LIDIL (Lightweight Imaging Device Interface Language), will not function in a Terminal Services Environment (without 3rd party printing software). Consult with the printer manufacturer to ensure that the printer can operate with a PCL or PostScript Driver.
8.The Printer Driver on the Terminal Server must not use a printer monitor, i.e. the printer utility that is loaded in the Notification Area of the user’s Windows Desktop with many economy printers. These printer drivers are not designed to work in multi-user environments like Windows Terminal Services.
Without using 3rd party printing programs, the following lists the type of printer drivers that can be used on a Windows Terminal Server, in order of preference from most preferred to not preferred:

1.Windows Built-in PCL or PS Drivers – Version “Windows 2000, Windows XP and Windows Server 2003”
2.WHQL (Windows Hardware Quality Labs) Signed Drivers – include the “Designed for Windows” Logo
3.PCL or PS Drivers – certified (by the Manufacturer) for use on Windows Terminal Services or Citrix
4.Windows Built-in PCL6 Drivers – Version “Windows 2000, Windows XP and Windows Server 2003”
5.Manufacturer’s PCL or PS Drivers – Version “Windows 2000, Windows XP and Windows Server 2003”
6.Manufacturer’s PCL6 – Version “Windows 2000, Windows XP and Windows Server 2003”
7.Manufacturer’s PCL or PS Kernel Mode Drivers – Version NT4
The printer drivers which are installed on a Windows Server can be determined via the Printers and Faxes Control Panel Applet  -> File -> Server Properties -> Drivers.


0
 
LVL 6

Expert Comment

by:bluepig
ID: 33558840
davorin is correct. When a remote user and I are both logged into the Terminal Server, I have been able to print to his remote printer. (Note that I can only see those printers if I am logged into the Terminal server with sufficient rights - ordinary users cannot see each other's printers but administrators can see all)
0
 
LVL 3

Expert Comment

by:ola_erik
ID: 33565278
0
 
LVL 31

Assisted Solution

by:Cláudio Rodrigues
Cláudio Rodrigues earned 1000 total points
ID: 33567676
There is a workaround (nasty and dirty if you ask me).
That would be to create a script that would share the autocreated printer with a known name. For example, LocationA_PRT, LocationB_PRT and so on.
That way you could then map that printer on the TS itself.
The idea is:
1. User logs in to the TS and gets a printer created named myprinter on yyy created in session xxx.
2. Your script finds that printer (as it is the default) and shares it as LocationA_PRN.
3. Other users that logon to the TS map that printer (you can create a batch file to map it and put it on the start menu).

That will do what you want. I wrote a script for a similar need (share/map to LPT1 port so DOS apps can print) ages ago. You definitely need to modify it to 2008 and check permissions required. But it will definitely do the trick.
This link has the fix for 2008:
http://www.winserverkb.com/Uwe/Forum.aspx/windows-ts/14922/W2K8-TS-Printer-Share
Also you can try using RENPRINTERS (paid utility) to rename and then simply share as per portions on my script.

Cláudio Rodrigues
Microsoft MVP - Remote Desktop Services
Citrix CTP

; Gets the default printer name and share/map it for DOS apps. 
; By Cláudio Rodrigues, http://www.wtslabs.com 
; This is for Windows 2003 Terminal Services!!!! 
; Example String: HP LaserJet 4Si (from CLAUDIOXP) in Session 1,winspool,TS002
 
;Reads the default printer from the registry. 
$DefaultPrinter = ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows","Device") 
 
;Extracts the printer name on the TS. Example: HP LaserJet 4Si (from CLAUDIOXP) in Session 1 
$WhereisComma = InStr("$DefaultPrinter",",") - 1 
 
$TSPrinterName = Left("$DefaultPrinter","$WhereisComma") 
 
;Extracts the machine name and Session ID from this string: (from CLAUDIOXP) in Session 1 
$WhereisParenthesis = InStr("$TSPrinterName","(") + 1 
 
$Temp = Substr("$TSPrinterName","$WhereisParenthesis",Len("$TSPrinterName") - "$WhereisParenthesis" + 1) 
 
$WhereisSpace = InStr("$Temp"," ") + 1 
 
$WhereisParenthesis = InStr("$Temp",")") 
 
$MachineName = Substr("$Temp","$WhereisSpace",$WhereisParenthesis - $WhereisSpace) 
 
;Extracts the Session ID only from the string above. Example: 1 
$Temp2 = Substr("$Temp",Len("$Temp") - 8, 9) 
 
$PosTemp = InStr("$Temp2"," ") + 1 
 
$SSID = Substr("$Temp2",$PosTemp, Len($Temp2) - $PosTemp + 1) 
 
$ShareName = "TSPrinter" + $SSID 
 
$TSPrinterName = chr(34) + $TSPrinterName + chr(34) 
 
;Shares the printer. 
Shell 'NET USE LPT1: /DELETE' 
 
USE LPT1: /DELETE 
 
Shell 'rundll32 printui.dll,PrintUIEntry /Xs /n $TSPrinterName sharename $Sharename attributes +Shared' 
 
$PrinterOnTS = "\\127.0.0.1\" + $ShareName 
 
USE LPT1: $PrinterOnTS /PERSISTENT:NO 
 
Notes:
1. This script is written in KIX. Make sure you get it at http://www.kixtart.org.
To run it, rename it to TSPrint.kix and call it using KIX32.exe.
2. This script will automatically share the default autocreated printer under 
your TS session and map it to the LPT1 port. This will allow your users to 
print from any DOS application seamlessly. 
3. There may be a permissions issue if the user is not a Power User or something else.
Make sure you try this for your users with different group memberships.

Open in new window

0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Remote Apps is a feature in server 2008 which allows users to run applications off Remote Desktop Servers without having to log into them to run the applications.  The user can either have a desktop shortcut installed or go through the web portal to…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question