wolf2008
asked on
Is there a way to delete all printers with the rundll32 printui.dll PrintUIEntry command?
I have different printers installed on different machines, all with the /ga command. Is there a way to delete them with the rundll32 command without specifying the server or printer name?
ASKER
It looked like it worked at first, but when I logged off then on, the printers came back.
Logon script recreating them perhaps?
ASKER
No logon scripts, either locally or through Group Policy. I'm able to delete them with the /gd command, but you have to know each \\servername\printername and there are far too many combinations set on these computers. There's gotta be a way to script it.
Hi,
have a look here:
http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/printing/servers/#DelAllPrinters.htm
Regards
-psantiangeli
have a look here:
http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/printing/servers/#DelAllPrinters.htm
Regards
-psantiangeli
ASKER
Did not work. The printer came back when I restarted the Print Spooler Service.
I still think there's some automated method reproducing them...I ran the script on my system and my printers are gone...even after a reboot...
ASKER
sirbounty: You added the printers with the "rundll32 printui.dll PrintUIEntry /ga /n\\server\printer" command?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks! I tested it with both lines in a .bat file, and it worked. I then created a .bat file with the following:
reg delete HKLM\SYSTEM\CurrentControl Set\Contro l\Print\Co nnections /f
net stop spooler
net start spooler
reg delete HKLM\SYSTEM\CurrentControl
net stop spooler
net start spooler
run this from the command line:
Open in new window