Link to home
Start Free TrialLog in
Avatar of derekdy
derekdy

asked on

How do I delete multiple printers at once in Windows7

We currently deploy cloned PCs from an image which has all of the 100+ printers for our 20+ locations installed on it.  Once we know which location the PC is going to be in we delete all of the printers except the printers for that location to lessen user confusion.  Under XP it was simple, select all of the printers except the ones you wanted to keep and hit delete.  Under Win7 as soon as you select more than one printer the delete option is no longer available.  How do you delete some, but not all, of a group of installed printers in Win7 without having to delete them one at a time?
Avatar of LeeTutor
LeeTutor
Flag of United States of America image

' Set printers
' ******************************
On Error Resume Next
Dim objNetwork
Set objNetwork = CreateObject("WScript.Network")

the commands below remove old printers - very helpful if you are updating a driver on a printer and want to make sure the workstations get the latest driver you installed. Remove the ' in front to have the command actually processed.
'objNetwork.RemoveWindowsPrinterConnection "\\server\printer_to_remove"
'objNetwork.RemoveWindowsPrinterConnection "\\server\2nd_printer_to_remove"


the commands below begin connecting each printer you have pathed out to
objNetwork.AddWindowsPrinterConnection "\\server\printer1"
objNetwork.AddWindowsPrinterConnection "\\server\printer2"
objNetwork.AddWindowsPrinterConnection "\\server\printer3"
objNetwork.AddWindowsPrinterConnection "\\server\printer4"
objNetwork.AddWindowsPrinterConnection "\\server\printer5"


the command below establishes which printer will be the default printer
objNetwork.SetDefaultPrinter "\\server\printer1"
Avatar of derekdy
derekdy

ASKER

@LeeTutor

Thanks for the response but I've actually got a reply to the MS Tech comment on the link your recommend. The tech misread or ignored the original poster's question and gave instructions for deleting multiple drivers rather than multiple printers at once. He then says "For devices you may open devices and printers and remove one device at a time." which puts me back to square one.
ASKER CERTIFIED SOLUTION
Avatar of derekdy
derekdy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial