Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
Purging a print queue provides a fast and easy way to remove all the print jobs from a specified print queue.
For example, if you need to remove a printer from the network, you can purge the print queue and thus delete all the existing print jobs. If you do not, users will assume their documents are still in line to be printed because they will still see them in the print queue. This is because the existence of a logical printer is not dependent on the availability of a physical printer: Removing the physical printer will not also remove the logical printer. Because the logical printer still exists, the print queue, and any documents in it, continue to exist as well.
The IADsPrintQueueOperations interface includes a method, Purge, that can be used to purge print jobs on a printer or group of printers.
Listing 13.13 contains a script that purges a print queue. To carry out this task, the script must perform the following steps:
Listing 13.13 Purging a Print Queue
|
|
Send us your feedback | « Previous | Next » |