Stop The Never Ending "Cancel Print Job" (Windows)

by Sel on March 17, 2010

If you have ever canceled a print job within windows you probably had a time or two when it just froze, and it seemed like it was never going to cancel that print job. According to Ask Reddit this is because Windows is unable to to cancel the print job while the file created from printing is still in use. To fix this problem Ask Reddit gave the manual and quick batch file version that you can find below.

 

To manually fix the problem do these steps:

open task manager, stop spoolsv.exe, navigate to c:\windows\system32\spool\printers\, delete everything in this folder, open the run box, run spoolsv.exe again. print.

- From: Ask Reddit

Or if you are not that savvy you can create a new text document and save it as clearprint.bat with the following code below.

@echo off
echo Stopping print spooler.
echo.
net stop spooler
echo deleting stuff... where? I'm not sure. Just deleting stuff.
echo.
FOR %%A IN (%systemroot%\system32\spool\printers\*.*) DO DEL %%A
echo Starting print spooler.
echo.
net start spooler
  • A man

    WTF, that script has spaces in it and it tries to delete everything in c:windows c:. Are you trying to delete everything on my computer?

    • syssu

      Sorry about that, I recently updated the site and it no longer uses a script parser so it was rendered with spaces.  I went ahead and removed the spaces for future use. I ran it on my machine and it worked just fine. Sorry again!

  • A man

    WTF, that script has spaces in it and it tries to delete everything in c:windows c:. Are you trying to delete everything on my computer?

  • A man

    The cleanprint.bat script is a virus. The path to the print spool directory has spaces in it that results in the script trying to delete pretty much everything on your computer (c:windows and which is basically c:). I can’t believe I didn’t look at it before I ran it. 

  • Anonymous

    Sorry about that, I recently updated the site and it no longer uses a script parser so it was rendered with spaces.  I went ahead and removed the spaces for future use. I ran it on my machine and it worked just fine. Sorry again!

Previous post:

Next post: