From: Pegasus [MVP] on


"Herzl Regev" <HerzlRegev(a)discussions.microsoft.com> wrote in message
news:27322FB6-8A35-49B2-962B-53835385BBD9(a)microsoft.com...
> First of all, the problem went away, but it might return. Re the replies:
>
> before trying the way I listed, I already tried the way suggested by
> LD55ZRA.
>
> when I deleted the files in /WINDOWS/System32/spool/PRINTERS, nothing was
> left, but the printer queue stayed occupied. I didn't reboot the PC. What
> seems to have worked was that I closed that window that I got from
> "opening"
> the printer. Before that I disconnected the printer, turned it off -
> didn't
> help.

I think you were deceived. Cleaning out the Printers folder is a
non-approved way of doing things and your printer screen will not update
itself automatically. If you did a screen refresh (e.g. with F5) then you
would immediately see an empty print queue.

From: HeyBub on
Herzl Regev wrote:
> How do I clear the print queue?
> I've tried "net stop spooler" and deleted all in
> /WINDOWS/System32/spool/PRINTERS, to no avail.
>
> The OS is XP Home SP3. The printer is HP psc 1200.

You may have to build in a pause (the "ping" command).

The following batch file works for me:

@echo off
echo.
echo Purging the print queue . . .
net stop Spooler
echo Deleting all print jobs . . .
ping localhost -n 4 > nul
del /q %SystemRoot%\system32\spool\printers\*.*
net start Spooler
echo Done!
ping localhost -n 4 > nul


From: John John - MVP on
HeyBub wrote:
> Herzl Regev wrote:
>> How do I clear the print queue?
>> I've tried "net stop spooler" and deleted all in
>> /WINDOWS/System32/spool/PRINTERS, to no avail.
>>
>> The OS is XP Home SP3. The printer is HP psc 1200.
>
> You may have to build in a pause (the "ping" command).
>
> The following batch file works for me:
>
> @echo off
> echo.
> echo Purging the print queue . . .
> net stop Spooler
> echo Deleting all print jobs . . .
> ping localhost -n 4 > nul
> del /q %SystemRoot%\system32\spool\printers\*.*
> net start Spooler
> echo Done!
> ping localhost -n 4 > nul

Actually, when taking a second look at the batch file you will see that
all that the ping command does is give the user a bit of time to see and
read the echo...

John
From: Pegasus [MVP] on


"John John - MVP" <audetweld(a)nbnot.nb.ca> wrote in message
news:OPqbpkE0KHA.6140(a)TK2MSFTNGP05.phx.gbl...
> HeyBub wrote:
>> Herzl Regev wrote:
>>> How do I clear the print queue?
>>> I've tried "net stop spooler" and deleted all in
>>> /WINDOWS/System32/spool/PRINTERS, to no avail.
>>>
>>> The OS is XP Home SP3. The printer is HP psc 1200.
>>
>> You may have to build in a pause (the "ping" command).
>>
>> The following batch file works for me:
>>
>> @echo off
>> echo.
>> echo Purging the print queue . . .
>> net stop Spooler
>> echo Deleting all print jobs . . .
>> ping localhost -n 4 > nul
>> del /q %SystemRoot%\system32\spool\printers\*.*
>> net start Spooler
>> echo Done!
>> ping localhost -n 4 > nul
>
> Actually, when taking a second look at the batch file you will see that
> all that the ping command does is give the user a bit of time to see and
> read the echo...
>
> John

The batch file comes out of my kitchen and yes, this was exactly the purpose
of the ping command. Some day, if you're interested, I'll explain the
contortions I had to go through to get around the UAC restrictioins under
Windows 7 . . .