Skip to content

Instantly share code, notes, and snippets.

@Indemnity83
Created December 11, 2014 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Indemnity83/b01642f285ce5c87a06d to your computer and use it in GitHub Desktop.
Save Indemnity83/b01642f285ce5c87a06d to your computer and use it in GitHub Desktop.
Windows Printer Paper Jam Clearing Script
@echo off
REM Un-Jam - The simple "stuck print job" fix
REM
REM This program is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License
REM along with this program. If not, see <http://www.gnu.org/licenses/>.
REM
REM @author Kyle Klaus
REM @copyright 2010 Kyle Klaus
REM @lastupdate $Date: 2010-04-28 23:38:19 -0700 (Wed, 28 Apr 2010) $
REM @version $Revision: 15 $
REM @link $HeadURL: http://indemnity83.com/svn/scripts/un-jam/un-jam.bat $
REM @id $Id: un-jam.bat 28 2010-07-01 17:15:43Z kklaus $
REM @since April 29th, 2010
NET STOP spooler
IF ERRORLEVEL 2 (
pause
goto EOF:
)
ECHO Clearing stuck print jobs.
DEL %SYSTEMROOT%\System32\spool\PRINTERS\* /Q
IF ERRORLEVEL 0 (
ECHO The print queue was cleared.
)
NET START spooler
IF ERRORLEVEL 2 (
pause
goto EOF:
)
:EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment