mac_shinobi Posted March 27, 2013 Posted March 27, 2013 Googling here but can't seem to find the correct link to get RIC's printer script post up, did find this : http://www.edugeek.net/forums/scripts/968-script-delete-all-network-printers-logoff.html Where @Geoff posted the link to Ric's printer post / thread but when I click on the link it takes me to the edugeek home page EduGeek.net - The I.T. Professionals' life line Asking as I originally attached a script to the same post / thread and trying to get that ( as in the vbscript that I attached to Ric's post ) back Thanks
mac_shinobi Posted May 14, 2013 Author Posted May 14, 2013 I take it to mean that RIC's printer script thread / post has been deleted or removed when Edugeek upgraded to version 3 or whatever version
Arthur Posted May 14, 2013 Posted May 14, 2013 Could you use the following script to delete all local printers? It's included with Windows (in %SystemRoot%\System32\Printing_Admin_Scripts\en-US). Prnmngr.vbs -x
mac_shinobi Posted May 14, 2013 Author Posted May 14, 2013 Could you use the following script to delete all local printers? It's included with Windows (in %SystemRoot%\System32\Printing_Admin_Scripts\en-US). Prnmngr.vbs -x Was more to the point I posted my own script and was trying to get it back.
Arthur Posted May 14, 2013 Posted May 14, 2013 Is this it? ' Script to add network printers to workstations for staff ' ' Author: Ric Charlton, 07/07/04 (amended 10/02/11 by Derek Troughton) ' ' Declare variables and enumerate existing printer connections On Error Resume Next Set WshShell = WScript.CreateObject("WScript.Shell") Set WshNetwork = WScript.CreateObject("WScript.Network") Set oPrinters = WshNetwork.EnumPrinterConnections Dim computerName computerName = LCase(WshNetwork.ComputerName) ' Debugging line> WScript.Echo "ComputerName variable: " & computerName ' Delete existing connections to network printers For i = 0 to oPrinters.Count - 1 Step 2 On Error Resume Next if Left(oPrinters.Item(i), 3) <> "lpt" And Left(oPrinters.Item(i), 3) <> "usb" then WshNetwork.RemovePrinterConnection oPrinters.Item(i+1), true, true else WScript.Echo "No network printers found" end if Next ' Add printer connections dependant upon location Select Case (Left(computerName, 3)) Case "lrc" WshNetwork.AddWindowsPrinterConnection "\\norden-printers\LRC-Mono" WshNetwork.SetDefaultPrinter "\\norden-printers\LRC-Mono" Case "lib" WshNetwork.AddWindowsPrinterConnection "\\norden-printers\LRC-Mono" WshNetwork.SetDefaultPrinter "\\norden-printers\LRC-Mono" Case "lea" WshNetwork.AddWindowsPrinterConnection "\\norden-printers\LRC-Mono" WshNetwork.SetDefaultPrinter "\\norden-printers\LRC-Mono" Case "MED" WshNetwork.AddWindowsPrinterConnection "\\norden-printers\English-Mono" WshNetwork.SetDefaultPrinter "\\norden-printers\English-Mono" Case "rep" WshNetwork.AddWindowsPrinterConnection "\\norden-printers\AB-Colour" WshNetwork.SetDefaultPrinter "\\norden-printers\AB-Colour" Case Else ' WScript.Echo "No default printers added" End Select
mac_shinobi Posted May 14, 2013 Author Posted May 14, 2013 I meant the script I uploaded to the post that had a sub etc
Arthur Posted May 14, 2013 Posted May 14, 2013 I meant the script I uploaded to the post that had a sub etc Sorry. I misread your question. I don't think you'll be able to find it since the link to the thread that @Geoff posted was broken prior to 2009. web.archive.org/web/20091220041536/http://www.edugeek.net/forums/scripts/968-script-delete-all-network-printers-logoff.html
mac_shinobi Posted May 14, 2013 Author Posted May 14, 2013 Cant get it restored from a backup from zero hour. Not sure if they would have been kept ?
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