您是否遇到过尝试打印某些东西却什么也没有发生的情况(something and nothing happens)?您等待它打印,但作业没有(job doesn)完成?打印作业(print job)可能无法实际打印的原因有很多,但其中一个常见原因是打印机队列(printer queue)有一个卡住的打印作业(print job)。
发生这种情况的原因有很多。假设您在几个小时前尝试打印某些内容,但打印机已关闭。您最终不需要该文件,而您却忘记了它。然后你回来尝试打印。打印作业(print job)被添加到队列中,如果前一个作业没有(job didn)被自动删除,它将在那个从未打印过的打印作业后面。(print job)
有时您可以手动进入并删除打印作业(print job),但有时您就是无法摆脱它!在这种情况下,您必须手动清除打印队列。(print queue)在本文中,我将向您展示清除打印队列(print queue)的步骤。
在 Windows 中清除打印队列
为了让打印服务恢复并运行,请执行以下步骤:
1. 转到开始、控制面板和管理工具(Administrative Tools)。双击服务(Services)图标。
2. 向下滚动到Print Spooler服务并右键单击它并选择停止(Stop)。为此,您需要以管理员(Administrator)身份登录。此时,任何人都无法在此服务器上托管的任何打印机上打印任何内容。
3.接下来您需要进入以下目录:C:\WINDOWS\System32\spool\PRINTERS。如果C 盘(C drive)不是默认的Windows 分区(Windows partition),您也可以在资源管理器(Explorer)的地址栏中键入%windir%\System32\spool\PRINTERS。 删除(Delete)此文件夹中的所有文件。
这将清除所有打印队列(如果您在服务器上执行此操作,最好首先确保服务器上的任何其他打印机没有正在处理其他打印作业,因为执行此步骤将删除这些作业还)。
4. 现在您可以返回服务(Services) 控制台并右键单击(console and right-click)并为 Print Spooler 服务选择开始!(Start)
此时,您应该可以毫无问题地进行打印。如果您更喜欢使用脚本,即服务器,那么您可以使用以下命令创建批处理文件(batch file),或者只需在命令提示符(command prompt)中键入它们:
净停止假脱机(net stop spooler)
del %systemroot%\System32\spool\printers\* /Q /F /S
净启动假脱机程序(net start spooler)
第一个和第三个命令相当明显:它们停止和启动print spooler 服务(print spooler service)。中间命令删除打印机文件夹中的所有内容,而 /Q 用于安静模式,这意味着您不会收到询问是否要删除每个文件的提示。/F 将强制删除所有只读文件, /S 将删除所有子目录(如果存在)。从此文件夹中删除内容永远不会损害您的计算机,因此如果您看到一些文件或文件夹并且不确定它们的用途,请不要担心。
如果您想知道如何创建批处理文件(batch file),可以阅读我之前的帖子。然后您所要做的就是在您想要清除打印队列的(print queue)任何时候运行批处理文件(batch file anytime)。幸运的是,清除打印队列(print queue)的过程对于Windows 8、Windows 7、Vista和 XP 是相同的。
How to Forcefully Clear the Print Queue in Windows
Have уou ever run into the situation where you try to print something and nothing hаppens? You wait for it to print, but the job doesn’t gо through? Therе are а ton of reasons why a print job may not actually prіnt, but one of the common causes is that the рrintеr queue haѕ a stuck print job.
This can happen for a number of reasons. Let’s say you tried to print something a few hours back, but the printer was off. You ended up not needing the document and you forgot about it. Then you come back and try to print. The print job is added to the queue and if the previous job didn’t get removed automatically, it will be behind that print job that never got printed.
Sometimes you can manually go in and delete the print job, but sometimes you just can’t get rid of it! In this type of case, you have to clear the print queue manually. In this article, I’ll show you the steps to clear the print queue.
Clear Print Queue in Windows
In order to get the printing services back up and running, follow these steps:
1. Go to Start, Control Panel and Administrative Tools. Double click on Services icon.
2. Scroll down to the Print Spooler service and right click on it and select Stop. In order to do this, you need to be logged in as Administrator. At this point, no one will be able to print anything on any of the printers that are being hosted on this server.
3. Next you need to go to the following directory: C:\WINDOWS\System32\spool\PRINTERS. You can also type %windir%\System32\spool\PRINTERS into the address bar in Explorer if the C drive is not the default Windows partition. Delete all the files in this folder.
This will clear all print queues (If you’re doing this on a server, it’s a good idea to first make sure there are no other print jobs being processed for any of the other printers on the server because doing this step will delete those jobs also).
4. Now you can go back to the Services console and right-click and choose Start for the Print Spooler service!
At this point, you should be able to print without a problem. If you prefer to use a script, i.e. for a server, then you can create a batch file with the commands below or just type them into the command prompt:
net stop spooler
del %systemroot%\System32\spool\printers\* /Q /F /S
net start spooler
The first and third commands are fairly obvious: they stop and start the print spooler service. The middle command deletes everything in the printers folder and the /Q is for quiet mode, which means you won’t get a prompt asking if you want to delete each file. /F will force delete all read-only files and /S will delete any subdirectories if those exist. Deleting content from this folder can never harm your computer, so don’t worry if you see some files or folders and aren’t sure what they are for.
You can read my previous post if you want to know how to create a batch file. Then all you have to do is run the batch file anytime you want to clear out the print queue. Luckily, the procedure for clearing out the print queue is the same for Windows 8, Windows 7, Vista, and XP.