Updated TCP/IP Printing Options for Windows NT 4.0 SP3 and Later

Last reviewed: February 27, 1998
Article ID: Q179156
The information in this article applies to:
  • Microsoft Windows NT Workstation version 4.0
  • Microsoft Windows NT Server version 4.0

SUMMARY

This article describes the updated TCP/IP printing components that are available in Windows NT 4.0 Service Pack 3 (SP3). There are two new registry entries that allow line printer remote (LPR) to use any available port higher than 1,023. With these entries, LPR is no longer restricted to only using the 11 TCP Ports (721 through 731) and will not conflict with reserved ports, even on very busy print servers.

MORE INFORMATION

TCP/IP printing (LPR) in Windows NT 4.0 Service Pack 2 (SP2) and earlier defaults to using TCP ports 512-1,023. In Windows NT 4.0 Service Pack 3, LPR defaults to using TCP ports 721-731, as described in RFC 1179 (Windows NT 3.51 Service Pack 4 and earlier versions). In addition, LPR in Service Pack 3 is now configurable through two registry entries, that enable the use of TCP ports 1,024 and greater.

For information on setting LPR printers to be RFC compliant, please see the following Microsoft Knowledge Base article:

   ARTICLE-ID:  Q141708
   TITLE     : Printing to LPD Printer Is Slow or Fails with Windows NT

Method 1

In Service Pack 3, a new registry entry is automatically generated when a new LPR port is created. This setting is defined on a per printer port basis and defaults to 0, which is RFC compliant. To enable individual IP address ports to use TCP ports 1024 and higher, apply Service Pack 3 and then use the following steps:

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it.

  1. Start Registry Editor (Regedt32.exe) and go to the following subkey:

          HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\LPDSVC\lpr
    

  2. If the following value exists, double-click the entry. If the value does not already exist, click Add Value from the Edit menu and type the following information:

          Value Name: <IP address of LPR printer port>
          Data Type : REG_DWORD
    
          Value     : 0 or 1
                      0 = uses ports 721-731 (default)
                      1 = uses any port >1024
    
    

  3. Restart the Spooler service for the changes to take affect. Type the following command at an MS-DOS command prompt:

          net stop spooler
    

    To restart the Spooler service, type the following command at an MS-DOS command prompt:

          net start spooler
    

Method 2

There is a fix available that will enable a new registry value, UseNonRFCSourcePorts, to configure LPR printers to use TCP ports higher than 1,024 with one registry entry that will incorporate a global change. Use this fix on print servers that have a large number of LPR ports. See the Resolution and Status sections below for more information about the fix.

IMPORTANT NOTE: If all LPR ports were created prior to applying this hotfix, an individual port entry will exist in the registry for all LPR ports. These individual ports take precedence over the global entry, UseNonRFCSourcePorts, so these individual ports must be deleted from the registry before UseNonRFCSourcePorts will work for all LPR ports. The step- by-step instructions below will go through removing these individual entries and adding the new entry.

Obtain and apply the fix mentioned below and then use the following steps to enable this new registry key:

  1. Start Registry Editor (Regedt32.exe) and go to the following subkey:

          HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\LPDSVC\lpr
    

  2. On the Registry menu, click Save Key and type a filename.

  3. Delete the 'lpr' key to remove all of the individual IP address entries.

  4. Select the 'LPDSVC' key.

  5. On the Edit menu, click Add Key, and then type "lpr" for the Key Name.

  6. Select the newly created 'lpr' key.

  7. On the Edit menu, click Add Value, and then type the following information:

          Value Name: UseNonRFCSourcePorts
          Data Type:  REG_DWORD
    
          Value:      0 or 1
                      0 = uses ports 721-731 (default)
                      1 = uses any port >1024
    
    

  8. Restart the Spooler service for the changes to take affect. Type the following command at an MS-DOS command prompt:

          net stop spooler
    

    To restart the Spooler service, type the following command at an MS-DOS command prompt:

          net start spooler
    

In addition, you can use UseNonRFCSourcePorts in conjunction with the individual port keys to specify an exception scenario where a specific LPR port needs to be RFC compliant. After adding the UseNonRFCSourcePorts entry, create an individual IP address port using Method 1, setting the default for that port back to 0.

RESOLUTION

Obtain the following fix or wait for the next Windows NT service pack.

This fix should have the following time stamp:

   08/08/97  07:50p                13,072 lprhelp.dll

NOTE: Service Pack 3 must be applied to Windows NT 4.0 prior to applying this fix.

STATUS

Microsoft has confirmed this to be a problem in Windows NT version 4.0. A supported fix is now available, but has not been fully regression tested and should be applied only to systems experiencing this specific problem. Unless you are severely impacted by this specific problem, Microsoft recommends that you wait for the next Service Pack that contains this fix. Contact Microsoft Technical Support for more information.


Additional query words: lpdsvc lprmon
Keywords : kbbug4.00 kbfix4.00 ntprint NTSrvWkst kbprint
Version : WinNT:4.0
Platform : winnt
Hardware : ALPHA x86
Issue type : kbbug
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 27, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.