Help Mapping a Shared Printer

G

Guest

I hope this the correct place to post this... if not please refer me to the
correct board.

I am trying to create a .bat file that uses a few NET USE commands that will
map drives and printers. I have a problem with mapping a printer. Within my
file i have:

NET USE \\<computername>\<printername>
and
NET USE LPT1: \\<computername>\<printername>

Upon the execution of the file it says everything is completed successfully,
but when i goto Printer and Faxes in Control Panel the printers I mapped are
not displayed. Can someone pls help

Tony
 
B

bart

Hi Tony,

if you use "NET USE LPT1: \\<computername>\<printername>" you map the
printerqueue to the local LPT1 port
so if you would print to LPT1 on that computer the printout would end up on
that network printer.

instead you can use

RUNDLL32 PRINTUI.DLL,PrintUIEntry /in /n \\<computername>\<printername>

in your .bat file. This way the printer will be installed on you computer
and be displayed in Printers and Faxes.
For more help about PRINTUI.DLL just type "RUNDLL32
PRINTUI.DLL,PrintUIEntry /? " in a cmd box.

Hope this helps,
Bart
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top