Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
From time to time you might need to modify the properties of a print job after it is in the print queue. For example, you might want to reschedule a print job to print at a specified time. This enables you to print a large print job after hours, when it will not prevent other documents from being printed. Furthermore, you can do this while the print job is in the print queue, without requiring the user to cancel and then resubmit the print job.
To configure print jobs, you can use ADSI and the IADsPrintJob interface (available through the WinNT provider). Some of the print job properties available through this interface are shown in Table 13.8. Properties that cannot be configured using a script are denoted as read-only.
Table 13.8 IADsPrintJob Properties
Property | Description |
---|---|
Description | Name of the document (for example, Readme.doc). |
Priority | Priority placed on the print jobs. Jobs with a higher priority are always printed first, regardless of the time they were sent to the print queue. |
StartTime | Earliest time that the document can begin printing. Regardless of the document s position in the print queue, it will not begin printing until the StartTime. |
UntilTime | Sets the time after which the document will not be printed. For example, suppose you set the UntilTime to 9:00 A.M. If the document has not been printed by 9:00 A.M., it will be suspended and will not be resumed (and thus will not move up in the queue) until the StartTime has been reached again. |
Notify | User name of the user to be notified when the print job is finished. |
NotifyPath | ADsPath value for the user to be notified when the job is finished. |
HostPrintQueue (read only) | AdsPath name for the print queue processing the print job. Because you must use the WinNT provider (the IADSPrintJob interface is not supported by the LDAP provider), path names will look similar to this: where FABRIKAM represents the domain name, PRINTSERVER1 the print server name, and financeprinter the printer name. |
User (read-only) | User name of the user who submitted the print job. |
Userpath (read-only) | ADsPath name for the user who submitted the print job. |
TimeSubmitted (read-only) | Date and time the print job was submitted. The date and time will look similar to this:
|
TotalPages (read-only) | Total number of pages in the print job. |
Size (read-only) | Size of the print job in bytes. To determine the size of the print job in kilobytes, divide this number by 1,024. |
Send us your feedback | « Previous | Next » |