Location if InStr objPrinter. Name ' WshNetwork. RemovePrinterConnection objPrinter. Name end if Next I personally prefer 2 cause 1, by some strange reason, enumerates printers twice, by alias and by name It is not a problem, just not as beautiful as 2. Myself and others have found the scripts listed above no longer work. They no longer return the name of printers where the status is unable to connect ie printer server down or replaced. The script returns the name of the printer and not the "share name" which is probably what you are looking for.
I am using this script and it works like a charm. Try replacing "objPrinter. Name" with "objPrinter. Network" objNetwork. Quit Much simpler, works just as written above. Dear Jdaly - this script works just great. That would be awesome : Thank you! Home Categories Tags Top of Page. I've now been blogging here since ! Wow, has it been that long already?! Over the years, I've covered a wide array of subjects from scripting, troubleshooting, to the occasional hobby project.
I have literally heard from thousands of you over the years with questions or even just offering me a bit of thanks! If there is something on my blog or not that you could use some additional help with, I would LOVE to hear from you! You can find the repository here:. This just deletes the printer, not uninstall the driver and remove all registry settings relating to this driver. Which is a whole other ballgame :.
Yuo only need to install the drivers on one server and use it as a spooler. YOU cannot use old pronter drivers with any system post WS without the probability of a system crash. Be sure you use only drivers certified for Windows and later.
If you deploy the print spooler correctly the drivers will beautomanaged opn all workstations from the central spooler. All cleint drivcers will be upodated automatically from the spooler.
Remove ing the printers will not remove the 'kernel'-mode' drivers and will not fully solve the problem.
You can also use the printer management scripts in the WIndows folder. Office Office Exchange Server. Not an IT pro? Script Center. Sign in.
0コメント