[Legacy] Automating printer management in a school, university or education environment
PaperCut NG/MF now offer simple to use solutions that assist with the deployment and management of print queues. The first such feature was released in PaperCut NG/MF v19.1 as Print Deploy. This removes the stress and time commonly associated with managing print queues and makes their deployment a breeze!
PaperCut NG/MF also has a fantastic option for BYOD devices called Mobility Print. It can often be difficult and frustrating to manage users on BYOD devices but Mobility Print is simple to set up, works across multiple platforms and provides a native mobile printing solution.
The information below has been kept for customers that are still managing user’s printers via scripts in tandem with PaperCut NG/MF, but may no longer be up to date.
In a business environment a user usually has a desktop PC dedicated to their use. Their printers can be configured either manually under their profile, or automatically via a login script. Such a ‘privilege’ is not common in an education environment, and hence different management methods are required to effectively map printers.
In an education environment users roam between computer labs and locations. The printers listed under Start→Settings→Devices→Printers & scanners should change depending on which computer they are using. For example, it is not appropriate to list the science lab printer when the user is logged in across campus in the library. In other words, the list of printers is a function of location rather than user identity. Network administrators working in education need to jump through a few more hoops to configure the ideal network setup.
There are a number of ways to address the “roaming user - changing printers” problem. Options include:
Please see below to read more about these options.
Writing an adaptive login script is a good solution for small to medium sized networks or networks where computers are named using a convention related to location. This solution has been adopted by PaperCut NG/MF users with small networks. Frank from Rowland Medical Library has contributed an example that uses con2prt and Pierre from CPSA COMBOURG has contributed an example that uses WScript.
Another alternative is to use a VBScript based logon script that leverages a consistent workstation naming system. An example follows:
' ' A Login script to set up printers based on location. ' Dim oNet Set oNet = CreateObject("WScript.Network") Dim strComputerName strComputerName = oNet.ComputerName ' ' If computer is in the science lab (ie. a computer name starting with ' SCI_LAB then add the science lap laser printer. ' If InStr(strComputerName, "SCI_LAB") > 1 Then oNet.AddWindowsPrinterConnection "\\MainServer\SCI_LAB_Laser" End If ' ' If in library then add library printers ' If InStr(strComputerName, "LIBRARY") > 1 Then oNet.AddWindowsPrinterConnection "\\MainServer\LibraryHP" oNet.AddWindowsPrinterConnection "\\MainServer\LibraryColor" End If
Administrator should use group policies to define the login script. More information is available at:
Option two involves running a machine specific script when a user logs in. For example, all workstation in the science lab will run a script that installs the relevant printers. Workstations in the library would run another script to add the library’s printers. The simplest way to instigate these scripts is via the All Users Startup folder as follows:
C:\Documents and Settings\All Users\Start Menu\Programs\Startup
Dim oNet Set oNet = CreateObject("WScript.Network") oNet.AddWindowsPrinterConnection "\\MainServer\LibaryColor" oNet.AddWindowsPrinterConnection "\\MainServer\LibaryHP"
As an alternative to VBScript, the same task can be undertaken in a batch file using the PrintUIEntry function of printui.dll. This is detailed at:
rundll32 printui.dll,PrintUIEntry /n\\MainServer\HPLaserJ
rundll32 printui.dll,PrintUIEntry /in /n\\MainServer\HPLaserJ
To remove a printer:
rundll32 printui.dll,PrintUIEntry /dn /n\\MainServer\HPLaserJ
Windows 2000 and above all have the capability to install a printer and have it globally available to all users (Similar to the way printers worked in the old Windows 95/98 days). Unfortunately the Add Printer wizard does not expose this functionality and only adds the printer for the current user. The command-line needs to be used to install and expose a printer globally. The process is as follows:
rundll32 printui.dll,PrintUIEntry /ga /n\\server\printerwhere server and printer make up the correct UNC path to the printer.
net stop spooler net start spooler
rundll32 printui.dll,PrintUIEntry /gd /n\\server\printer. Note the
/ga. After issuing this command, the printer will be removed at the next logon.
Please also check out our print quota and print management software applications. These applications are also of great benefit in an education environment.
Keywords: adding printers, login script, netlogon, printer setup, user profiles, network management, k12 network, academic networks, school printers, mapping printers, logon script