Ever tried to print something from your Windows machine, only to have something go wrong with the printing and yet be stuck with print jobs that just won't be deleted? Every so often this happens to me. I'll print a document. Something perhaps is wrong with the printer, like it is jammed or out of paper. I'm short on time so I cancel the print job from the printer properties on my system. Only the job won't cancel. It just sits there in an error state, undeleteable.
I devised the following script to fix this problem. The script stops the the print spooler, deletes print jobs in the queue, then restarts the spooler. I have tested this on my Dell laptop and it works just fine. Use at your own risk on yours, of course, because, you know, lawyers.
I devised the following script to fix this problem. The script stops the the print spooler, deletes print jobs in the queue, then restarts the spooler. I have tested this on my Dell laptop and it works just fine. Use at your own risk on yours, of course, because, you know, lawyers.
printfix.bat
@rem === Restarts print spooler service
@rem === Use this when the printer is printing
@rem === lots of garbage or blank pages endlessly
@rem === Tom Way, 10/14/10, [email protected]
@rem ### Updated to forceably delete print jobs
@echo off
@echo Stopping print spooler service
net stop spooler
sc query spooler
@echo Deleting print jobs
del /F /Q C:\Windows\System32\spool\PRINTERS\*.*
@echo Starting print spooler service
net start spooler
sc query spooler
pause
echo on
@rem === Use this when the printer is printing
@rem === lots of garbage or blank pages endlessly
@rem === Tom Way, 10/14/10, [email protected]
@rem ### Updated to forceably delete print jobs
@echo off
@echo Stopping print spooler service
net stop spooler
sc query spooler
@echo Deleting print jobs
del /F /Q C:\Windows\System32\spool\PRINTERS\*.*
@echo Starting print spooler service
net start spooler
sc query spooler
pause
echo on
printfix.bat |