Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


How to delete all printers from a specific server?

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,34307
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to delete all printers from a specific server?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 How to delete all printers from a specific server? - 5/9/2006 8:29:47 PM   
  Weegie

 

Posts: 6
Score: 0
Joined: 5/9/2006
Status: offline
We have multiple locations, and some users roam between them. When a user from location A gets to location B the logonscript needs to delete any and all printers from location A.
I used .RemovePrinterConnection to do this, but with well over 100 printers on the different locations, this takes *time*. Several minutes. So, I need a faster way to delete the printers.

Is it possible to use .EnumPrinterConnections to extract the UNC path for the printers and use an if and  lCase to delete all printers whose UNC path is beginning with \\printserverA\ for instance? How would I do this?
Any help with this is greatly appretiated.

< Message edited by Weegie -- 5/9/2006 9:49:34 PM >
 
 
Post #: 1
 
 RE: How to delete all printers from a specific server? - 5/9/2006 11:54:04 PM   
  Country73


Posts: 733
Score: 10
Joined: 8/25/2004
From: USA
Status: offline
Take a look at some of these past posts and see if they handle the question you have.

Previous Posts

(in reply to Weegie)
 
 
Post #: 2
 
 RE: How to delete all printers from a specific server? - 5/10/2006 2:48:53 AM   
  DiGiTAL.SkReAM


Posts: 1184
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
Here's a snippet from a printers script that I use:

      


_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to Country73)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to delete all printers from a specific server? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts