Help and Support

How to cancel printing or to delete a print job that is stuck in the print queue in Windows XP

Method D: Stop the print spooler and delete all spooled files

Introduction | Method A | Method B | Method C| Method D

If you tried Methods A through C and you were not successful, Method D should work for you. If you came to Method D immediately only to delete a print job, some of what we say here might not apply to you, so please bear with us.

Method D is simple (if you want it to be) because we can do all the work for you. What we will do is to try to stop the print spooler and delete all spooled files. And all that you will have to do is click a Fix this problem link. Of course, if you would rather do the work yourself, you can decide to do that instead. We will give you all the steps that you'll need.

To have us stop the print spooler and delete all spooled files for you, go to the Fix it for me section. If you would rather do this yourself, go to the Let me fix it myself section.

Fix it for me

To stop the print spooler and delete all spooled files automatically, click the Fix this problem link. Then click Run in the File Download dialog box, and follow the steps in this wizard.

Click here to Fix it!
Fix this problem


Note This wizard is temporarily in English only. However, the automatic fix also works for other language versions of Windows.

Note If you are not on the computer that has the problem, you can save the automatic fix to a flash drive or to a CD, and then you can run it on the computer that has the problem.

To check whether this method worked, go to the "Did this fix the problem?" section.

Let me fix it myself

First, in case you're not sure how printing works, here is a short explanation. Print jobs are sent to the printer as spooled files. This means that the files are put in a temporary location so that the printer can access a print queue and print jobs at its own speed. If you stop the spooler and delete its files, most of the time, you both cancel printing and delete the print jobs. So that's what we are going to do.

Note To use this method, you must have Computer Administrator status. If you are using your own printer, you most likely have Computer Administrator status. If you are printing to a shared printer, you might have to ask the system administrator to cancel the print job for you.

To stop the print spooler and delete its files, we will have you create and then run a script file that automatically stops the service. This sounds difficult, but it really isn't. Just follow these steps carefully.  To start, go to Step 1.

Step 1: Start Notepad

  1. Click Start, and then click Run.
  2. In the Open box, type Notepad, and then click OK. Notice that a blank Notepad document opens. 

Now, go to Step 2.

Step 2: Copy a command script to Notepad

Now we will have you paste some commands to the Notepad document.

  1. Carefully select (highlight) all the following text:

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

  2. Right-click the text that you selected, and then click Copy
  3. In Notepad, right-click in the blank document, and then click Paste.
  4. Carefully select (highlight) all the following text:
    C:\DeletePrintJobs.cmd 
  5. Right-click the text that you selected, and then click Copy.
  6. In Notepad, click Save As on the File menu. 
  7. In the File Name box, right-click, and then click Paste.

    Note This file name differs from most other file names that you might have seen. That is because this file is a command script file.

  8. Click Save.

Finally, go to Step 3.

Step 3: Run the command script file

Now that you have created the command script file, you will run it. To run it, you will paste the name of the command script file in the Open box.

  1. Carefully select (highlight) all the following text:
    C:\DeletePrintJobs.cmd 
  2. Right-click the text that you selected, and then click Copy.
  3. Click Start, and then click Run
  4. In the Open box, right-click, and then click Paste.
  5. Click OK.
  6. Notice that a Command Prompt window opens to run the command script file that you created. Notice also that this window automatically closes when the command script file has finished running. If you do not see the Command Prompt window open, check that you saved the command script file by using the correct name and that you entered the correct command script file name in the Open box. 

Did this fix the problem?

Check whether the problem is fix. If this method did not work the first time or if you cannot print anything after you use this method, restart your computer, and then try again.

If this method worked, you are finished with this content. However, you might want to read the "Prevention tips" section to prevent this problem.

If this method did not work, we're sorry that this content was unable to help you. For your next steps, you might want to ask someone you know for help or contact support. For information about how to contact support, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/

We value your feedbackWe would appreciate your feedback. To provide feedback or to report any issues with this solution, please leave a comment on the "Fix it for me" blog, or send us an e-mail message.

Last Review : February 25, 2009