[windows2000] Re: Script to connect network printer

  • From: "Sorin Srbu" <sorin.srbu@xxxxxxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Tue, 16 Dec 2008 09:03:51 +0100

That's the result of being glued to the monitors eight hours a day, and us
both living in Europe (timezones). Glad I could help. 8-)

-- 
/Sorin

>-----Original Message-----
>From: windows2000-bounce@xxxxxxxxxxxxx
[mailto:windows2000-bounce@xxxxxxxxxxxxx]
>On Behalf Of Patrick
>Sent: Monday, December 15, 2008 4:54 PM
>To: windows2000@xxxxxxxxxxxxx
>Subject: [windows2000] Re: Script to connect network printer
>
>Sorin,
>
>Some how I knew you would respond. I think it is time we start awarding
points for
>assists. It is what I am looking for. Will tell you how my modification goes
>
>Thanks
>
>Patrick
>
>
>________________________________
>
>From: Sorin Srbu <sorin.srbu@xxxxxxxxxxxxx>
>To: windows2000@xxxxxxxxxxxxx
>Sent: Monday, December 15, 2008 3:16:36 PM
>Subject: [windows2000] Re: Script to connect network printer
>
>I use the below vb-script. Assuming you have your computers in OU:s depending
>on location, you can easily tweak the script and link them to each OU. That
>way, whenever you move a computer it'll get the proper printer based on the
>location.
>
>Was this what you wanted?
>
>---
>Set WshNetwork = CreateObject("WScript.Network")
>
>'Adding new printer queues
>'wscript.echo "Adding new printer queues."
>WshNetwork.AddWindowsPrinterConnection "\\computername\CanoniR5055N"
>---
>
>The remove printer queue is
>
>---
>WshNetwork.RemovePrinterConnection "\\computername\CanoniR5055N"
>---
>
>Pls note that there are no fancy error checks whatsoever, it's just a crude
>quick'n'dirty script I got from somebody on this list.
>--
>/Sorin
>
>>-----Original Message-----
>>From: windows2000-bounce@xxxxxxxxxxxxx
>[mailto:windows2000-bounce@xxxxxxxxxxxxx]
>>On Behalf Of Patrick
>>Sent: Monday, December 15, 2008 3:52 PM
>>To: windows2000@xxxxxxxxxxxxx
>>Subject: [windows2000] Script to connect network printer
>>
>>
>>This is just me being lazy. I have done this before, but can not remember
>where I put
>>the script. I am looking for a simple script that checks your location and
>maps a
>>network printer accordingly. So I have 7 printers and based on your location
>(room you
>>log onto a pc), you should get the corresponding printer.
>
>
>

Other related posts: