Windows Thread, Automatically clear printer queue on log off? in Technical; I'm sure I remember seeing something about this in another thread, but I cannot find it anywhere, so decided to ...
I'm sure I remember seeing something about this in another thread, but I cannot find it anywhere, so decided to make my own.
I'll start by giving out current scenario:
We have two laser printers, one colour and one B&W.
Colour is obviously very expensive and the kids have an uncanny habit of printing out 10 pages of the same full A4 colour picture which didn't need to be printed in the first place.
We were asked to stop kids being able to print to colour laser, meaning only staff could. Simple enough job - remove students permissions on the printer.
This leaves one issue though... when the students print something to the colour printer, it fails, but the local machine keeps the document stored to that printer with the status 'failed'. After that, all documents printed to the colour printer from that machine fail - even after the student has logged off and a staff member has logged on. The print queue doesn't ever clear after reboot.
Obviously clearing the print queue manually on that machine will solve the issue, but past experience has told me that getting people to do that successfully is not going to happen. Someone mentioned previously on here about a staff member who admitted she "switched off" when she heard him start to talk about computers, leading to problems later that day.
My N/M doesn't like any third party software installed on the server unless absolutely necessary. I guess this is for money saving purposes as well as fear of installing potentially dodgy software on the server. He has recently re-added the students user group to the printer because of the above problem, but today after several unless pages came out of the colour printer I was asked to remove it again.
In this case, is there any way to get windows client machines to clear the print queue automatically when domain user logs off?
If not, I will design an annotated PDF document to send around to all staff by e-mail explaining how to do it, but ideally I would obviously rather I could do something myself to prevent them having to.
Re: Automatically clear local printer queue on log off?
Originally Posted by plexer
Are these network printers or locally connected printets?
If network why not just not allocate them to students?
Ben
Yes, they are network printers. I should have made that more clear, sorry. When I said 'local printer queue", I meant the queue being local, not the printer.
Do you mean so the students cannot see the printer at all? How do you do this? I assumed that a printer was installed on a per machine basis as opposed to a per user basis.
The only thing I can think of is to remove student permissions on the printer, but this is what is causing the problems stated in my first post.
Re: Automatically clear local printer queue on log off?
We use a vbs script very similar to one that is available from here that allocates printers on user login based on the machine name.
It also removes all pre existing printer except local ones so if they have been added locally then you would need to remove them first and then have them reconnected by the vbs script.
Without knowing the mechanism that has been used to allocate your printers it is difficult to answer.
I THINK both printers were added manually at each machine . I believe the ones in the ICT Suite were imaged with the printers added and I went around each classroom machine adding them when I first started here (from what I remember). This is not a good answer is it? haha.
Set WSHNetwork = CreateObject("WScript.Network")
'Remove ALL old printers
'Enumerate all printers first, after that you can select the printers you want by performing some string checks
Set WSHPrinters = WSHNetwork.EnumPrinterConnections
For LOOP_COUNTER = 0 To WSHPrinters.Count - 1 Step 2
'To remove only networked printers use this If Statement
' If Left(WSHPrinters.Item(LOOP_COUNTER +1),2) = "\\" Then
' WSHNetwork.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True
' End If
'To remove all printers incuding LOCAL printers use this statement and comment out the If Statement above
WSHNetwork.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True
Next
'end delete existing printers
Copy and paste in to notepad and save as a vbs run it on a workstation and see if it removes the existing printers.
Set WSHNetwork = CreateObject("WScript.Network")
'Remove ALL old printers
'Enumerate all printers first, after that you can select the printers you want by performing some string checks
Set WSHPrinters = WSHNetwork.EnumPrinterConnections
For LOOP_COUNTER = 0 To WSHPrinters.Count - 1 Step 2
'To remove only networked printers use this If Statement
' If Left(WSHPrinters.Item(LOOP_COUNTER +1),2) = "\\" Then
' WSHNetwork.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True
' End If
'To remove all printers incuding LOCAL printers use this statement and comment out the If Statement above
WSHNetwork.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True
Next
'end delete existing printers
Copy and paste in to notepad and save as a vbs run it on a workstation and see if it removes the existing printers.