[windows2000] Re: Adding printers

  • From: "Sorin Srbu" <sorin.srbu@xxxxxxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Mon, 24 Oct 2005 17:45:43 +0200

windows2000-bounce@xxxxxxxxxxxxx <> scribbled on Monday, October 24,
2005 5:28 PM:

> Could you not try something like?
>
>
> Set WshNetwork = CreateObject("WScript.Network")
>
> WshNetwork.AddWindowsPrinterConnection "\\servername\printersharename"
> WshNetwork.SetDefaultPrinter "\\servername\printersharename"

Cool, It works!!

Now, what if a printer is already installed, wouldn't the
"WshNetwork.AddWindowsPrinterConnection "\\servername\printersharename""
line add Whateverprinter (copy 2), Whateverprinter (copy 3) etc. every
time they log on?

In short, I'm looking for a statement that in kix looks like the
following: "If ADDPRINTERCONNECTION ("\\servername\printersharename") =
0".

I suck at vbs...

TIA.

> -----Original Message-----
> From: windows2000-bounce@xxxxxxxxxxxxx
> [mailto:windows2000-bounce@xxxxxxxxxxxxx] On Behalf Of Sorin Srbu
> Sent: 24 October 2005 15:55
> To: windows2000@xxxxxxxxxxxxx
> Subject: [windows2000] Re: Adding printers
>
> windows2000-bounce@xxxxxxxxxxxxx <> scribbled on Monday, October 24,
> 2005 4:49 PM:
>
>> You could use Windows scripting language or Vbscripting.
>
> Yes, but those options also include some serious inf-file digging.
>
>> -----Original Message-----
>> From: windows2000-bounce@xxxxxxxxxxxxx
>> [mailto:windows2000-bounce@xxxxxxxxxxxxx] On Behalf Of Sorin Srbu
Sent: 24
>> October 2005 15:37 To: windows2000@xxxxxxxxxxxxx
>> Subject: [windows2000] Re: Adding printers
>>
>> windows2000-bounce@xxxxxxxxxxxxx <> scribbled on Monday, October 24,
2005
>> 4:17 PM:
>>
>> Already been there. Requires inf-file digging. 8-)
>>
>> I'm experimenting with Kixtart. So far so good...
>>
>>> Try this link mate
>>> http://support.microsoft.com/default.aspx?scid=kb;en-us;189105
>>>
>>> -----Original Message-----
>>> From: windows2000-bounce@xxxxxxxxxxxxx
>>> [mailto:windows2000-bounce@xxxxxxxxxxxxx] On Behalf Of Sorin Srbu
Sent: 24
>>> October 2005 14:49 To: Windows2000 Mailing List Windows2000 Mailing
List
>>> Subject: [windows2000] Adding printers
>>>
>>> Hi all,
>>>
>>> If I were to add printers using policies over a login or startup
script,
>>> what would the easiest way be?
>>>
>>> I was under impression that it was possible to add printers on a CLI
>>> with something like "net add \\server\printername", but can't find
any
>>
>>> documentation on this. Maybe I was imagining...
>>>
>>> I did however find vbs scripts and so on, but all seem to require
some
>>
>>> serious digging in finding the exactly correct printer and inf
>>> driver-file name... I'm trying to go around this part, we have
several
>>
>>> printers, all of a different model...
>>>
>>> Any hints and pointers are appreciated?
>>>
>>>
>>>
>>> BW,
>>>
>>> Sorin
>>>
>>> # Sorin Srbu, Systems Engineer      Web: http://pharm.orgfarm.uu.se/pc/
>>> # Dept of Medicinal Chemistry,      Phone: +46 (0)18-4714482 >3
>> signals>
>> GSM
>>> # Div of Org Pharm Chem,    Mobile Phone: +46 (0)701-718023
>>> # Box 574, Uppsala University,      Fax: +46 (0)18-4714474
>>> # SE-751 23 Uppsala, Sweden Visit: BMC, Husargatan 3, D5:512b #
>>> # Public PGP key available on request.
>>> #
>>> # ()  ASCII ribbon campaign - Against html E-mail # /\ # # Harmless
>>> tagline follows: # # BOFH excuse follows: We're upgrading /dev/null
>>>
>>>
>>> *****************************
>>> New Site from The Kenzig Group!
>>> Windows Vista Links, list options
>>> and info are available at:
>>> http://www.VistaPop.com
>>> *****************************
>>> To Unsubscribe, set digest or vacation mode or view archives use the
>>> below link.
>>>
>>> http://thethin.net/win2000list.cfm
>>> *****************************
>>> New Site from The Kenzig Group!
>>> Windows Vista Links, list options
>>> and info are available at:
>>> http://www.VistaPop.com
>>> *****************************
>>> To Unsubscribe, set digest or vacation mode or view archives use the
>>> below link.
>>>
>>> http://thethin.net/win2000list.cfm
>>
>>
>> *****************************
>> New Site from The Kenzig Group!
>> Windows Vista Links, list options
>> and info are available at:
>> http://www.VistaPop.com
>> *****************************
>> To Unsubscribe, set digest or vacation mode or view archives use the
below
>> link.
>>
>> http://thethin.net/win2000list.cfm
>> *****************************
>> New Site from The Kenzig Group!
>> Windows Vista Links, list options
>> and info are available at:
>> http://www.VistaPop.com
>> *****************************
>> To Unsubscribe, set digest or vacation mode or view archives use the
below
>> link.
>>
>> http://thethin.net/win2000list.cfm
>
>
> *****************************
> New Site from The Kenzig Group!
> Windows Vista Links, list options
> and info are available at:
> http://www.VistaPop.com
> *****************************
> To Unsubscribe, set digest or vacation
> mode or view archives use the below link.
>
> http://thethin.net/win2000list.cfm
> *****************************
> New Site from The Kenzig Group!
> Windows Vista Links, list options
> and info are available at:
> http://www.VistaPop.com
> *****************************
> To Unsubscribe, set digest or vacation
> mode or view archives use the below link.
>
> http://thethin.net/win2000list.cfm


*****************************
New Site from The Kenzig Group!
Windows Vista Links, list options 
and info are available at:
http://www.VistaPop.com
***************************** 
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: