Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Script to remove TCP/IP Printers
Name: ToPo (by topo) Date: November 19, 2007 at 15:54:52 Pacific OS: Win XP MCE CPU/Ram: 2.0GHz / 1 GB DDR Product: HP Pavilion
Comment:
Hello,
I am looking to create a batch file to remove all TCP/IP printers, but keep all local printers. Currently I tried using windows prnmngr.vbs but it either deletes all printers including Adobe PDF writer or I can specify which printers to delete within the cmd. I basically need to click on a button and "bye bye" IP printers. Any help would be very much appreciated.
Name: tonysathre Date: November 20, 2007 at 12:44:48 Pacific
Reply:
::==rmNetPrinters.bat @echo off wmic printer where "Local='FALSE'" delete ::==
I don't have Adobe PDF Writer on my machine so I don't know if this will delete that or not. I would assume not because it should be listed as a local printer, but again, I'm not sure.
"Computer security." — Oxymoron
0
Response Number 2
Name: ToPo (by topo) Date: November 20, 2007 at 16:06:31 Pacific
Reply:
Thanks Tony... unfortunately TCP/IP printers are considered local printers not network printers. But I think I found a solution that works...
wmic printer where "PortName LIKE 'IP_%'" delete
0
Response Number 3
Name: mhouse Date: January 8, 2008 at 05:51:35 Pacific
Reply:
wmic printer where "PortName LIKE 'IP_%'" delete
The command above works well for me when executed locally, but fails when called via a URL? (I get "No Instance(s) Available.")
I'm trying to run this from a startup script in a machine GPO.
Any Suggestions would be greatly appreciated.
-MDH
0
Response Number 4
Name: ToPo (by topo) Date: January 8, 2008 at 13:42:50 Pacific
Reply:
I am using this command in a batch file called within a login script. If you are using it within a script you must put two %% as the command line will read one % as a special character. Two %% will read it as a single %. My command looks like this...
wmic printer where "PortName LIKE 'IP_%%'" delete
Hope that helps!
0
Response Number 5
Name: mhouse Date: January 9, 2008 at 05:49:59 Pacific
Summary: was wondering if you could help me with a script to remove ALL the lines in a file that contain the word "BOUNDARY". I have the script like this so far, but It will only remove the first occurance of...
Summary: Hi I need a script to remove LF and CR Characters from a CSV file. I have never written any widnows script. I need help. the Data in my csv file looks like this. SNo,FNAME,MNAME,LNAME 1,agfgfgfd,...
Summary: clients all work on XP machines,and we do direct IP printing. Setting up a print server is not an option I want the script to add the IP port, driver, and printer object. If the machine already has ...