Re: Script to add printer
- From: "Darren Mar-Elia \(MVP\)" <dmanonymous@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 3 Jan 2006 09:01:18 -0800
Kurt-
Most of the problems I've seen are with mapping network connections
per-machine and it usually manifests itself as flaky connections. The
connection will be unavailable or won't persist through logons. I have to
admit that I haven't tested it as much on printers so they may fair better
but I generally just avoid it.
--
Darren Mar-Elia
MS-MVP-Windows Server--Group Policy
Check out http://www.gpoguy.com -- The Windows Group Policy Information Hub:
FAQs, Whitepapers and Utilities for all things Group Policy-related
And, the Windows Group Policy Guide is out from Microsoft Press!!! Check it
out at http://www.microsoft.com/mspress/books/8763.asp
GPOGUY Blog: http://blogs.dirteam.com/blogs/gpoguy
"Kurt" <lorentzenkurt@xxxxxxxxxxxxxxxxxx> wrote in message
news:11rbtscn8rj78f6@xxxxxxxxxxxxxxxxxxxxx
> This was in case your users didn't have the rights to install printers. A
> startup script runs before the user logs on so is not limited by the
> user's lack of rights.
> Darren makes a good argument for loopback scripts if you want to assign
> different printers for the same user when they log onto different
> machines. I would be interested to know what "unreliable" issues Darren
> has had. I have used this to set up printers without problems, but that
> doesn't mean I won't have problems next time. Anyway, this would not
> assign printers based on particular users if that's what you needed. If
> you decide to go with the loopback GPO in a logon script, the users will
> still have to have rights to install a printer I think.
>
> ...kurt
>
> "Jeniffer K" <me@xxxxxx> wrote in message
> news:ef0ykxUDGHA.2036@xxxxxxxxxxxxxxxxxxxxxxx
>> why should startup scripts work better then logon scripts, do I assign
>> the startup script to the users OU or machine OU, does this command allow
>> you to set as default, also I have tried using the rundll32
>> printui.dll,PrintUIEntry command before but was never successful
>>
>> "Kurt" <lorentzenkurt@xxxxxxxxxxxxxxxxxx> wrote in message
>> news:11r7ud31um68v04@xxxxxxxxxxxxxxxxxxxxx
>>> You can assign printers for all users using a startup script (rather
>>> than a logon script) and rundll32.exe, i.e.
>>>
>>> rundll32 printui.dll,PrintUIEntry /q /ga /n \\PrintServer1\Room306
>>>
>>> ...kurt
>>>
>>> "Jeniffer K" <me@xxxxxx> wrote in message
>>> news:%233xlmpCDGHA.2040@xxxxxxxxxxxxxxxxxxxxxxx
>>>> Dear NG, I'm facing the following scenario
>>>>
>>>> I've setup a network in a school that has over 700 students that will
>>>> all use the newly created computer labs, we have about 7-8 labs and 2
>>>> public libraries, one of the things I need to accomplish is to simplify
>>>> the printer creation process, the problem is that the same user will
>>>> move around from lab to lab and of course the public library's we have
>>>> different printers setup all over the place, I was thinking of setting
>>>> up scripts based on the computer so no mater where the user logs on
>>>> they will get the correct printer automatically created for them and
>>>> set as the default, I have created a procedure but its not working
>>>> perhaps one can point me where is off
>>>>
>>>> I've created a ou called pcslab1
>>>> I've moved all the pc's from lab 1 to the above ou
>>>> I've created a vb script called addprnt.vbs (see script below) to add
>>>> the appropriate printer and set as default
>>>> I've created a group policy for the above ou and assigned the
>>>> addprnt.vbs logon script
>>>>
>>>> if I double click the script manually it works fine, also no events
>>>>
>>>> here is the script...
>>>>
>>>> Option Explicit
>>>> Dim objNetwork, strUNCPrinter
>>>> strUNCPrinter = "\\servername\sharename"
>>>> Set objNetwork = CreateObject("WScript.Network")
>>>> objNetwork.AddWindowsPrinterConnection strUNCPrinter
>>>>
>>>> objNetwork.SetDefaultPrinter strUNCPrinter
>>>> WScript.Echo "Check the Printers folder for : " & strUNCPrinter
>>>>
>>>> WScript.Quit
>>>>
>>>> I'd appreciate any help, thanks in advanced
>>>>
>>>
>>>
>>
>>
>
>
.
- Prev by Date: Re: Script to add printer
- Next by Date: Re: Update virus definitions via GPO
- Previous by thread: Re: Script to add printer
- Next by thread: Re: Update virus definitions via GPO
- Index(es):
Relevant Pages
|