Skip to content

Instantly share code, notes, and snippets.

@LuchoLopez
Created April 18, 2013 15:58
Show Gist options
  • Save LuchoLopez/5413902 to your computer and use it in GitHub Desktop.
Save LuchoLopez/5413902 to your computer and use it in GitHub Desktop.
This tiny program stops the service that handles the printer queue, deletes printer jobs and start the service again. It works on Windows only
@echo off
echo ** Deteniendo el servicio de impresion.
:: Detiene el servicio de impresion
@net stop spooler > nul
echo ** Eliminando trabajos de la cola de impresion.
:: Elimina los archivos .shd y .spl
@del %systemroot%\system32\spool\printers\*.shd
@del %systemroot%\system32\spool\printers\*.spl
echo ** Iniciando el servicio de impresion.
:: Vuelve a iniciar el trabajo de impresion
@net start spooler > nul
:: Aguarda a que el usuario presiona una tecla para cerrar este programa
@pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment