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

Need help mapping printers w/ logon script.

Status
Not open for further replies.

Scully87

IS-IT--Management
Dec 3, 2002
50
US
I've got four printers on my network that are all in different locations in the building. They all use the same driver. I'm want to use a script to map all four of them to the clients when they logon to the network and sets the closest one to their default printer. I'm currently on an NT 4.0 domain. Clients are XP and w98.

XP works great using the following:

rundll32 printui.dll,PrintUIEntry /in /n \\ve-controls\estimating
rundll32 printui.dll,PrintUIEntry /in /n \\ve-controls\construction
rundll32 printui.dll,PrintUIEntry /in /n \\ve-controls\accounting
rundll32 printui.dll,PrintUIEntry /in /n \\ve-controls\reception
rundll32 printui.dll,PrintUIEntry /in /n \\ve-controls\estimating /y

The /y setting that printer as the default.

For the 98 systems I installed WSH 5.6.
This is the script I have so far and it works but when it maps the printer it creates it on the client using the driver name. I need it to be the name of the acctual printer share, "estimating, construction, etc..."

Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\ve-controls\estimating"
PrinterDriver = "Fiery X3 55BW-M PS"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

any thoughts or ideas how I can make that work?

Cheers and thanks in advance.

Scully
 
Why bother doing it in the script? Just add them as IP-direct local printers on each machine, and make the 'nearest' printer the default. That way no login script issues, and no hassles spooling through the server. I've got lots of systems set up that way, nary a problem. Did have problems with spooling through the servers!

Fred Wagner
frwagne@longbeach.gov
 
Hi,

I recently had to write a loggon script for XP, W98 and W2000 clients, I used a scritping programe called Kixtart


It was excellent, and worked first time.

you have to make a donation to chairity for using it....

Allen
 
I use an application called defptr to set default printer and net2prt to install printers from server and ifmember.exe to determine which printer to set as default. All are downloadable look on google. Have had problems with 2k and xp if different drivers where installed, but after resetting drivers works well.

Basically you create groups. Ifmember via a script will check which one they belong to and then run the applicable part of the scipt..

A sample

if not exist "c:\defprt.exe" xcopy "\\sever_name\netlogon
c:\ifmember.exe /v "HP Library"
if not errorlevel 1 goto "another part of script"
\\server_name\netlogon\con2prt /cd "\\server_name\HP library"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top