This is a handy little application every IT help desk needs. The number one reason an employee will call our department is to request a printer be installed. Maybe they deleted it, maybe they got a new printer, or maybe they traveled to another branch. Whatever the reason, it's time consuming and painfully monotonous.
That's why I developed this great HTA (HTML Applicaton) powered by a VBScript that makes use of WMI to install a printer. Basically, an HTA is a container for website, but it's a website that is unaffected by browser security features (like script blocking). Unfortunately this doesnot work "out of the box". You don't need this exact setup, but this is what you won't seewhen you look at my script:
I have two databases this HTA connects to. We have a large number of remote branches and we support them all, so one database is all branch names and numbers. The other is a database of printer types and IP addresses all tied to a corresponding branch ID.
I have the printer drivers stored on a network share for easy manual access and updating as needed.
Various graphics are used to make things pretty.
I have had to strip out the HTML so you can actually see the script, but that's OK, the script is the meat of this post.
Each printer type will require some testing. If an .INF file is supplied as the driver, you have it easy. However, if you look at the second printer in this script, you will see some special code is required for others. In this example, HP only supplies .EXE files, but there are some special commands you can use to run it silently.
To transform this into a functioning HTA with a GUI you simply need to add HTML tags and an HTA tag block to it. Then save it as Whatever.HTA. Just be sure to alter the script as necessary if you name your listboxes and button differently or decide you don't need multiple printer types or a location listbox.
If you need any clarification, feel free to comment. I'm happy to help!