PC Review


Reply
Thread Tools Rate Thread

Delete everything in the printer queue

 
 
Mint
Guest
Posts: n/a
 
      14th Feb 2011
Is there a way to delete everything in the printer queue using maybe
a batch file?
This would save paper and time.

I am sometimes at a computer where others walk away from it and there
are items in the printer queue.

Then when I print something, I have to wait while other pages come
out.

Thanks,
Andy
 
Reply With Quote
 
 
 
 
Tim Meddick
Guest
Posts: n/a
 
      14th Feb 2011
Try the following in a batch-file :

------------------- copy between lines -------------------

@echo off
if EXIST %SystemRoot%\system32\spool\PRINTERS\*.* del
%SystemRoot%\system32\spool\PRINTERS\*.*


------------------- copy between lines -------------------

*NB the command starting ; "if" should be all on one line but may not
appear so due to line-wrap - ensure the command ends with the second
occurrence of ; "*.*"


However, this command may clear the print que, but will not cancel the
currently printing document as that has already been passes into the
printer's memory.

==

Cheers, Tim Meddick, Peckham, London. :-)




"Mint" <(E-Mail Removed)> wrote in message
news:e95ea7f8-5475-4733-af5c-(E-Mail Removed)...
> Is there a way to delete everything in the printer queue using maybe
> a batch file?
> This would save paper and time.
>
> I am sometimes at a computer where others walk away from it and there
> are items in the printer queue.
>
> Then when I print something, I have to wait while other pages come
> out.
>
> Thanks,
> Andy


 
Reply With Quote
 
Tim Meddick
Guest
Posts: n/a
 
      14th Feb 2011
Please ignore my previous post ;

The more accurate way of handling printer (spooler) functions is by the XP
built-in VBS scripts :

prncnfg.vbs
prndrvr.vbs
prnjobs.vbs
prnmngr.vbs
prnport.vbs
prnqctl.vbs

....which are located in your [system32] directory.


The one's you want (to stop printing and clear the que) are :
[prnjobs.vbs] and [prnqctl.vbs] and the syntax to place into a batch-file
would be :

------------------- copy between lines -------------------

@echo off
echo Cancelling current print job...
cscript prnjobs.vbs -x
echo Cancelling all print jobs...
cscript prnqctl.vbs -x

------------------- copy between lines -------------------

For usage instructions (syntax) for each of the prn[func].vbs scripts
included with XP, type the following at the command prompt ;

cscript prn[func].vbs /?

==

Cheers, Tim Meddick, Peckham, London. :-)




"Mint" <(E-Mail Removed)> wrote in message
news:e95ea7f8-5475-4733-af5c-(E-Mail Removed)...
> Is there a way to delete everything in the printer queue using maybe
> a batch file?
> This would save paper and time.
>
> I am sometimes at a computer where others walk away from it and there
> are items in the printer queue.
>
> Then when I print something, I have to wait while other pages come
> out.
>
> Thanks,
> Andy


 
Reply With Quote
 
Mint
Guest
Posts: n/a
 
      14th Feb 2011
On Feb 14, 9:47*am, "Tim Meddick" <timmedd...@o2.co.uk> wrote:
> Please ignore my previous post ;
>
> The more accurate way of handling printer (spooler) functions is by the XP
> built-in VBS scripts :
>
> prncnfg.vbs
> prndrvr.vbs
> prnjobs.vbs
> prnmngr.vbs
> prnport.vbs
> prnqctl.vbs
>
> ...which are located in your [system32] directory.
>
> The one's you want (to stop printing and clear the que) are :
> [prnjobs.vbs] and [prnqctl.vbs] and the syntax to place into a batch-file
> would be :
>
> ------------------- copy between lines -------------------
>
> @echo off
> echo Cancelling current print job...
> cscript prnjobs.vbs -x
> echo Cancelling all print jobs...
> cscript prnqctl.vbs -x
>
> ------------------- copy between lines -------------------
>
> For usage instructions (syntax) for each of the prn[func].vbs scripts
> included with XP, type the following at the command prompt ;
>
> cscript *prn[func].vbs */?
>
> ==
>
> Cheers, * *Tim Meddick, * *Peckham, London. * *:-)
>
> "Mint" <chocolatemint77...@yahoo.com> wrote in message
>
> news:e95ea7f8-5475-4733-af5c-(E-Mail Removed)...
>
> > Is there a *way to delete everything in the printer queue using maybe
> > a batch file?
> > This would save paper and time.

>
> > I am sometimes at a computer where others walk away from it and there
> > are items in the printer queue.

>
> > Then when I print something, I have to wait while other pages come
> > out.

>
> > Thanks,
> > * * * * * * *Andy


Ran into some problemos.

Andy

C:\DELL>canc_print_jobs
Cancelling current print job...
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Unable to set print job Error 0x8004100C Not supported
Operation GetObject
Provider CIMWin32
Description
Win32 error code
Cancelling all print jobs...
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

CScript Error: Loading script "C:\Windows
\System32\Printing_Admin_Scripts\en-US\
c:\windows\system32\prnqctl.vbs" failed (The filename, directory name,
or volume
label syntax is incorrect. ).


@echo off
echo Cancelling current print job...
cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnjobs.vbs -
x
echo Cancelling all print jobs...
c:\cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\c:\windows
\system32\prnqctl.vbs -x
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move a document from an offline printer queue to an online queue? BudV Windows Vista General Discussion 4 12th Sep 2010 03:23 AM
I cannot delete an email (outbind://document) from printer queue Susie in Spain Microsoft Word Document Management 2 13th Sep 2009 09:12 PM
I cannot delete a document from the printer queue. clearwatercolors Windows XP Print / Fax 1 14th Jul 2009 10:56 PM
Printer Queue Messages Do Not Delete after Printing =?Utf-8?B?QW5kcmV3IFN0ZWVsZQ==?= Microsoft Windows 2000 Printing 2 6th Apr 2005 09:29 PM
Re: Printer won't print, jobs in printing queue won't delete Cari \(MS-MVP\) Windows XP Print / Fax 2 10th May 2004 06:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:30 PM.