Link to home
Start Free TrialLog in
Avatar of Lmuro
Lmuro

asked on

Map network printer from Logon Script

Hi all,
guess that it's a newbie question, but I don't know how to map a network printer that is in a server, to all workstations(NT 4 wks) through login script. The network runs on TCP/IP.

somebody can help me with this?
Thanks, Leandro
Avatar of pbarrette
pbarrette

Hi Lmuro,

The simplest way is:
NET USE LPT1: \\Server\Printer

The slightly more complex, but certainly more powerful way is to make the Windows printing subsysstem do the job by manipulating the printui.dll entries.

An excellent reference for doing that is here:
http://www.windows2000faq.com/Articles/Index.cfm?ArticleID=14539

pb
Check out con2prt.exe from the resource kit.
ASKER CERTIFIED SOLUTION
Avatar of Mirfster
Mirfster
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lmuro

ASKER

Thanks to all, you were very helpful, but Mirfster hit the key. It's a simple program and easy to use, and no user intervention required at all.

Thanks
Leandro
Hi all,

Damn. And my solution was so obscure and confusing, I thought I'd get this one.. :)

pb
LOL... I just lucked out on this one Pbarrette.  Besides, with 188 questions answered, I would hope you could spare a few to a "Newbie"... ;)
Hi Mirfster,

Ok, ok.. I'll concede this one. :)
pb
Avatar of Lmuro

ASKER

pbarrette, the net use just maps local ports (no doubt I should take that if worked). I saw your reference to page windows2000faq, but doesn't work on WNT (I must recognize that don't have much time to try). In the other hand, don't have a lab where I can test or make "experiments", so I worked directly on the production server.

Cheers,
Leandro
Hi Lmuro,

I apologize if my comments were mistaken for a complaint. I also think that Mirfster's answer was the best.

pb
Avatar of Lmuro

ASKER

pbarrette,
please don't apologize that make me feel a dictator ... LOL
Good one mirfster, I have been looking for a good 9x solution. I'm trying this tomorrow.
bryancw,

     While this does work for 9X machines, you have to specify more than just the \\Server\Printer.  You also have to specify the PrinterName and actual PrintDriver.  

     Our environment is mixed with 95,98,NT,2K and XP machines.  I devised a webpage that shows the floor plans and locations of the printers, when the User clicks on the printer it launches a Batch file to install the proper printer.  For the 9X machines, I created an "AutoIT" exe that will install the printer and pull the driver from the Server.  This keeps everyone at the same drivers, so we don't have problems with varying driver revs.  If you want I can provide you with the script and batch file.  Both the "AutoIT" and "AdprintX" are free and pretty easy to use (as well as "MSGBox" for displaying different messages).  In order to edit the Templates for each printer, all I have to do is a "Search & Replace" for 2 items in the AutoIt Script and 3 items in the batch.

Let me know and I will be more than happy to show you.

Mirfster.

Mirfster,

Can I get these from you... this sounds very useful... thanks.

-splice
Spliceboti,

Which would you like?

The AutoIT Scripts, Batch File or the AdprintX.exe?

Or would you like to see an example of the files?

Mirfster.
Actually I downloaded the files yesterday and was messing around with them, but what I couldn't figure out is:
When I created the batch file, the batch wasn't executed because the program that did the actual mapping resided on the server... I am trying to make a logon script or actually the map you did sounds like a great idea.  Whatever advice and/or instruction you could give me would be very helpful... I am relocating 90 of 150 employees and think this would be the easyest way... thanks
-splice
spliceboti,

    Just so we don't keep notifying the other people that have commented in this question, please post a question for this.  Once you post the question, place a link to it in this question, so I can find it.  I will be more than happy to help later on this evening, when I get home.


Mirfster.
Thanks mirfster, sound like a good idea... sorry to the rest of you guys... the link is https://www.experts-exchange.com/questions/20618016/Mapping-printers-in-a-win-2k-domain-with-a-script.html