realized Posted September 9, 2006 Posted September 9, 2006 Over the years we have had a few diffrent print servers/printers. I would like to "clean shop" and make sure everything is current on all clients without going pc to pc.I am aware of the public scripts out there that let you delete a printer if you knwo the EXACT name of the printer.But how about deleting a printer by wildcard?I would like to delete anything that has *HP* or *Toshiba* in it, before i run the second part of the script which will install the CORRECT HP/TOSHIBA printer(s) and set the default printer.
valter Posted September 9, 2006 Posted September 9, 2006 I don't think you can actually delete network printer connection using wildcards, but rather collect all printer names and then make a vbs script and remove them. Here is simple example how to remove network printer connection as well as printer icon.Option ExplicitDim objNetwork, strUNCPrinterstrUNCPrinter = "\\Server\Printer"Set objNetwork = CreateObject("WScript.Network")' Section which removes the network printerobjNetwork.RemovePrinterConnection strUNCPrinterWScript.Echo "Check Printers folder NO: " & strUNCPrinterWscript.QuitLogon Script ends hereHope this helps
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now