www.computerperformance.co.uk has really good write ups on adding/deleting
printers and setting the default via the vb script.

 

From: Gene Giannamore [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2008 12:16 PM
To: NT System Admin Issues
Subject: RE: Printer Logon Scripts

 

I wonder if this info would help

http://articles.techrepublic.com.com/5100-10878_11-5030819.html

I have use these for local machine statup scripts

 

 

 

 

 

From: René de Haas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2008 1:52 AM
To: NT System Admin Issues
Subject: RE: Printer Logon Scripts

 

I can set it allright that’s easy enough in vbscript with SetDefaultPrinter,
unfortunately there’s no GetDefaultprinter

 

From: James Rankin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2008 10:13 AM
To: NT System Admin Issues
Subject: Re: Printer Logon Scripts

 

I find it easy enough to set the default printer with a bit of batch

rundll32 printui.dll,PrintUIEntry /y /n"\\PRINTSERVER\PRINTER"

2008/9/16 René de Haas <[EMAIL PROTECTED]>

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/>  ~

 

 

 
  _____  


***
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