Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Net Use LPT1 1

Status
Not open for further replies.

GSC

MIS
Mar 27, 2001
464
0
0
EU
Hi,
Got a question regarding the Net Use lpt1 command.
Some of our users need to use the command above to connect to a network printer.
As a "normal" user we get the error message that access is denied. Also as a "power user" the error message is the same.
Not until we add them to "administrators" group can they successfully complete the command:

Net Use lpt1 \\Server\Printersharename

Question:
Is this a restriction in Win XP that the users must be a local administrator to use this command?
If yes, is there a Microsoft article about it.

Cheers,
GSC
 
Thanks,
The web page didn't seem to work though.
Without using any fancy tools or hacking the registry - do I have to add them to the "Administrators" group in order to achieve what I want?

Cheers,
GSC
 
To recap, under Windows XP non-administrators cannot net use lpt1 if there exists a physical port lpt1. This is by "design" according to Microsoft.
So, you need to remove this restriction.

. Download the Microsoft SDK tool Devcon.exe from Microsoft at this site:
Devcon.exe is a sort of command line Device Manager on steroids. Place this in an accessible directory to the user during login.

. Copy and paste the below into notepad, and give it a .CMD extension:


REM remove local lpt1 assignments on client
REM *PNP0401 is the local lpt1 assignment
devcon disable *PNP0401

REM do the redirection to a network printer. Persistant is optional
net use lpt1: \\printerserver\printername /persistant:yes

REM the client is now using a network printer on lpt1
REM a Dillinger99 trick to set the default attribute
rundll32 printui.dll,PrintUIEntry /in /n\\printerserver\printername /y

REM End of the batch file
 
I found that if your workstations are using their own LPT1, you can net use LPT2 instead.
 
Because LPT1 and on some machines also LPT2 typically are physical printer ports, I am using LPT3 and upwards for network printers mapping.

===
Karlis
ECDL; MCP
 
Thanks a lot BCastner! Worked like a dream!

Cheers
GSC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top