Tech-Break‎ > ‎

Ever had print jobs stuck

posted Dec 13, 2010 1:47 AM by Erez Kalman
Ever had print jobs stuck in Windows and deleting them/restarting the print spooler didn't help?!
Well, I have a friend that has Windows XP and has both Windows and DOS based program's and a problematic
printer that cause's a specific job from clogging the print queue which also cause's the spooler to stick preventing
further printing.

After removing all driver's and printer's and reinstalling I finally created a batch script, see below, that he can run which
will clear the queue and return him to work in under 30 seconds.

Here is the batch (bat) script I wrote (works great!!):

@echo off
echo Stopping print service
net stop spooler 1>nul 2>nul
ping -n 5 127.0.0.1 1>nul 2>nul
cd c:\windows\system32\spool\printers
echo Deleting print jobs
del /q *.spl 1>nul 2>nul
del /q *.shd 1>nul 2>nul
cd\
echo Starting print service
net start spooler 1>nul 2>nul
ping -n 5 127.0.0.1 1>nul 2>nul
echo All Print Jobs Deleted!
ping -n 6 127.0.0.1 1>nul 2>nul

Based on: