Choose your language

Choose your login

Contact us

  • Home
  • Support
  • Knowledge Base
  • [Legacy] Automating printer management in a school, university or education environment

[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!

Check out the Print Deploy Tour Page and Help Center for more information.

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.

Check out the Mobility Print Tour page and Help Center for more information.

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:

Option 1) An adaptive login script that installs different printers dependent on the computer name.

Option 2) A machine specific script configured to run when a user logs in.

Option 3) Install the printers in a global context so all users that log onto the machine have the convenient printers listed.

Please see below to read more about these options.

Option 1

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 Microsoft’s MSDN Website.

Option 2

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:

1. Log into the workstation as administrator

2. Navigate to C:\Documents and Settings\All Users\Start Menu\Programs\Startup

3. Create a script that sets up the called setup-printers.vbs that sets up the required printers. Example:


        Dim oNet
        Set oNet = CreateObject("WScript.Network")
        oNet.AddWindowsPrinterConnection "\\MainServer\LibaryColor"
        oNet.AddWindowsPrinterConnection "\\MainServer\LibaryHP"

4. Log off as Administrator and log in as a normal user. Verify that printers are available.

Alternate Option:

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 

Option 3

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:

1. Log on to the workstation as an Administrator

2. Start→Run and enter “cmd” then press OK

3. Type rundll32 printui.dll,PrintUIEntry /ga /n\\server\printer where server and printer make up the correct UNC path to the printer.

4. Restart the spooler service with the commands:

        net stop spooler
        net start spooler

5. The printer should now be listed and available to all users that log onto the workstation.

6. Note that printers added like this will have to be removed with the corresponding command rundll32 printui.dll,PrintUIEntry /gd /n\\server\printer. Note the /gd instead of /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.

Categories: How-to Articles , Legacy Articles

Keywords: adding printers , login script , netlogon , printer setup , user profiles , network management , k12 network , academic networks , school printers , mapping printers , logon script


Last updated February 19, 2024