Windows Terminal Server Printer Substitution

I had to dig deep into the archives the other day when a customer, who was connecting to an older terminal server on a Windows Terminal Server 2003 server, began having problems printing. The printer they had been using for years finally broke and they connected a new one. When the user went to print to this new printer from her RDP terminal session, it did not work. It turns out that her old printer was configured using print substitution. Nowadays, hopefully you have replaced your old Terminal Server 2003 servers with brand new shiny TS 2008 servers. Terminal Services in Windows 2008 has a great new feature called Terminal Services Easy Print. If you didn’t want to make use of that, you could always go with a third party product like Thin Print. However, when neither of those are available to you, then you can always fall back on archaic but reliable NT Print Substitution method.

When a Terminal Services client cannot print to their local or networked printer, it is because the drivers have not been installed.  You can install the drivers, but it is preferred that you utilize a method called NT Print Substitution.  In this process, you “fool” the TS client printer connection to use a legacy (or already installed) driver.  This method is typically needed when the printer utilizes drivers that were not released when Server 2003 was released.

1. On the Windows 2003 Terminal Server, navigate to C:\WINDOWS\system32\TSPDRW.  Open NTPrintSubs.inf.  Create this file using NotePad if it is not there.  You should/could see the following format:

[Version]
signature=”$CHICAGO$”
[Printers]

“Lexmark C750 PS3” = “Lexmark Optra C710 PS”
“Canon iR5000-6000 PCL5e” = “Canon iR5000i PCL 5e”
“HP LaserJet 4200 PCL 6” = “HP LaserJet 4000 Series PCL”
“RICOH Aficio 1060 PCL 5e” = “Ricoh Aficio 1060 PCL”
“hp LaserJet 1320 PS” = “HP LaserJet 5″

** Note – If this file does not exist, make sure to include the following verbiage at the top of the inf file:

[Version]
signature=”$CHICAGO$”
[Printers]

3. Note the format of each line in the NTPrintSubs.inf file. Starting from the left, you see the name of the newer Printer followed by an = sign and then the substitution.  The substitution represents a driver that is currently installed on the Server.  For example, take the first line in the above example file.
“Lexmark C750 PS3” = “Lexmark Optra C710 PS”
The yellow represents the printer name while the green represents the driver substitution to be used. When a user connects to the terminal server with the printer name of Lexmark C750 PS3, the terminal server will map this printer and use the Lexmark Optra C710 PS print driver already loaded on the terminal server.

4. When building the print substitutions, you need to find the EXACT spelling (including capital letters) of the printer name (i.e. “Lexmark C750 PS3”).  You can find this exact spelling in the Event Viewer on the Terminal server.  Look for the Event ID 111 in the System portion of the event log.

Event Type:          Error
Event Source:       TermServDevices
Event Category:   None
Event ID:               1111
Date:                       5/23/2006
Time:                      11:44:59 AM
User:                       N/A
Computer:              xxxxxxxxx=
Description:
Driver hp deskjet 9600 series required for printer hp deskjet 9600 series is unknown. Contact the administrator to install the driver before you log in again.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

5. In this example, the printer name (on the left of the = sign, would be  “hp deskjet 9600 series”. This must be in quotes. To the right of the = sign, you can try a currently installed driver to substitute.  You may have to play with several different drivers before hitting on one that will work. In this example, we are using  “Lexmark Optra C710 PS”. Once you are finished adding all your printer substitutions, save the file.

6. If you are creating this file for the first time, then you need to tell the Terminal Server to use the Printer Substitution inf file you created in Step 1.  You do this in the Registry.

7. On the terminal server, type in command regedit

8. Navigate to HKLM\System\CurrentControlSet\Control\Terminal Server\Wds\rdpwd

9. Create a new String Value (REG_SZ) entitled PrinterMappingINFName and in the textbox type the location of the new .INF file you created (i.e. C:\WINDOWS\SYSTEM32\TSPDRW\NTPrintSubs.inf)

10. Create another REG_SZ entry entitled PrinterMappingINFSection and in the textbox type in the section in the new INF file where the driver reference can be found (i.e. Printers)

trmsrvrprtsub1
11. Finally, log in via Terminal Services and see if your printer has been mounted. If not, go the Event Viewer and look for new Event ID 1111 messages and make sure that your printer driver names listed in the INF file you created match exactly.  Remember, you can also try a different driver.

George Almeida

Welcome to my little corner of the blogosphere. I'm an Information Technology Director. I specialize in Windows operating systems, applications, servers, storage, networks and also have a technical background on the IBM iSeries platform. My only purpose for this blog is the hope that it helps someone, someday, somewhere. Any meager proceeds derived from our sponsors will be donated to charity.

You may also like...

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x