[Legacy] Logon Script: con2prt

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.

This article was contributed by Frank from Rowland Medical Library

See Automatically adding/connecting printers to workstations for more examples using other methods.

We are a medical library, with 10 “reference PC’s” with printers and a lab with 19 PC’s and 3 printers. In our implementation of PaperCut (used for PrintTracking), we wanted users that sat at any one Reference PC, to be able to print to the printer that was beside it. The reality is that all the printers are connected to the network print server and not directly to any PC. In the lab there is a primary printer WHITE and two smaller printers which are pooled named RED. Patrons normally print to the large fast “WHITE” printer but can select the RED printer. Other considerations, each patron has their own account and uses that to access any PC and to print. Other notes:

  • The script I wrote requires a program from MS on their resource kit called con2prt.exe.
  • umc-donder is my DC.
  • umc-Vixen is the print server and Papercut server.
  • Reference printers are desktop printers, the name is the PC# + the Printer model
  • White is an HP 8150
  • Red is (are) HP 5N

Printers are not listed in Active Directory. Patrons can only “see” those printers loaded locally. (though they can “FIND” and add, if they are smart enough!) For lab printers the sequence is important, the last listed printer will be default!

To make this work, I wrote a small batch file which is on SYSVOL and runs at logon for all patrons. Enjoy!

 @echo off
 rem OVIDUSER printer assignment
 rem FMA 07-25-03
 ECHO assigning printer.....

 rem     Make sure local copy of con2prt.exe is there
 if not exist C:\winnt\con2prt.exe copy
 \\umc-donder\netlogon\con2prt.exe C:\winnt

 rem     Decide which reference PC 
 if %COMPUTERNAME% == UMC-REF-9KWXR C:\winnt\con2prt.exe /cd
 if %COMPUTERNAME% == UMC-REF-9KWXR goto end
 if %COMPUTERNAME% == UMC-REF-9KWY0 C:\winnt\con2prt.exe /cd
 if %COMPUTERNAME% == UMC-REF-9KWY0 goto end
 if %COMPUTERNAME% == UMC-9KWXH C:\winnt\con2prt.exe /cd
 if %COMPUTERNAME% == UMC-9KWXH goto end
 if %COMPUTERNAME% == UMC-97808 C:\winnt\con2prt.exe /cd
 if %COMPUTERNAME% == UMC-97808 goto end
 if %COMPUTERNAME% == UMC-97807 C:\winnt\con2prt.exe /cd
 if %COMPUTERNAME% == UMC-97807 goto end
 if %COMPUTERNAME% == UMC-9C7KM C:\winnt\con2prt.exe /cd
 if %COMPUTERNAME% == UMC-9C7KM goto end
 if %COMPUTERNAME% == UMC-9C7HY C:\winnt\con2prt.exe /cd
 if %COMPUTERNAME% == UMC-9C7HY goto end
 if %COMPUTERNAME% == GM59V C:\winnt\con2prt.exe /cd \\umc-vixen\CHEC6L

 if %COMPUTERNAME% == GM59V goto end
 if %COMPUTERNAME% == UMC-CXQFY C:\winnt\con2prt.exe /cd
 if %COMPUTERNAME% == UMC-CXQFY goto end
 if %COMPUTERNAME% == UMC-REF-CXQFW C:\winnt\con2prt.exe /cd

 rem    Must not be a refernce PC
 ECHO Assigning Lab printers
 C:\winnt\con2prt.exe /cd \\umc-vixen\red 
 C:\winnt\con2prt.exe /cd \\umc-vixen\white 

 Echo Printers assigned!
 @echo on

More information on con2pt.exe can be found on the Microsoft website at:

See Automatically adding/connecting printers to workstations for more examples using other methods.

Categories: How-to Articles, Legacy Articles