Non-Administrators Cannot Remap an LPT Port to a Network Printer (313644)



The information in this article applies to:

  • Microsoft Windows Server 2003, Datacenter Edition
  • Microsoft Windows Server 2003, Enterprise Edition
  • Microsoft Windows Server 2003, Standard Edition
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows XP 64-Bit Edition Version 2003
  • Microsoft Windows XP Professional
  • Microsoft Windows XP Home Edition

This article was previously published under Q313644

SYMPTOMS

When a user who is not an administrator tries to use the net use command to remap an LPT port to a network printer (for example, net use lpt1: \\printer server\print share), and the LPT port is already assigned to the local parallel port, the LPT port is not remapped. A use who is not an administrator can still map a network printer to an LPT port that is not already assigned to a local parallel-port.

CAUSE

This behavior occurs because only a member of the Administrators group can use the net use command to map the LPT port for a local (hardware) parallel port to a network printer. This behavior is designed to help improve security.

RESOLUTION

To work around this behavior, use one of the following methods:
  • Log on as an administrator, and then use the net use command.
  • Use the devcon disable *PNP0401 command to disable the LPT port mapping to the local parallel port when the computer starts. The devcon disable *PNP0401 command is for LPT1. To find the hardware ID for other LPT ports, use the devcon findall * command. The devcon command must run when the computer starts. For a computer in a domain, you can set up Group Policy to run devcon as a computer startup script. To set Group Policy, open the appropriate group policy, open Computer Configuration\Windows Settings\Scripts (Startup/Shutdown)\Startup, and then add the command.
  • If your program can print to the LPT2 port or the LPT3 port, use the net use command to map the network printer to the LPT2 port or the LPT3 port. Most computers do not have physical LPT2 or LPT3 ports, so a non-administrator can map an LPT2 port or an LPT3 port to a network printer.

STATUS

This behavior is by design.

MORE INFORMATION

The Devcon.exe tool is included with the Windows XP DDK. For additional information about Devcon.exe, including how to download and run it, click the following article number to view the article in the Microsoft Knowledge Base:

311272 FILE: DevCon Command Line Utility Alternative to Device Manager


Modification Type:MajorLast Reviewed:10/29/2003
Keywords:kbfix kbnetwork kbprb KB313644