Discussion Locked

the netuse command

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

hi guys
while rushing out of the office yesterday m boss told me I should create a login script that will bind the printers to LPT1.
so my questions are
1. What would the script look like to do this
2. Why would it even be necessary. I don't think there has been a printing problem before.

thanks in advance

7 replies

by vinnyd

To use the net use command to capture a printer use:

net use lpt1 \\servename\printer_share_name

by wayne r.

The net use syntax in answer 1 is correct for your first question.
Your second question; printing to shared printers from standard Windows packages does not require binding to an LPT port but some programs, particularly those that are DOS based do require an LPT port for printing. Maybe your boss had read something somewhere and thinks thats the way it should be?

Wayne.

by curlergirl

The net use command for printers is very similar to other net use commands:

net use LPT1: \\[servername]\[printersharename]

The only reason to use such a command would be if your users have a DOS program that requires that there be an LPT1 port to send print jobs to rather than using the Windows printer drivers. The "virtual" LPT1 port bypasses all Windows printer drivers and sends directly to the mapped printer. This can be easy (if the DOS program is very simple) or it can be very complicated if you must send PCL commands from the DOS program to the printer in order to format the print jobs. If your users are not using DOS programs, there is no reason to map the LPT port.

BTW, if you have lots of users and lots of printers, this might require you to create a number of different login scripts, unless you can use some sort of environment variable to determine which printer each user needs to map as their LPT1 printer. There is no way in NT scripting, without using an extra scripting tool like Kixstart or Perl, to simply map the user's default printer to LPT1. Hope this helps!

This discussion is closed to new replies.