connecting to printers at PC startup



Hi,
I want to use a group policy to have PCs automatically connecting to
specified printer(s) when the PCs start up. This is what I did:
1. create an OU and move the targeted PC(s) into it;
2. cretae a group policy object and link it to the OU just created. In the
GPO, in computer node -> windows -> script -> startup, add a vbs script like
this:

set objNet = CreateObject("Wscript.Network")
PrinterShare="\\server\sharedprinter"
objNet.AddWindowsPrinterConnection PrinterShare

3. restart the targeted PC. The startup script gets executed - I am sure of
this because if I make any mistakes in the script a warning message will pop
up. However, the printer does not get connected even if the script executed
successfully. What's wrong?

4. If I move a user in to that OU and move the script from computer node's
startup script to user node's logon script. Then logon as that user, the
printer gets connected. However, this is not exactly what I wanted. My
purpose is to connect printers according to PC rather than user. How can I
do that?

Thanks in advance,





.



Relevant Pages

  • Re: connecting to printers at PC startup
    ... I want to use a group policy to have PCs automatically connecting to specified printerwhen the PCs start up. ... The startup script gets executed - I am sure of this because if I make any mistakes in the script a warning message will pop up. ... You can't do it in a startup script as you have found out - the reason for that is that connecting to a shared printer is done on a 'per user' basis (try it: log in as a user, ...
    (microsoft.public.windows.server.active_directory)
  • Re: connecting to printers at PC startup
    ... I want to use a group policy to have PCs automatically connecting to ... The startup script gets executed - I am sure ... node's startup script to user node's logon script. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Logon Scripts Acrossed VPN
    ... What does GPMC GPREsults show under the Group Policy Infrastructure Component Status for one of those machines? ... I think this error is related to computer processing rather than your logon script issue but still probably worth figuring out if there is a problem. ... Darren Mar-Elia ... > This same error seems to be on every system in my remote offices. ...
    (microsoft.public.windows.group_policy)
  • Re: Group Policy Timeout on one server in an OU.
    ... Deny Apply for the GPO that defines the login script ... On Error GoTo 0 ... Group Policy Management solutions athttp://www.sdmsoftware.com ...
    (microsoft.public.windows.group_policy)
  • Re: Local Policy Logoff/Shutdown scripts
    ... Now, I know you set the logoff/shutdown script thru the local group policy, ... Microsoft CSS Online Newsgroup Support ... | Thread-Topic: Local Policy Logoff/Shutdown scripts ...
    (microsoft.public.windows.server.sbs)