Вы находитесь на странице: 1из 5

Workaround Solution: Client to Server Print Driver Mapping

To address this, it's possible for you to correlate the names of printer drivers on your server with
the names of printer drivers on your users' clients. For example, you can tell the server that the
client print driver Hewlett Packard LaserJet 5P is the same as the server print driver HP
LaserJet 5P. Keep in mind that you only need to do this if (1) you are using client printer
mappings and (2) your clients are not running Windows 2000 or Windows XP.

In order to enable printer driver mapping, you need to place a file on your Terminal Server that
contains the pairs of client and server driver names. In previous versions of Terminal Server, this
was done via a mapping file called wtsuprn.inf located in the %systemroot%\system32\ folder.
However, this file does not exist by default in Windows Server 2003, and Windows does not look
for it.

To create a mapping file in Windows 2003, you must add two registry values:

Key: HKLM\SYSTEM\CurrentControlSet\
Control\Terminal Server\Wds\rdpwd

Type: REG_SZ

Value: PrinterMappingINFName

Data: Name of the .INF file that contains printer driver name mappings. (For example,
c:\winnt\inf\printsubs.inf)

Key: HKLM\SYSTEM\CurrentControlSet\
Control\Terminal Server\Wds\rdpwd

Type: REG_SZ

Av. Paseo Coln 713. Piso 14. Of. E. Ciudad Autnoma de Buenos Aires. Tel.: 54 11 4331-3897
E-mail: negocios@stinetwork.com.ar | www.stinetwork.com.ar
Value: PrinterMappingINFSection

Data: Name of the section in the .INF file that contains the actual mappings. (For example:
Printers)

Once you've finished adding your registry entries you should restart the spooler service or
reboot the Terminal Server to allow these changes to take effect. After you add the new registry
values, you'll need to create an .INF file that includes the driver names you want to use for
client-side to server-side mappings. You file will look something like this:

;PRINTSUBS.INF

;This file contains Mappings for Client driver to Server driver printer connections

[Printers]

;"Client Printer Driver Name" = " Server Printer Drive Name"

"Hewlett Packard LaserJet 5P" = "HP LaserJet 5P"

You can create this file with Notepad and save it within an .INF filename extension in the
%SystemRoot%\System32\ directory. Using this example, you would specify the printsubs.inf file
name that you just created in the PrinterMappingINFName registry value and "Printers" in the
PrinterMappingINFSection registry value.

The printer driver names you place in this file are case sensitive and space sensitive. Basically,
everything between the quotation marks must match the printer name exactly . As with many
.INF files, the leading semicolon (;) indicates that the line is a comment and should be ignored.
When you use this file, be aware that you can have more than one client printer mapped to a
single server print driver.

Av. Paseo Coln 713. Piso 14. Of. E. Ciudad Autnoma de Buenos Aires. Tel.: 54 11 4331-3897
E-mail: negocios@stinetwork.com.ar | www.stinetwork.com.ar
Creating a printer driver mapping file is more of an art than a science. Fortunately, the some
very kind people run a website called www.printingsupport.com . This site has downloadable
printer mapping files that you can use in your environment.

Once you get your mapping file created, you'll need to make sure that it exists on every Terminal
Server where you want these printer driver mappings to be applied. Keep in mind that this
mapping file merely tells the server which of its already installed drivers correlate to client printer
drivers . You'll also need to install the actual printer drivers on your Terminal Server when you
use this file.

If your .INF mapping file contains any syntax errors (other than a misspelled driver name inside
the quotes), you may receive the following messages in the event log:

Event 1110: "Error processing ntprint.inf. If the file on the system is corrupt, you can restore it
from the installation media.

This message is misleading since it refers to ntprint.inf and not your custom filename. This
error usually means that the custom .INF file that the system is processing has errors in it. The
most common error is that you will create a custom mapping file with no entries in it. You new
.INF file must have at least one mapping in its printer name mapping section and the lines
containing your mappings must not start with a semicolon. If the custom .INF file has a blank
name-mapping section, you'll receive the Event 1110 errors in the event log.

