Command Prompt:> net use lpt1: \computer_nameprinter
The password is invalid for \computer_nameprinter.
Enter the user name for ‘computer_name’: user
Enter the password for ‘computer_name’:
System error 5 has occured.
Access is denied.
To make matter worse, no matter what security settings and permissions you have changed, the net use command simply is not working.
The reason for this issue is because in Windows XP and Windows Server 2003, non-administrators cannot remap an LPT port to a network printer, when the LPT port is already assigned to the local parallel port. In other words, only a member of the Administrators group can use the net use command tomap the LPT port for a local (hardware) parallel port to a network printer. According to Microsoft, this behaviour is desinged to help improve security.
To solve the cannot net use lpt1 problem, there are several ways:
- Log on as an administrator
- 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.
Alternatively, the command can be run individually at each workstation by adding a command to Startup folder for All Users or particular users. Devcon utility can be found here with its information.
- 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.”