| |
zagadka
Posts: 4
Score: 0
Joined: 2/14/2008
Status: offline
|
Hi there, I'm pretty new to Vbscript so if I sound like a n00b...I am. I'm working on a couple of little thing at the moment, I will post the other ina seperate thread. Firstly though, I am working on a way to distribute shared printers to different departments. I've got the distribution bit working OK in a closed system, but as the current users will already have local and shared printers installed I would like to clear them all off at the start of the script and then apply the new printers afterwards. Here is my add printer script: Option Explicit Dim objNetwork, strLocal, strUNCPrinter1, strUNCPrinter2 strUNCPrinter1 = "\\ultra-invu\Accounts C2620" strUNCPrinter2 = "\\ultra-invu\Accounts HP2430" Set objNetwork = CreateObject("WScript.Network") objNetwork.AddWindowsPrinterConnection strUNCPrinter1 objNetwork.AddWindowsPrinterConnection strUNCPrinter2 objNetwork.SetDefaultPrinter strUNCPrinter1 I am not sure what to do next though as I have not found anything useful as yet to get both the local and shared printers to be removed together. If anyone knows of how this can be done, please can you post an example script! I'd be very grateful!
|
|