Finding the Exact Printer Driver Names

In order to be able to map printer drivers between your Terminal Server and clients, you need to
know the exact printer driver name for both the server and the client. You can get this
information from the printer properties dialog box (Right-click Printer | Properties). On Windows
9x computers, the driver is listed in the Print using the following driver box. On Windows 2003
servers the driver box is on the Advanced tab. Because the name of the printer driver can vary
on the workstation depending on the platform, make sure you have the right driver name for the

Av. Paseo Coln 713. Piso 14. Of. E. Ciudad Autnoma de Buenos Aires. Tel.: 54 11 4331-3897
E-mail: negocios@stinetwork.com.ar | www.stinetwork.com.ar
each client platform that is being used. For example, if you see HP LaserJet 4000 Series PCL
5/5e, be sure to note all the punctuation, spaces, and case sensitivity.

If you already have the driver installed on your Terminal Server, but you do not have a printer
installed where you can check the properties, you can always view the driver name from the list
of drivers installed on the server. Just open the Printers applet in control panel and use the
Drivers tab from the File | Server Proprieties applet. This will show you a complete list of
drivers installed on your Terminal Server.

Once the driver names have been added to your mapping file, your users will be able to print to
their client printers from Terminal Server sessions. You do not have to reboot your server after
you change the mapping file. Simply log the user off and then back on.

Sequencing of Client Printer Driver Mapping

When a user with client printers logs on to a Terminal Server, the server goes through several
steps to try to find an appropriate printer driver to use:

1. The list of the client's local printers is enumerated from the registry.

2. The server queries the printer driver string names on the client.

3. The server looks for the client printer driver name in the printer driver mapping .INF file.

4. If no match is found, the server looks for a driver name match in the [Previous Names]
section of built-in ntprint.in f file.

5. If the server still cannot find any mapping information, it checks to see if the driver is already
installed. To do this, it looks
at HKLM\System\CurrentControSet\Control\Print\Environments\Windows NT x86\Drivers\ in the
registry.

Av. Paseo Coln 713. Piso 14. Of. E. Ciudad Autnoma de Buenos Aires. Tel.: 54 11 4331-3897
E-mail: negocios@stinetwork.com.ar | www.stinetwork.com.ar
6. If it can't fi nd the printer driver information in the registry, that means that the printer driver is
not installed. As a last resort, the server will check to see if the client's printer is one of the
hundreds of standard printers that are available with Windows. To do this, it goes back to the
built-in ntprint.inf file and looks in the [Manufacturer] section. If a match is found, the server
automatically installs the driver by extracting in from the built-in Driver.cab file located in
the %systemroot%\Driver Cache\i38 6 folder on the server.

7. Once any of these steps is successful, the server creates a dynamic printer port that maps
back to the real printer on the user's client device. This port is mapped through an RDP virtual
channel . Then, the server creates a printer object with the appropriate permissions (and using
the appropriate drivers) for the user.

8. If the server is not able to find an appropriate driver using any of the previous methods, then
the client's printer is not mapped for the session and an event that states that the printer could
not be redirected is written to the event log.

9. The server starts this entire process over again for the next printer on the client's list.

In general, Terminal Server 2003's printer driver installation process works fairly well. There
used to be problems with incompatible drivers getting installed and crashing the server, but that
hasn't really been a problem since the NT 4 days. (Back then, a lot of regular drivers would blue
screen the server if multiple users tried to print at the same time. Ouch!)

Av. Paseo Coln 713. Piso 14. Of. E. Ciudad Autnoma de Buenos Aires. Tel.: 54 11 4331-3897
E-mail: negocios@stinetwork.com.ar | www.stinetwork.com.ar

Вам также может понравиться