Tuesday, September 11, 2012

Clear Print Spooler on Windows

I was continuously receiving calls that some customer-facing printers were not printing receipts.  At first, the quick/easy solution was to reboot the server (desktop), but doing so would then clear the "jammed" print job and start dumping out hundreds of queued up print jobs.

I hate printing in general, but I wasn't running the business so I had to come up with a solution that wouldn't waste baby trees.  I stumbled across this post on Microsoft, How to cancel printing or to delete a print job that is stuck in the print queue in Windows XP.  It provided some commands to clear the print queue files.  I already knew that stopping/starting the service resolved the issue, but I wanted to get rid of the hundreds of queued up jobs.

Here is the code that Microsoft provided.  Per the title of the article, this was geared toward Windows XP.  The machine that we were working with was Windows 7.  Creating a batch file and running when the print queue jams got us in business!  Never found out why the proprietary software/printer combination was jamming up at least once a week (even with reboots every other night).

 net stop spooler  
 del %systemroot%\system32\spool\printers\*.shd  
 del %systemroot%\system32\spool\printers\*.spl  
 net start spooler  

No comments:

Post a Comment