Solved

Install a local printer with VBS

Posted on 2004-03-30
3
1,804 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A short article about a problem I had getting the GPS LocationListener working.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

860 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