Little-Miss Posted November 5, 2013 Posted November 5, 2013 Come on then you clever lot. I'm about to have our printers upgraded and we're gaining a few more. I'm trialling PaperCut and through that i've come to the realisation that i haven't installed the printers the way they needed to be for PC-NG to be able to monitor the laptop printing. Cue me thinking how the hell am i going to sort this out. But... New printers + my OCD means IP's will possibly be changing thus rendering network printers currently installed on laptops useless (but then drivers may be an issue too i guess). SO.. Is there a way i can create some sort of file that when clicked, will remove the old printers and install the news ones? I imagine a few of you are going "duh, yeah" but it's not quite my forte! I currently use VB scripts to install printers onto our network machines (keeping it old skool) so have had a play with that to see if i could tweak it for what i need but haven't had much luck. TL: DR i want something i can tell the staff to double click that removes any existing networked printers and adds new ones....
CamelMan Posted November 5, 2013 Posted November 5, 2013 (edited) I've done this before - not really in Win 7: This may be useful Command Line Printer Control Will try and dig out some of my old scripts now... EDIT: Found this old script to remove all local printers - its a vbs: strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colInstalledPrinters = objWMIService.ExecQuery _ ("Select * from Win32_Printer Where Network = FALSE") For Each objPrinter in colInstalledPrinters objPrinter.Delete_ Next Edited November 5, 2013 by CamelMan
CamelMan Posted November 5, 2013 Posted November 5, 2013 (edited) A better script to remove network as well: Delete multiple printers - Script Center - Spiceworks Could then install printers via VBS (which I've done but cant remember) or use a batch file with: start /wait rundll32 printui,PrintUIEntry /q /in /n\\<>\<>l start /wait rundll32 printui,PrintUIEntry /q /y /n\\<>\<>l Edited November 5, 2013 by CamelMan
Firefox Posted November 5, 2013 Posted November 5, 2013 You could deploy printers by group policy. Then you could auto install printers based on the subnet that the laptop is on. Potentially very useful to users if they roam around quite a bit
SHimmer45 Posted November 5, 2013 Posted November 5, 2013 Printui is what i have used in the past to delete or add printers where GPO's arent used. sample of some script i used to manage printers rundll32 printui.dll PrintUIEntry /dl /n "printername" DELETE PRINTER rundll32 printui.dll PrintUIEntry /dd /m "printername FROM OEMSETUP.inf" DELETE DRIVER rundll32 printui.dll PrintUIEntry /if /F "Driverlocation" /b "printername" /r "PORT" /m "Printer Model name" ADD PRINTER adding the /c\\"PC-NAME" to the end of the lines connects to network machines
BatchFile Posted November 7, 2013 Posted November 7, 2013 Printui is what i have used in the past to delete or add printers where GPO's arent used. sample of some script i used to manage printers rundll32 printui.dll PrintUIEntry /dl /n "printername" DELETE PRINTER rundll32 printui.dll PrintUIEntry /dd /m "printername FROM OEMSETUP.inf" DELETE DRIVER rundll32 printui.dll PrintUIEntry /if /F "Driverlocation" /b "printername" /r "PORT" /m "Printer Model name" ADD PRINTER adding the /c\\"PC-NAME" to the end of the lines connects to network machines +1 for this - it's what I've done in the past (just note that the printui.dll PrintUIEntry is case sensitive(!)) and that, I think, you have to be a local admin to install print drivers in Win 7:rolleyes:
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