Configuring Printer Properties

 < Day Day Up > 



You can view and configure printer properties using the Prncnfg Windows script with the –T parameter. Regardless of which property you are working with, Prncnfg expects you to use the –P parameter to specify the name of the printer you want to work with. As with most printer configuration commands, you don’t have to be logged on to the computer locally to configure printer properties. If you want to change printer properties for remote computers (other than the printer name), you can use the –S parameter to specify the name of the remote computer. As necessary, use the –U and –W parameters to specify the user name and password to use when connecting to the remote computer. The user name can be specified as domain\username if the logon domain is different from the current domain.

Adding Comments and Location Information

You can make it easier for users to determine which printer to use when by adding comments and location information to printers. Comments provide general information about the printer, such as the type of print device and who is responsible for it. Location describes the actual physical location of the print device. Once these values are provided, they are displayed on the General tab in the printer’s Properties dialog box.

The syntax for adding comments and location information to printers is

prncnfg -t -p PrinterName -m "Comment" -l "Location"

Here, you use Prncnfg with the –T parameter to indicate that you want to change printer properties. Then specify the comment text with the –M parameter and set the printer location information with the –L parameter, such as

prncnfg -t -s corpsrv03 -p "CentralColorLaser" -m "Main Engineering 
Printer" -l "5th Floor SE"

Prncnfg should report that it configured the printer. If it doesn’t, you probably forgot a double quotation mark or one of the parameter switches. You don’t, of course, have to set both a comment and a location. You can set these values separately as well.

Sharing Printers

Printers you add at the command line aren’t automatically shared for others to use. If you want to share such a printer, you must specifically configure this using Prncnfg. Use the –T parameter to specify that you are setting or changing a printer property and the –P parameter to specify the printer to work with. Then use the –H parameter to set the share name and the +Shared parameter to enable sharing. For compatibility with pre–Windows 2000 computers, the share name should be only eight characters in length and should not contain spaces.

In large organizations, you might want the printer share name to indicate where the printer is located to save users from having to examine the printer properties. For example, if a printer were located in the southeast corner of the fifth floor, you might want to name the printer share FifthSE. Consider the following example:

prncnfg -t -s corpsrv03 -p "CentralColorLaser" -h "FifthSE" +shared

Here you are configuring the CentralColorLaser printer on CorpSrv03 to be shared as FifthSE.

To remove printer sharing, you use the –Shared parameter. Here you are removing printer sharing from the printer configured in the previous example:

prncnfg -t -s corpsrv03 -p "CentralColorLaser" -shared

Publishing Printers in Active Directory

You can make it easier for users to find printers that are available by publishing their information in Active Directory. Once a printer is published, users can search for it based on its location and capabilities, such as whether it is on the fifth floor or whether it can print in color.

You configure printer publishing using Prncnfg. If you want to publish a printer in Active Directory, you use the –T parameter to specify that you are setting or changing a printer property and –P to specify the printer to work with. Then use the +Published parameter to specify that the printer should be published or the –Published parameter to specify that the printer should be removed from the directory.

Consider the following examples:

Publish the CentralColorLaser printer on CorpSrv03 in Active Directory:

Prncnfg -t -s corpsrv03 -p "CentralColorLaser" +published

Remove the local printer named OfficeJet from Active Directory:

Prncnfg -t-p "OfficeJet" –published 

In either case, Prncnfg should report that it configured the printer. It won’t report an error, however, if the printer was already published or removed.

Setting a Separator Page and Changing Print
Device Mode

Separator pages can be used at the beginning of a print job to make it easier to find a document on a busy print device. They can be used to change the print device mode, such as whether the print device uses PostScript or Printer Control Language (PCL).

Separator pages are stored in the %SystemRoot%\System32 folder. Three default separator pages are defined on Windows systems:

  • pcl.sep Switches the print device to PCL mode and prints a separator page before each document

  • pscript.sep Switches the print device to PostScript mode but doesn’t print a separator page

  • sysprint.sep Switches the print device to PostScript mode and prints a separator page before each document

You can specify that a printer should use one of these separator pages or any other separator page that is in the %SystemRoot%\System32 folder by using Prncnfg. Use the –T parameter to specify that you are setting or changing a printer property and the –P parameter to specify the printer to work with. Then use the –F parameter to specify the separator page to use.

Consider the following example:

Prncnfg -t -s corpsrv03 -p "CentralColorLaser" -f sysprint.sep

Here you configure the CentralColorLaser printer on CorpSrv03 to use sysprint.sep.

To stop using the separator page, use the –F parameter with the value “ ”, such as

Prncnfg -t -s corpsrv03 -p "CentralColorLaser" -f " "

Scheduling and Prioritizing Print Jobs

You can use Prncnfg to manage print job priorities and scheduling from the command line. Print jobs always print in order of priority, with 1 being the lowest priority and 99 being the highest priority. Jobs with higher priority print before jobs with lower priority. Thus if a physical print device has several printers (print queues), any print job with a higher priority will print before a print job with lower priority. Use the –T parameter to specify that you are setting or changing a printer property and the –P parameter to specify the printer to work with. Then use the –O parameter to set the priority, such as

prncnfg -t -p "EngineeringPrinter" -o 50

Here you specify that print jobs using the EngineeringPrinter to route print jobs to the related printer have a priority of 50. If for example a Marketing Printer was also configured to use the same physical print device but had a lower priority, engineering print jobs would always print first.

Printers are either always available or available only during the hours specified. You set printer availability using the –St parameter to specify the time of day after which the printer is available and the –Ut parameter to specify the time of day after which the printer is no longer available. Times are set using a 24-hour clock, such as

prncnfg -t -p "EngineeringPrinter" -st 0530 -ut 1930

Here you specify that the printer is available from 05:30 A.M. to 7:30 P.M. each day.

Configuring Spooling and Other Advanced Printer Options

For print devices attached to the network, you’ll usually want the printer to spool files rather than print files directly. Print spooling makes it possible to use a printer (print queue) to manage print jobs. Spooling can be configured using the following Prncnfg options:

  • +Direct With +Direct, you spool print documents so programs finish printing faster rather than printing directly. This is the default.

  • Direct With –Direct, you configure the printer to print directly rather than spool. Use –Direct if you cannot print using any of the spooling options.

  • +Queued With +Queued, you start printing after last page is spooled. Select this option if you want the entire document to be spooled before printing begins. This option ensures that the entire document makes it into the print queue before printing. If for some reason printing is canceled or not completed, the job won’t be printed.

  • Queued With –Queued, you start printing as soon as the document begins spooling. Select this option if you want printing to begin immediately when the print device isn’t already in use. This option is preferable when you want print jobs to be completed faster or when you want to ensure that the application returns control to users as soon as possible. This is the default.

  • +Enabledevq With +Enabledevq, the spooler checks the printer setup and matches it to the document setup before sending the document to the print device. If there’s a mismatch, the spooler holds the print job but allows correctly matched documents to keep printing. Selecting this option is a good idea if you frequently have to change printer form or tray assignments.

  • Enabledevq With –Enabledevq, the spooler doesn’t check the printer setup before sending documents to the print device. If there’s a mismatch, the printer will usually stop printing and wait for a user to cancel the print job, change printer form or insert a paper tray with the necessary paper type. This is the default.

Other advanced Prncnfg options that you can configure include the following:

  • +Keepprintedjobs With +Keepprintedjobs, jobs aren’t deleted from the queue after they’ve printed. Use this option if you’re printing files that can’t easily be recreated. You can reprint the document without having to recreate it.

  • Keepprintedjobs With –Keepprintedjobs, jobs are deleted from the queue after they’ve printed. This frees the disk space being used by the print job but doesn’t allow you to reprint the document from the print queue. This is the default.

  • +Docompletefirst With +Docompletefirst, jobs that have completed spooling will print before jobs in the process of spooling—regardless of whether the spooling jobs have higher priority. This is the default.

  • Docompletefirst With –Docompletefirst, jobs with higher priority will preempt jobs with lower priority. Thus if a higher priority job comes into the queue, a lower priority job would stop printing and the higher priority job would start printing.

  • +Enablebidi With +Enablebidi, you enable metafile spooling and turn on advanced printing features if they are supported, such as page order, booklet printing and pages per sheet. If you note compatibility problems when using +Enablebidi, you should disable this feature. This is the default.

  • Enablebidi With –Enablebidi, you disable metafile spooling and turn off advanced printing features. Use this option if you experience compatibility problems with the printer.

To see how these options can be used, consider the following examples:

Configure SalesPrinter on sales06 to print directly and keep printed jobs:

prncnfg -t -s sales06 -p "SalesPrinter" +direct +keepprintedjobs

Configure MainPrinter on the local computer to start printing after the last page is spooled:

prncnfg -t -p "MainPrinter" -queued

Configure HPLaserJet on corpsvr09 to hold mismatched documents and disabled metafile spooling:

prncnfg -t -s corpsvr09 -p "HPLaserJet" +enabledevq –enablebidi



 < Day Day Up > 



Microsoft Windows Command-Line Administrator's Pocket Consultant
MicrosoftВ® WindowsВ® Command-Line Administrators Pocket Consultant
ISBN: 0735620385
EAN: 2147483647
Year: 2004
Pages: 114

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net