Re: Script to add printer

Tech-Archive recommends: Fix windows errors by optimizing your registry



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


.



Relevant Pages

  • Re: Logon Script GPO Not working.
    ... Perhaps the script should be run as a logon script, ... If it runs as a startup script, ... printers to use by all member machines of a particular OU. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Lose Printers Deployed by Group Policy
    ... If there is no data here, there are no connections to be created for the ... Windows Printing Team ... I am deploying the printers via workstation instead of by user. ... correct policy listed under GPO name. ...
    (microsoft.public.win2000.printing)
  • RE: [fw-wiz] Worms, Air Gaps and Responsibility
    ... similar connections (yes some stuff is/can be built in by design but buffer ... >Cisco routers and HP printers. ... I had $20 on a worm that spreads through ...
    (Firewall-Wizards)
  • Re: Lose Printers Deployed by Group Policy
    ... Our Windows Admin believes this is dns related. ... wait about 3 days for the printers to decide they want to show up again. ... If there is no data here, there are no connections to be created for the ... I am deploying the printers via workstation instead of by user. ...
    (microsoft.public.win2000.printing)
  • Re: Computers groups and logon script
    ... install the printers via Computer rather than user. ... 4> Create a GPO for the Upper Computers OU. ... Machine will restart and run startup script - adding ... > printer when the computer logs itself in and before the user. ...
    (microsoft.public.win2000.group_policy)