Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Is there a way to delete all printers with the rundll32 printui.dll PrintUIEntry command?

Posted on 2008-10-01
10
Medium Priority
?
3,151 Views
Last Modified: 2010-04-21
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?
0
Comment
Question by:wolf2008
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 22618095
Sure - there's a built-in script to do it...
run this from the command line:
cscript prnmngr.vbs -x -s %computername%

Open in new window

0
 
LVL 1

Author Comment

by:wolf2008
ID: 22618203
It looked like it worked at first, but when I logged off then on, the printers came back.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 22618270
Logon script recreating them perhaps?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Author Comment

by:wolf2008
ID: 22618321
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.
0
 
LVL 11

Expert Comment

by:Paolo Santiangeli
ID: 22623764
0
 
LVL 1

Author Comment

by:wolf2008
ID: 22624222
Did not work.  The printer came back when I restarted the Print Spooler Service.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 22624236
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...
0
 
LVL 1

Author Comment

by:wolf2008
ID: 22624284
sirbounty: You added the printers with the "rundll32 printui.dll PrintUIEntry /ga /n\\server\printer" command?
0
 
LVL 21

Accepted Solution

by:
AmazingTech earned 2000 total points
ID: 22657391
It's been about 2 years since I've played with the printui.dll so if my memory is a little hazy please give me some time to relearn this tool if needed. I will help you in every way. Need explanations just ask.

Want to delete all GAs?

The Reg Copy is just so we have a backup if we accidentally delete something we shouldn't have.

Of course with REG you can do this remotely as well.
reg copy HKLM\SYSTEM\CurrentControlSet\Control\Print\Connections HKLM\SYSTEM\CurrentControlSet\Control\Print\Connections.Saved /s /f
reg delete HKLM\SYSTEM\CurrentControlSet\Control\Print\Connections /f

Open in new window

0
 
LVL 1

Author Closing Comment

by:wolf2008
ID: 31407080
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\CurrentControlSet\Control\Print\Connections /f
net stop spooler
net start spooler
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
IF you are either unfamiliar with rootkits, or want to know more about them, read on ....
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question