Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printer Queue Deletion

Status
Not open for further replies.

beavisqkj

IS-IT--Management
Apr 1, 2002
2
US
I am looking for a way to delete all contents of the printer queue when a user either logs in or out. The printer all users print to sometimes causes errors and the queue backs up. I need to do this without any interaction from the user. I have had success using this in logoff script as an admin:

net stop spooler
del /Q c:\windows\system32\spool\printersnet start spooler

but regular users don't have access. Any ideas on how to accomplish this.
 
Give them full access on the own jobs. If the solution is out there, let us know it was helpful, so others can benefit from it as well..
 
you could use psexec from pstools (freeware from Its designed to run remotely, but you can specify the current machine to run on, and it takes user and password parameters, so you can get it to run your batch file with administrator access (need to hide batch file with psexec command from user as in plain text).
 
I would find out what is wrong with your printer. Do you have bi-directional support turned enabled? If so turn it off. Is this printer connected to a external jetdirect? Are the users printing files of type the printer can't handle if so they should be instructed not to. If someone is printing a file they must want it printed and the only the document clogging the queue should be deleted. Service Pack 3 fixes many problems one being the deleting of files that have been already printed.
 
Sorry, I should have been a little more descriptive about the printer error. Documents fail to print becuase the printer is in another domain and users do not have their passwords synced. When the printer is mapped in the logon script several users never enter the other domain password and then try to print. These jobs will hang up other people who come after them. So basically there is nothing wrong with the printer. This is in a lab of about 15 computers and I wanted something that could be done automatically until we can get our own printer setup.
 
That is kinda looking for trouble isn't it?
If they don't enter the password, and are not required to, the don't add the printer in the loginscript.
Or, sync the passwords, or use a printuser password, same for all.
A bit more complex could be to check if logged in before the mapping, if not, skip the line. If the solution is out there, let us know it was helpful, so others can benefit from it as well..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top