TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
bob.bonenfant
NA
1
0
Killing print jobs
May 7 2004 10:42 AM
Hello, I'm new to this forum and I have an interesting question that has been bothering me lately. We have an application that creates a custom browser for users. Our machines are connected to printers for the public to use to print out whatever documents they chose, but some can have personal information. The problem is that from time to time the printers run out of paper and users have been known to load the print queue since it takes a bit of time to bring back the out of paper error message. Sometimes users leave the workstation before clearing the jobs or other times not even bothering to. So we would like to kill the print jobs in the queue when necessary. I have been using WMI to access the printers collection and then trying to invoke the CancellAllJobs method but I keep getting an error saying that method doesn't exist. So alternatively I tried using Win32_PrintJob to go through the print jobs individually and delete them one by one. Somewhere on the net I read that deleting the object (printJob.delete) should kill the job, but when I try that I get an error stating "Provider in not capable of the attempted operation". I can see each job in the queue and the printername as well so I know the printJob object is working. I have even set the impersonation level to Impersonate but I'm new to WMI so I may be making errors. Any suggestions? Bob Bonenfant
Reply
Answers (
0
)
The Monitor class
Thread problem