Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
Physical printers and logical printers are not irrevocably tied to one another. If you turn off the physical printer, this will not affect the logical printer in any way. Instead, the logical printer will still appear to be functioning, even though the physical printer is no longer available.
Among other things, this means that anytime a physical printer is removed from the network (for example, to undergo routine maintenance), the logical printer representing that device should be paused. If the physical printer is removed from the network and the logical printer is not paused, the print server will periodically attempt to print the first job in the print queue, even though the printer is no longer available. As a result, the print server uses up processing power in an attempt to complete a task that cannot be completed. When the logical printer is paused, print jobs simply remain in the queue, and no attempt is made to print them until the logical printer is resumed.
Logical printers can be paused by using the Pause method of the IADsPrintQueueOperations interface.
Listing 13.11 contains a script that pauses a printer. To carry out this task, the script must perform the following steps:
Listing 13.11 Pausing a Single Printer
|
|
Send us your feedback | « Previous | Next » |