DON'T REINVENT THE COW

This is a place for Systems Administrators and IT Professionals to find and share ideas, solutions and templates. If you have something that helps you solve a problem, chances are it will help someone else too. So pay it forward and send an email to TheAgreeableCow at gmail. Full mudos to you!

Saturday, 26 May 2012

Network Printers App

Over the years I went through various iterations of methods for deploying network printers to user's computers. The day in day out stuff was pretty straight forward, but occasionally you have to setup a new user, they would move locations or perhaps I'd install a new print server and cut a whole office over. I had a bunch of scripts and used delivery techniques from manual installs, links in emails, group policy deployment and even startup scripts that made intelligent updates based on the current setup (have to admit I did like that one ;)

Each time though, it was a new mini project. I want to build something that would be more centrally managed and dynamically update based on the setup of the print servers. So I built a network printer application as a centrally stored HTA (VBS and HTML), and put a shortcut on every ones desktop. 

It was sold to the users with the following benefits and was very well received:

  • Find a Printer (based on feature or location)
  • Lookup your Printer Status (print queues, paper jams, low toner etc)
  • Install a new printer (in 2 clicks!)
  • Speed up your PC (remove old printers, or printers from another office)
This is what the app looks like:


1. The Print Server area automatically selects the print server in the user's office. It also has several Feature checkboxes, and a Keyword search. So you can do a lookup for say a Colour printer in the Melbourne "Marketing" department

2. Depending on the print server selected above, a list of Available Printers appears (yes, we use movie star names - makes them easy to remember). Selectable check boxes only show next to any printers that match the filters used. Each name is also a hyperlink to that printer's web page to lookup status etc

3. This section shows the current Default Printer and allow it to be changed

4. The first Option here determines whether the printer is just added or if the drivers are reinstalled on the user's PC. The second option is a Clean Up trigger, which removes any other (network printers), that are not selected above.

5. The Information area kicks everything along, open the user's 'Devices and Printers' or resets the form. It also shows relevant information on the current install status, whether there are any printers attached to a legacy print server (handy for migrations), whether there are any printers attached to a print server in another site (slow!) and finally whether any of the currently installed printers have any status issues.

The script itself is a HTA, which is a self contained application built using a combination of VBS and HTML for the layout. Calls to the print servers are via a simple net view \\printserver command line request, which is then parsed for relevant information. Of note here is the Comments section on each printer on the print server, as this is where the Feature and Keyword lookups refer to. Information on the local printers is sourced through WMI queries and actioned via VBS statements.

The example I have is for four sites and there is a fair bit of code around lookups of specific site information, loading the form and getting the checkboxes set correctly. As always tweak as needed in your environment.

Cheers,

         (__)
         (oo)  ok
   /------\/  /
  / |    ||
 *  /\---/\
    ^^   ^^

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete