This I found also, do you also have something to get the default printer?

I looked on google and found a script that looked at the registry, but that 
didn't work.
Looked like the registry didn't store it there.

Thanks
René

-----Original Message-----
From: Phil Brutsche [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 15, 2008 8:01 PM
To: NT System Admin Issues
Subject: Re: Printer Logon Scripts

If you need to do it with CMD scripts I can't help.

This is how I do it with .vbs login scripts (beware line wrappage):

dim network, networkPrinters, portNumber, printerName, i
set networkPrinters = network.EnumPrinterConnections

for i = 0 to networkPrinters.count - 1 step 2
   portNumber = networkPrinters.item (i)
   printerName = networkPrinters.item (i + 1)
   select case printerName
      case "\\server\printer1"
         network.RemovePrinterConnection "\\server\printer1", true, true
      case "\\server\printer2"
         network.RemovePrinterConnection "\\server\printer2", true, true
   end select
next

Joseph L. Casale wrote:
> I need to drop all but a few printers, then add my own new ones.
> 
> Anyone know how to enumerate all the installed printers, and then I
> could loop those except the few I want to go through the
> RemovePrinterConnection Method.

-- 

Phil Brutsche
[EMAIL PROTECTED]

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~


***
The information in this e-mail is confidential and intended solely for the 
individual or entity to whom it is addressed.  If you have received this e-mail 
in error please notify the sender by return e-mail delete this e-mail and 
refrain from any disclosure or action based on the information.
***

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to