Solved

Install a local printer with VBS

Posted on 2004-03-30
3
1,802 Views
Last Modified: 2009-07-29
OK this may sound strange but here goes...
We have an on going problem that our network printers need to be installed per user. Even when shared and installed as administrator on our Win2k workstation some of these printers still insist on being installed for every new user. DOH

But I have found a work around...

When I go to install the printer instead of choosing Network printer, I choose local printer, and then choose create new local port, which i point to the network printer. This then installs the network printer as a local printer, which shows up on all users. Dont know why it works but it does.

What I would like is a script that could do this, install a local printer pointing the local port to the network printer.

Ive a script that installs the network printers easily enough...

Set WshNetwork = CreateObject("WScript.Network")
'Install the admin photocopier
WshNetwork.AddwindowsPrinterConnection "\\Berea\A30-T6570-PCLXL"  

But havent a clue about doing this with local printers...

Any help much appreciated, thanks
Ian G
0
Comment
Question by:uuccu
3 Comments
 
LVL 10

Accepted Solution

by:
Kavar earned 125 total points
ID: 10714523
this is a great trick :)



 Add printer driver using inf:
rundll32 printui.dll,PrintUIEntry /if  /f "printer inf file here" /n "Printer Name here"

rundll32.exe printui.dll,PrintUIEntry  /? will tell you all the options
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now