Microsoft KB Archive/239088

From BetaArchive Wiki

Article ID: 239088

Article Last Modified on 11/20/2007



APPLIES TO

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Datacenter Server
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows Server 2003, Datacenter Edition for Itanium-Based Systems
  • Microsoft Windows Server 2003, Datacenter x64 Edition
  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
  • Microsoft Windows Server 2003, Standard x64 Edition
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)



This article was previously published under Q239088

IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry


SYMPTOMS

Windows 2000 Terminal Services and Windows Server 2003 Terminal Services support the automatic redirection of printers that are configured to use local ports (such as LPT1, LPT2, or LPT3) on computers that have open client sessions through the Remote Desktop Protocol (RDP) 5 client. This printer redirection occurs at logon, and occurs by default.

However, if you are using third-party drivers or some Microsoft Windows 95/Microsoft Windows 98 drivers on the client, printer redirection does not work. When this occurs, the following error messages are logged in the System event log on the server:

Type: Error
Event ID: 1111
Description: Driver drivername required for printer printertype is unknown. Contact the administrator to install the driver before you log in again.

Type: Error
Event ID: 1105
Description: Printer security information for the printername/clientcomputername/Session number could not be set.

Type: Error
Event ID: 1106
Description: The printer could not be installed.


CAUSE

When a client logs on, the Windows 2000-based server or the Windows Server 2003-based server checks the name of the printer driver on the client and looks for the same printer driver name in the Ntprint.inf file. If the name of the driver is not found, the error messages are logged and the printer is not redirected.

RESOLUTION

Prior to Windows 2000 Service Pack 2, you had to edit the Ntprint.inf file to fix this problem. This broke the digital signature on Ntprint.inf and caused the system to return a warning each time a user installed a new printer. The following steps are currently the recommended method of fixing this problem and require that the Windows 2000 Service Pack 2 or later be applied first. If you use Windows Server 2003, you do not have to install a specific service pack to perform these steps. This allows you to specify a different .inf file in the registry for Windows to see if it is not able to locate the driver in Ntprint.inf.

Important The Event 1110 error may also be caused by an incorrect INF name reference in the PrinterMappingINFName value that you add. Make sure that you use the correct INF name.

  1. Open Regedt32.exe and locate the following key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd

  2. Add the following values:

    Name: PrinterMappingINFName
    Type: REG_SZ
    Data: Name of the .inf file to which you want to redirect lookups.
    Example: c:\winnt\inf\ntprintsubs.inf

    Name: PrinterMappingINFSection
    Type: REG_SZ
    Data: Name of the section in the .inf file to which you want to redirect lookups. Example: Printers

After you add the new registry values, create or modify an .inf file to include the user-defined mappings from the client-side to server-side drivers. To do this, follow the following example:

Example of the format for creating a new .inf file:

[Version]
Signature="$CHICAGO$"

[Printers]
"OEM Printer Driver Name" = "<?xm-deletion_mark author="v-vincli" time="20071120T143949+0800" data="Windows 2000 "?>Printer Driver Name"
                

Such as:

"HP DeskJet 720C Series v10.3"  =  "HP DeskJet 722C"
                

The left side of the "=" is the exact name of the printer driver associated with the client-side print queue that is being redirected to the server. The right side of the '=' is the exact name of the server-side driver equivalent that is installed on the Terminal Server.

The friendly printer name that is displayed when you click Start, click Setting, and then click Printers on the client may not be the actual printer driver name that should be redirected to point to a print driver on the Terminal Server. To find the printer driver name to add to the left side of the equal sign in the .inf file that you create, look in the system event log on the Terminal Server at the Event ID 1111's being logged. The Event ID 1111 contains the actual printer driver name that is failing to be redirected. Some Event ID 1111's also contain printer resources on the client that cannot and must not be redirected like fax drivers or software printers. If you do not know the printer driver name to add to the right side of the equal sign in the .inf file, you can install the printer on the server. After the printer is installed the printer driver name appears to the right of "Model:" under the "General" tab of the printer properties. When possible the built in print drivers that are included with the operating system, signed, or WHQL print drivers should be used to improve system stability.

This example instructs Windows 2000 and Windows Server 2003 to use the HP DeskJet 722C driver when a client with Hewlett-Packard's HP DeskJet 720C Series v10.3 driver connects. These names must match exactly, with the exact same spacing; the names are also case sensitive.

NOTE: The format of the [Previous Names] section in Ntprint.inf is exactly the reverse of the user-defined .inf. In Ntprint.inf, the client-side driver is on the right and the server-side driver is on the left.

You can create this file with Notepad and you must save it with a .inf file name extension. In this example, you would specify the .inf file name that you just created in the PrinterMappingINFName registry value and "Printers" in the PrinterMappingINFSection registry value.

When a client connects, the computer will first see if a user-defined .inf has been defined in the registry. If so, it will then see if there is a match to the client-side driver to use it. If one does not exist, it then sees if there is mapping defined in the [Previous Names] section of Ntprint.inf to use that. If there is not, it will try to install the server-side printer using the name of the client-side printer driver as a direct map to a server-side driver. If no drivers are found, you will receive the error messages mentioned in this article.

If the custom .inf file contains syntax errors, you may receive the following message 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 because it refers to the Ntprint.inf. Although this error may really mean that the Ntprint.inf is corrupted, it frequently refers to errors in the custom .inf file.

The custom .inf file must have at least one mapping in its printer name mapping section. If the custom .inf file has a blank name-mapping section, you may receive Event 1110 in the event log. You must restart the Spooler service or reboot the Terminal Server for these changes to take affect.

Terminal Server Printer Driver Redirection Wizard

The Terminal Server Printer Driver Redirection Wizard automates the process of creating the .inf file. The wizard helps you troubleshoot and replace print drivers that were unsuccessfully redirected.

The following file is available for download from the Microsoft Download Center:


[GRAPHIC: Download]Download the 9f237742-e057-4e00-a0d5-62de2ebf9fbd/TSPDRW_Package.exe package now.

MORE INFORMATION

Printer redirection is not possible with the RDP 4 client in Windows NT Server 4.0, Terminal Server Edition. In a Windows NT 4.0 Terminal Server environment, you must use Citrix MetaFrame and the Independent Computing Architecture (ICA) client to redirect client printers.

For information about how to perform this procedure for Citrix ICA clients, see the following Microsoft Knowledge Base article:

214593 Windows Terminal Server with MetaFrame ICA client cannot autocreate some printers



Additional query words: terminalsvr auto-create auto-creation

Keywords: kbprb kbprint kbtermserv KB239088