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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NET USE and default printers

Status
Not open for further replies.

StevenB

IS-IT--Management
Joined
Sep 25, 2000
Messages
247
Location
US
Hi,
I'm working with a DOS-based application that really wants to print to LPT1. We can trick it into printing to a network printer by using the command:

NET USE LPT1 \\servername\printername

However, what we need now is to figure out if we can add this command to a logon script, and have \\servername\printername dynamically generated based on what that user's default printer is.

Any ideas you might on where to go would be greatly appreciated.
 
With DOS-based programs in my office, we load the printer driver for the network based printer on LPT1 (does not necessarily have to be the default printer). Then we run the net use command
net use lpt1: \\servername\printername /persistent:yes

That way the printer stays mapped each time they log on without having to run a login script.

Or you can write a simple script with the net use command and put it in the all users startup folder.
 
Hmm, that's close to what I want to do, but here's the situation. We have 50 different users, most of whom use different printers. I'm trying to find a solution that would let me create one "script" for all users. In other words, this "script" needs to be able to dynamically determine \\servername\printqueue. I don't want to have to create a separate script for each user.

So, I guess I was trying to figure out a way to script it so that the script would dynamically generate a server name and printer based on what default printer was already configured for that user.

Any further thoughts?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top