I got a question from Lewis this week:
“I hope this email finds you well. I have a plotter here at my company, and the driver is really temperamental. At least twice a week the driver crashes, and then all of the jobs get stuck in the spooler. To fix it I need to stop the spooler service, delete all the jobs and start the service again. Is there any easy way to do this remotely with a script? Have a Merry Christmas Steve, and thanks for all the tips”
Good question. A script in this case won’t always work. This is because with Vista, Windows 7, and 2008 the print spooler folder is restricted. Only the system account can access it.
A way around this is to use our Network Administrator tool. It will remotely execute the script in the system account context.
This is how the script would look if we wanted to stop the print spooler, delete the files, and start it again:
net stop spooler
del %systemroot%\System32\spool\printers\*.shd /q
del %systemroot%\System32\spool\printers\*.spl /q
net start spooler
.shd, and .spl files are print job files. If you delete them, it will wipe away any pending jobs.
You could put this into a bat file, and simply use the remote execute option of Network Administrator. To make it a smoother experience, we created a plugin that will handle everything for you:
You can also tell it if you want to delete all the pending jobs:
This can be quite helpful if you have a huge backlog of print jobs:
Using Network Administrator to do this is quicker than manually deleting the jobs since it does not have to talk back and forth with the printer driver to do it.
Get your free copy from our download page:
The free version is free for commercial and personal use. No spyware or adware – only software goodness.
One more thing…Subscribe to my newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them. Click Here to get your free tools