Home NT NT Syntax

Printing

Advice about Print Drivers, Network Print Shares & Printer Connections.

Printer Share Naming
Windows does support very long printer names with spaces and extended ascii, however for maximum reliability and portability keep things simple - short names with no spaces.

A simple naming convention with 2 random characters and a number (AA1, AB1, AC1...) will support 6760 print queues.

It may be tempting to use meaningful names such as HPLJ14 or FirstFloor21 but such names will mean that moving or replacing the printer will also require renaming the printer and then reconnecting every user.
Details that are likely to change, such as the printer model or inventory number should be placed in the printer DESCRIPTION field.

In a network environment with more than a few printers, put a physical label on the printer with it's share name, this will save on paper, user frustration and helpdesk calls.
Keep the printer's SHARE Name and PRINTER Name identical.

Network Printer Drivers
Every Print Server has a hidden file share (called Print$) that is used to deliver Print Drivers to Windows clients.

When a PC connects to a remote Print Share the drivers on the server and client are compared, if the client is missing the driver; or has an older version; then it will be automatically downloaded and installed.

In network environments with more than one print server, version control starts to becomes important. Consider a PC client with a connection to two similar printers on two different print servers. One server has a driver version 26.232 the other has version 26.234, in theory the client will download the latest driver and use it for both printers, in practice the results are likely to be less predictable - the worst case being a driver download every time the user prints.

Whenever a new driver is installed on a print server, you should force all users (with a connection to that print queue) to download the update.
This is done by changing the Print Share name on the server [Press Apply] Then change back to the original Share Name [Press Apply again].
E.g.
Change the printer LA5 to LA5x [Apply] then change back to LA5.

Local Printers
Any PC with one or more locally installed printers will also acquire a Print$ share - acting as a source of driver DLL's for other machines. This presents a possible security risk that needs to be understood and managed. If the printer is never accessed by other machines don't share the printer.

Printer connections are normally per user, and roam with roaming profiles. It is also possible to create printer connections per machine with rundll32 - these will not follow a roaming profile.

Windows XP Professional will support a maximum of 10 users per Share (This applies to
both file and print shares) for more than this you will need a server licence.

Connecting to a Network Printer Share
There are several scripting commands that can be used to connect to a Network Printer (rundll32, WMIC and WSH.)
Automating printer connections in a login script is generally only worth considering in strictly controlled environments such as teaching. Login scripts are useful for automatically deleting redundant print queue connections.

Default Printer
The default Printer connection is per user, and will travel with roaming profiles.
The default Printer can be changed with Defptr, WMIC or WSH.
If the default is set to a Local printer - roaming to a different PC (without an identical local printer) will change the default to the next available printer.

Print to File
In the Printers folder, click Add Printer.
Click My Computer, and then Next.
Click "Local printer attached to this computer"
(don't tick automatically detect) >Next
Click Create a new Port. >Next
When prompted for a local port name, type a path and file name for the file.
Choose the Generic/Text print driver.

LPR - Line Printers
The "Microsoft TCP/IP Printing service (UNIX)" provides a TCP/IP-based printing service using the Line Printer protocol. (Microsoft TCP/IP Printing service is not installed by default)

LPR is a useful method of printing to a character/line printer, typically used with monospaced fonts for printing Cheques and invoices. LPR can also be used to send print jobs to a UNIX print server.

To create an LPR printer,Select Control Panel - Add Printer,
Choose My Computer - Add Port and then LPR port.
At the prompt type the host name or IP address of the printer (or remote Unix host).

The service name is LPDSVC

Printer Options

Priority: The priority sliding bar sets the default priority for documents printed.
A common approach is to create one printer for the majority of users with a default priority of 1
then create a separate 'high priority' printer that sends output to the same printing device but with a higher priority setting.

Spool print documents so program finishes printing faster
(& Start printing immediately) - preferred option for most applications.

Print directly to the printer - this sends documents directly to the printer. This gives the fastest time-to-output but you lose the ability to use the PC while the print job is in progress.

Print spooled documents first - if you disable this option, high priority jobs will interrupt lower priority jobs that are already printing. (so the pages get mixed up)

Print Processor
The default Print Processor is WINPRINT.DLL, (this can be replaced for advanced DTP work)
This Print Processor supports several data formats:

Raw: [default] This datatype indicates that the job is in a ready-to-print format in the printing device’s native language. (Good for PostScript printing).

Raw [FF Appended]: As RAW but appends a form-feed character to the end of the print job.

Text: This indicates a print job that consists of ANSI text.

PSCRIPT (PostScript support for Macintosh clients using non-PostScript printer)

EMF: A Windows application will partially rendered the job and the print driver then completes the rendering process. EMF takes advantage of print server CPU resources, EMF files sizes are smaller than RAW which reduces network congestion.
(Good for most PCL-based laser printers)

Printer Pools
A printer pool allows multiple physical printing devices to appear as a single 'virtual' printer. When print jobs are sent to a printer pool,Windows routes the job to the first available device.

In a busy printing environment pooling will allow more efficent and faster printing but does not provide any failure resilience e.g. Windows cannot redirect a job from a failed port, so when a printer is offline the printer pool will continue to send jobs to that port.

To enable Printer pooling, go to Printer properties - Ports, check the 'Enable printer pooling' tickbox
Note: it's quite possible to have individual print queues in addition to the printer pool queue.

Printing requires the Spooler service to be running

Related Commands:

NET PRINT - View and Delete print jobs
Print Migrator - Microsoft tool for moving print queues.
Q247196 - Resolve Printer Driver incompatibility issues (Fixprnsv.exe)
Defptr - Default Printer. (Win 2K ResKit)
PRNCNFG - Display, configure or rename a printer
WMIC PRINTER - Set printing options through WMI.
Print Notification - this is set under Control Panel, Printers, File, Server Properties, Advanced
Q246868 - New TCP/IP Printing Options in the Windows Standard Port Monitor
Q234270 - Group Policies to Control Printers
Q246772 - Retrieve and Set the Default Printer
prncnfg.vbs, prndrvr.vbs, prnjobs.vbs, prnmngr.vbs, prnport.vbs, prnqctl.vbs, pubprn.vbs

Equivalent Linux BASH commands:

printf - Format and print data



Simon Sheppard
SS64.com