Delete all printers

  • Thread starter Thread starter Laura Dahlgren
  • Start date Start date
L

Laura Dahlgren

I am building a print cluster, and need to delete 1000+
printers from each of the 2 nodes prior to running
clustool.exe. I found a WMI script on technet to delete
all printers on the server, but it keeps returning an
error when I attempt to run it. I have run the same
script on my XP desktop with success.

The problem server is running WIN2K Advanced Server
w/SP4. The error I receive occurs on line 7 of the
script (objPrinter.Delete_) the error is as follows:
"Provider is not capable of the attempted operation"
Code=80041024, Source=SWbemObject

The technet article states this script should work on
Windows 2000. Any ideas?

Thanks,
Laura
 
I am building a print cluster, and need to delete 1000+
printers from each of the 2 nodes prior to running
clustool.exe.

Try this one (not tested):
===DELPRINTERS.cmd single line in CMD, no CR/LF ===
for /f "tokens=7 delims=\" %%a in ('reg query
HKLM\System\Currentcontrolset\control\print\printers')
do rundll32 printui.dll,PrintUIEntry /dl /n "%%a"
===EOF====

REG.EXE will be found in SUPPORT.CAB on your w2k-CD.

If it doesn't work I have another solution.

Ciao, Walter
 
Back
Top