There’s one problem which was driving my parents nuts on XP for some time before we finally got around to finding a reasonable solution. For whatever reason, one of their computers insisted on automatically adding the shared network printer on the other machine as the default printer in the list. This regardless of whether we had already assigned a local default, and whether the network printer was already in the list.

Whilst that already caused some consternation when documents would be sent to the wrong machine, it was compounded by the fact that if the printer was offline at the time, Windows XP would spend 100% CPU time trying to find the damn thing, leaving the PC highly unresponsive until the print queue was manually cleared. Meaning the options were between remembering to change the printer on every print job, or forgetting and rebooting the machine in between.

Fortunately, we found the handy little script below on some forum or other (praise be to the original author). It stops Windows’ printer service, deletes any waiting print jobs, and then restarts the service. Copy the lines below into a batch file (or into a simple text file and change its extension to .bat) or alternatively download the same script as a file.

@echo off
echo.
echo Purging the print queue . . .
net stop Spooler
echo Deleting all print jobs . . .
ping localhost -n 4 > nul
del /q %SystemRoot%\system32\spool\printers\*.*
net start Spooler
echo Done!
ping localhost -n 4 > nul