[windows2000] Re: Script to connect network printer

  • From: "Sorin Srbu" <sorin.srbu@xxxxxxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Wed, 17 Dec 2008 15:44:52 +0100

What are you missing? Didn't quite get that.

-- 
/Sorin

>-----Original Message-----
>From: windows2000-bounce@xxxxxxxxxxxxx
[mailto:windows2000-bounce@xxxxxxxxxxxxx]
>On Behalf Of Patrick
>Sent: Wednesday, December 17, 2008 1:11 PM
>To: windows2000@xxxxxxxxxxxxx
>Subject: [windows2000] Re: Script to connect network printer
>
>OK, I worked out a way to achieve what I want with out checking ou
membership. I
>decided to apply the policy on the Compuer Config \Admin\ System\ Logon\ Run
These
>Program at user logon. And this seems to work, except I am missing something.
And
>because I think this uses a system account to run the script, there might not
be issues
>with inadequate permissions, but again I might be wrong.
>
>
>Thanks
>
>Patrick Allanah
>
>
>________________________________
>
>From: Sorin Srbu <sorin.srbu@xxxxxxxxxxxxx>
>To: windows2000@xxxxxxxxxxxxx
>Sent: Wednesday, December 17, 2008 11:56:54 AM
>Subject: [windows2000] Re: Script to connect network printer
>
>If there are only seven printers, just set the group perm's on the printer
>share. It will for sure minimize any problems in the scripts themselves, at
>least it did for me.
>
>When it comes to scripting with vb I stand on the shoulders of others. Google
>is your friend 8-), just make sure to use google.com/Mi
<http://google.com/Microsoft>
>crosoft. Using that,
>will get you more MS-centric hits.
>
>--
>/Sorin
>
>
>>-----Original Message-----
>>From: windows2000-bounce@xxxxxxxxxxxxx
>[mailto:windows2000-bounce@xxxxxxxxxxxxx]
>>On Behalf Of Patrick
>>Sent: Wednesday, December 17, 2008 12:41 PM
>>To: windows2000@xxxxxxxxxxxxx
>>Subject: [windows2000] Re: Script to connect network printer
>>
>>Hi Sorin,
>>
>>I have got the script to connect network printers. Stage 1 done, now I would
>like to
>>modify the script to check for OU membership before connecting the printers.
>I am
>>hing to do this for 7 different printers in 7 different room. Like you said
I
>tried running
>>this script as a startup script and it would not work so I am sticking to
>logon script.
>>
>>
>>Thanks
>>
>>Patrick
>>
>>
>>________________________________
>>
>>From: Sorin Srbu <sorin.srbu@xxxxxxxxxxxxx>
>>To: windows2000@xxxxxxxxxxxxx
>>Sent: Tuesday, December 16, 2008 8:15:10 AM
>>Subject: [windows2000] Re: Script to connect network printer
>>
>>Come to think of it, I assume you share the printers on a printer server,
>>right?
>>
>>Wouldn't it be the easiest to add print permissions on the security tabs on
>>the queues themselves, assuming you have the users in particular OU:s,
>>depending on location at your site?
>>
>>OTOH, this might not be trivial if you have hundreds of printers...
>>
>>--
>>/Sorin
>>
>>
>>>-----Original Message-----
>>>From: Sorin Srbu [mailto:sorin.srbu@xxxxxxxxxxxxx]
>>>Sent: Tuesday, December 16, 2008 9:12 AM
>>>To: 'windows2000@xxxxxxxxxxxxx'
>>>Subject: RE: [windows2000] Re: Script to connect network printer
>>>
>>>You mean programmatically in the vb-script?
>>>
>>>That's the point where I'm over my head, as it were. Maybe the vbs-gurus on
>>>this list can give us both a couple of hints on this matter? 8-)
>>>
>>>--
>>>/Sorin
>>>
>>>
>>>>-----Original Message-----
>>>>From: windows2000-bounce@xxxxxxxxxxxxx
>>>[mailto:windows2000-bounce@xxxxxxxxxxxxx]
>>>>On Behalf Of Patrick
>>>>Sent: Monday, December 15, 2008 5:07 PM
>>>>To: windows2000@xxxxxxxxxxxxx
>>>>Subject: [windows2000] Re: Script to connect network printer
>>>>
>>>>ok, let me make it a bit more interesting. Is there a way to set
>permissions
>>>so that only
>>>>certain pc (those in the different rooms), are allowed to pront to thier
>>>respective
>>>>printers?
>>>>
>>>>
>>>>
>>>>________________________________
>>>>
>>>>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: