realized Posted September 9, 2006 Share 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. Link to comment Share on other sites More sharing options...
valter Posted September 9, 2006 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now