Batch file to stop and start the print spooler service in Windows XP

The following batch file would stop and start the print spooler service on a Windows XP machine. This is required sometimes when your printing hangs, you can stop and restart the print spooling service instead of rebooting your machine.

Just copy the text in between the dashed lines, save it as a text file and rename the text file with a .bat or .cmd extension.

----------------------------------------------------------------------------------------------
@echo off
REM Stops and Starts the Print Spooler service
net stop "print spooler"
net start "print spooler"
echo Print Spooler service has been restarted
-----------------------------------------------------------------------------------------------

Good hint; particularly useful when doing MS Visio w/ DB models

The printer spooler MUST be deactivated when doing MS Visio 2007 Database models (frustrating discovery!), so I make a point of putting a batch on my desktop with the information you provided: @echo off REM Stops and Starts the Print Spooler service net stop "print spooler" REM Start Visio for DB: "C:\Program Files (x86)\Microsoft Office\Office12\visio.exe" net start "print spooler" REM echo Print Spooler service has been restarted This works well - the batch window stays open (in the background) while the Visio session is used, then restarts the spooler once Visio closes. I use the regular start method for other Visio models.