Microsoft KB Archive/313644

= Non-administrators cannot remap an LPT port to a network printer =

Article ID: 313644

Article Last Modified on 1/31/2007

-

APPLIES TO


 * Microsoft Windows XP Service Pack 2
 * Microsoft Windows XP Service Pack 2

-



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 more 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 The DevCon command-line utility functions as an alternative to Device Manager

Keywords: kbfix kbnetwork kbprb KB313644

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.