+ Post New Thread
Results 1 to 6 of 6
Windows Thread, Remove non-existent printers in Technical; When people search for printers they see all the current printers and those that no longer exist. In the past ...
  1. #1

    Join Date
    Jun 2008
    Posts
    718
    Thank Post
    118
    Thanked 64 Times in 52 Posts
    Rep Power
    31

    Remove non-existent printers

    When people search for printers they see all the current printers and those that no longer exist. In the past some printers were shared out via a parallel connection to a workstation but this is no longer the case anymore.

    My problem is, is that some workstations were rebuilt but this didn't remove the printer entry when you search for printers via Printers and Faxes.

    Is there a way of deleting entries of printers that are no longer available and/or exist?

  2. #2
    ICT_GUY's Avatar
    Join Date
    Feb 2007
    Location
    Weymouth
    Posts
    2,261
    Thank Post
    646
    Thanked 283 Times in 204 Posts
    Rep Power
    104
    I have a script for that,

  3. #3
    ICT_GUY's Avatar
    Join Date
    Feb 2007
    Location
    Weymouth
    Posts
    2,261
    Thank Post
    646
    Thanked 283 Times in 204 Posts
    Rep Power
    104
    Code:
    'Delete all printers
    
    
    'on error resume next
    
    set wNet = createobject("wscript.network")
    
    Set wshNetwork = CreateObject("WScript.Network")
    
    'Remove ALL old printers
    
    'Enumerate all printers first, after that you can select the printers you want by performing some string checks
    Set WSHPrinters = WNet.EnumPrinterConnections
    
    For LOOP_COUNTER = 0 To WSHPrinters.Count - 1 Step 2
    
    'To remove only networked printers use this If Statement
    
    If Left(WSHPrinters.Item(LOOP_COUNTER +1),2) = "\\" Then
    WSHNetwork.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True
    End If
    
    'To remove all printers incuding LOCAL printers use this statement and comment out the If Statement above
    
    'WSHNetwork.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True
    Next
    'end delete existing printers

  4. Thanks to ICT_GUY from:

    Chuckster (27th January 2010)

  5. #4
    ricki's Avatar
    Join Date
    Jul 2005
    Location
    uk
    Posts
    1,475
    Thank Post
    20
    Thanked 164 Times in 157 Posts
    Rep Power
    52
    Hi

    I use a line in my printer script that removes other no set printers that are not in the script with

    \\server\location\CON2PRT /F
    Richard

  6. Thanks to ricki from:

    Chuckster (27th January 2010)

  7. #5
    enjay's Avatar
    Join Date
    Apr 2007
    Location
    Reading, Berkshire, UK
    Posts
    4,485
    Thank Post
    282
    Thanked 196 Times in 167 Posts
    Rep Power
    75
    On the server, Active Directory Users & Computers, right-click on Establishment, click Find, select "Printers" from the drop-down in the top left, and click Find Now. All your shared printers will be listed, so simply delete the ones you no longer wish to be visible.

  8. Thanks to enjay from:

    Chuckster (27th January 2010)

  9. #6

    Join Date
    Jun 2008
    Posts
    718
    Thank Post
    118
    Thanked 64 Times in 52 Posts
    Rep Power
    31
    Quote Originally Posted by enjay View Post
    On the server, Active Directory Users & Computers, right-click on Establishment, click Find, select "Printers" from the drop-down in the top left, and click Find Now. All your shared printers will be listed, so simply delete the ones you no longer wish to be visible.
    Thank you very much. That worked like a treat.

SHARE:
+ Post New Thread

Similar Threads

  1. remove "devices" from devices and printers
    By mrbios in forum Windows 7
    Replies: 1
    Last Post: 3rd February 2010, 04:52 PM
  2. remove
    By mattx in forum AV and Multimedia Related
    Replies: 0
    Last Post: 20th January 2010, 09:08 AM
  3. WDS install wants a non-existent file
    By Ric_ in forum Windows
    Replies: 5
    Last Post: 13th October 2008, 05:39 PM
  4. Remove PDF Printers
    By EduTech in forum How do you do....it?
    Replies: 3
    Last Post: 22nd September 2008, 02:00 PM
  5. How to remove a Certificate from CA
    By PRicho in forum Windows
    Replies: 2
    Last Post: 22nd July 2008, 11:29 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •