Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Delete everything in the printer queue

352 views
Skip to first unread message

Andy

unread,
Feb 14, 2011, 9:53:17 AM2/14/11
to
Is there a batch file way to delete everything in the printer queue.
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

01MDM

unread,
Feb 14, 2011, 11:25:44 AM2/14/11
to
I do not have a printer, try this method:

wmic printer call cancelalljobs

Perhaps you need to identify your printer. For example:

wmic printer where name="HP LaserJet" call cancelalljobs

Michael Bednarek

unread,
Feb 15, 2011, 4:11:49 AM2/15/11
to
On Mon, 14 Feb 2011 06:53:17 -0800 (PST), Andy wrote in
alt.msdos.batch.nt:

For a one-off or rarely occurring occasion, cancelling the print job
from the GUI (command: control printers) seems simple enough.

In addition to 01MDM's response, you can see how to cancel all print
jobs by inspecting %systemroot%\system32\prnqctl.vbs or simply use that
script as is:
cscript prnqctl.vbs -x -p "the printer name"

If you don't know the printer's name, use:
cscript prnmngr.vbs -g
or
cscript prnmngr.vbs -l

If you want to use a single command:
wmic printer where name="the printer name" call CancelAllJobs
or shorter
wmic printer "the printer name" call CancelAllJobs

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"

Zaidy036

unread,
Feb 15, 2011, 9:50:29 AM2/15/11
to
In article <rhfkl6tmg15qut7jn...@4ax.com>, Michael Bednarek at
mbATmbed...@BLACKHOLESPAM.NET says...

How would you like it if someone canceled your print job because you stepped
away for a moment ???? Why not get a cup of coffee while waiting??


Andy

unread,
Feb 15, 2011, 1:52:57 PM2/15/11
to
On Feb 15, 8:50 am, Zaidy036 <NOS...@something.invalid> wrote:
> In article <rhfkl6tmg15qut7jn4ddm2i4qpe01rl...@4ax.com>, Michael Bednarek at
> mbATmbednarek....@BLACKHOLESPAM.NET says...

I am talking about "leaving the building" kind of stepping away.

Andy

Andy

unread,
Feb 15, 2011, 1:54:40 PM2/15/11
to
On Feb 15, 3:11 am, Michael Bednarek

Thanks, I did not mention that would it be running on Vista.

And I can run cmd as an Admin.

Andy

Zaidy036

unread,
Feb 15, 2011, 3:03:30 PM2/15/11
to
In article <6c0d743c-c3e4-4de3...@z20g2000yqe.googlegroups.com>,
Andy at chocolate...@yahoo.com says...

I guess they want their print jobs done when they come back later. Why not
request that they set a low priority and then you can set the highest and your
job would run after the current job completes.

If you had started a log print job and left for the night and came back to find
it had been canceled you would be upset I am sure.

Andy

unread,
Feb 16, 2011, 2:34:36 AM2/16/11
to
On Feb 15, 2:03 pm, Zaidy036 <NOS...@something.invalid> wrote:
> In article <6c0d743c-c3e4-4de3-974d-515fbb46c...@z20g2000yqe.googlegroups.com>,
> Andy at chocolatemint77...@yahoo.com says...

This is at a Senior Center. :-)

Andy

Timo Salmi

unread,
Feb 16, 2011, 10:41:21 AM2/16/11
to
On 14.02.2011 16:53 Andy wrote:
> Is there a batch file way to delete everything in the printer queue.

Try if this applies in your situation
129} Is it possible to stop and reset the print spooler with a script?
http://www.netikka.net/tsneti/info/tscmd129.htm

All the best, Timo

--
Prof. Timo Salmi mailto:t...@uwasa.fi ftp & http://garbo.uwasa.fi/
Hpage: http://www.uwasa.fi/laskentatoimi/english/personnel/salmitimo/
Department of Accounting and Finance, University of Vaasa, Finland
Useful CMD script tricks http://www.netikka.net/tsneti/info/tscmd.php

Andy

unread,
Feb 24, 2011, 11:04:16 AM2/24/11
to
On Feb 16, 9:41 am, Timo Salmi <t...@uwasa.fi> wrote:
> On 14.02.2011 16:53 Andy wrote:
>
> > Is there a batch file way to delete everything in the printer queue.
>
> Try if this applies in your situation
>   129} Is it possible to stop and reset the print spooler with a script?
>  http://www.netikka.net/tsneti/info/tscmd129.htm
>
>     All the best, Timo
>
> --
> Prof. Timo Salmi    mailto:t...@uwasa.fi   ftp &http://garbo.uwasa.fi/

> Hpage:http://www.uwasa.fi/laskentatoimi/english/personnel/salmitimo/
> Department of Accounting and Finance,   University of Vaasa,  Finland
> Useful CMD script trickshttp://www.netikka.net/tsneti/info/tscmd.php

Unfortunately, I don't have enuf access to use it.

Is there something similar that will work for the current computer and
user ?

Thanks,
Andy

Timo Salmi

unread,
Feb 24, 2011, 11:32:32 AM2/24/11
to
On 24.02.2011 18:04 Andy wrote:
> On Feb 16, 9:41 am, Timo Salmi <t...@uwasa.fi> wrote:
>> On 14.02.2011 16:53 Andy wrote:
>>
>>> Is there a batch file way to delete everything in the printer queue.
>> Try if this applies in your situation
>> 129} Is it possible to stop and reset the print spooler with a script?
>> http://www.netikka.net/tsneti/info/tscmd129.htm

> Unfortunately, I don't have enuf access to use it.

By nature the task is such that it is not surprising that admin
privileges are needed. In principle, there might be other spooled jobs
than yours in the queue.

> Is there something similar that will work for the current computer and
> user ?

Unfortunately, I do not have such a solution. Is there any way you could
"run as" admin from that ordinary user account? Of course, you would
need to know the admin password. But you would not need actually
change the user.

All the best, Timo

--
Prof. Timo Salmi mailto:t...@uwasa.fi ftp & http://garbo.uwasa.fi/

0 new messages