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.
- 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.
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:
ID articol: 313644 - Ultima examinare: 31 ian. 2007 - Revizie: 1