How can i use prnmngr.vbs to install a usb printer.

Posted on 2007-10-14
Medium Priority
Last Modified: 2008-01-09
I need to installed some usb printers.  The pc's dont have the drivers installed. I need this process to be unattended.  I read some information about prnmngr.vbs. but i am confused. Do i need to add port first?
Question by:Jose Saafigueroa
  • 2
  • 2
LVL 39

Accepted Solution

hdhondt earned 1500 total points
ID: 20076007
USB printer ports are always problematical. That's why I prefer networked printers; they're far cheaper to run, too.

I'm not sure it is possible to add a USB printer in the way you describe. However, you may be able to use a local port called "USB_Printer" as per


Author Comment

by:Jose Saafigueroa
ID: 20077186
Networked printers are the way to go, however, this is not on option right now. I have tried to use the printui.dll but even though it installed the printer and i am able to print from it, the plug and play still wants to install the printer every time i reboot the machine. At this point i am looking for any type of script that can automate an unattended usb printer install.
LVL 39

Expert Comment

ID: 20084330
I hope someone can help you, but I doubt if such a generalised script exists.

Author Comment

by:Jose Saafigueroa
ID: 20143263
This is the solution that i researched and works best for me.

Microsoft has a dos utility called devcon. You search for and dowload it, or you can find it in a windows 2003 cd under the I386 folder. This utility provides all of the basic funtions of devide manage. One of the funtions  allows you to update drivers for any old or new device.
The following is the command that i used.

devcon.exe update file.inf hardwareid

you can find the hardwareid of the the device under the properties of the device in the device manager.
This will install the new device, in my case my printer.

The problem is that the printer will have the default name. ex  Hp LaserJet 2015 pcl6
So i found a script to change the name of this printer and also make it defaut.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
This article will show, step by step, how to integrate R code into a R Sweave document
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…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Suggested Courses
Course of the Month14 days, 13 hours left to enroll

840 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