Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. Programatic Removal of Network Printer in All Profiles on a Workstation

Programatic Removal of Network Printer in All Profiles on a Workstation

Scheduled Pinned Locked Moved System Admin
sysadmintoolshelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vraxx
    wrote on last edited by
    #1

    Hello to all. I've been staring at this administrative task for a while to try and help folks in helpdesk environments. I'm comfortable scripting vbs/wmi to do removal of specific network printers at login (using WMI RemovePrinterConnection), but for the life of me I've yet to see anything which can process it for all users on a particular station w/o having the user login. The only other option I've seen has been to blow away the user profile which is excessive. In particular I'm targeting older 2000 stations which are getting a lot of driver corruption. Any recommended tools or resources I can read on the matter would be greatly appreciated.

    D 1 Reply Last reply
    0
    • V Vraxx

      Hello to all. I've been staring at this administrative task for a while to try and help folks in helpdesk environments. I'm comfortable scripting vbs/wmi to do removal of specific network printers at login (using WMI RemovePrinterConnection), but for the life of me I've yet to see anything which can process it for all users on a particular station w/o having the user login. The only other option I've seen has been to blow away the user profile which is excessive. In particular I'm targeting older 2000 stations which are getting a lot of driver corruption. Any recommended tools or resources I can read on the matter would be greatly appreciated.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Printers aren't installed in the user context. They're installed in the machine context, meaning if one person installs/removes a printer, it's installed/removed for everyone on that machine. What IS done in the user context is each user gets their own set of default printer settings.

      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      V 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Printers aren't installed in the user context. They're installed in the machine context, meaning if one person installs/removes a printer, it's installed/removed for everyone on that machine. What IS done in the user context is each user gets their own set of default printer settings.

        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        V Offline
        V Offline
        Vraxx
        wrote on last edited by
        #3

        Hi Dave, Thanks for the clarification there. The issue I'm bumping into is that most of the tools which are using WMI/VBS to try and remove the driver on a per machine basis can't do so w/o removing the print defaults in each of the user profiles. The old "Driver in use" issue. So far though I haven't seen anything that would allow me to enumerate then remove the defaults per user profile.

        "I've learned that life is one crushing defeat after another, until you just wish Flanders was dead." [Homer J Simpson]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups