Information Technology Reference
In-Depth Information
Location : Optional parameter that provides descriptive text for the location property of
the printer.
Priority : Optional parameter that specifies the priority of this printer with regard to the
Print Spooler service.
Attributes DoCompleteFirst : Optional parameter that tells the system to spool the entire
document before starting the print process.
Here is an example:
> rundll32 printui.dll,PrintUIEntry /Xs /n "HP LaserJet 1300"
Comment "Human Resources Printer"
> rundll32 printui.dll,PrintUIEntry /Xs /n "HP LaserJet 1300"
Location "Second Floor HR Office"
> rundll32 printui.dll,PrintUIEntry /Xs /n "HP LaserJet 1300" Priority 5
> rundll32 printui.dll,PrintUIEntry /Xs /n "HP LaserJet 1300"
Attributes DoCompleteFirst
Using the Registry
You can configure printer-specific settings by modifying the following values in the Registry:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\
Print\Monitors\Printers\ <PrinterName>\]
"Description"=" <Descriptive comment text> "
"Location"=" <Descriptive location text> "
"Priority"=dword: <PriorityNumber>
"Separator File"=" <Path to separator file> "
"StartTime"=dword: <Start time of printer availability>
"UntilTime"=dword:< End time of printer availability >
The Description field should contain text for the general comment property of the printer.
The Location field should contain text for the location property of the printer. Print queues
with higher priority numbers receive their jobs before print queues with lower priority numbers.
The path to the separator file should point to a text-formatted file containing the content to be
printed on separator pages. The text file should have an .sep file extension, and the path should
be in the format c:\ SomeDirectory \ separatorpage .sep .
Using VBScript
You can configure a network printer by executing the prncnfg.vbs script from your
%systemroot%\system32 directory. This is the same script as used in the previous recipe,
but you call it with different parameters. Use the following syntax:
> cscript prncnfg.vbs -t [-s <RemoteComputer> ] -p <PrinterName>
[-u < UserName > -w < Password >] [-r < PortName >] [-l < Location >]
[-m < Comment >] [-f < SeparatorText >] [-st < StartTime >]
[-ut <EndTime> ] [-o <Priority> ] [{+ | - }direct] [{+ | - }queued]
[{+ | - }keepprintedjobs] [{+ | - }enabledevq]
Here is a description of the parameters:
Search WWH ::




Custom Search