Re: Logon Script not playing fair

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I also use .vbs to script printers, here's my text and it seems to work
fine - you sure the GPO security/permissions is corrrect?:

On Error Resume Next

Set objNetwork = Wscript.CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection("\\okstu\lslabpr1")

Set objNetwork = Wscript.CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection("\\okstu\lslabpr3")

Set objNetwork = Wscript.CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection("\\okstu\lslabpool")

Set objNetwork = Wscript.CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection("\\okstu\lsmain")

Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.SetDefaultPrinter("\\okstu\lslabpool")




"UC_Bearcat_99" <UCBearcat99@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:44D15345-0CDA-4AF7-9A93-F974110B2D1C@xxxxxxxxxxxxxxxx
> Did I put this post in the wrong area?
>
> If so, I apologize but I ran gpupdate /force and still cannot get my
> script
> to run.
>
> Is this code correct? Do I need a header or something on this script to
> make it run?
>
> Set WshNetwork = CreateObject("WScript.Network")
> WshNetwork.AddwindowsPrinterConnection "\\printer1\printer1"
> WshNetwork.AddwindowsPrinterConnection "\\printer2\printer2"
>
> I should probably post this on the script board but like I said earlier, I
> copied to a shared folder and can run it from any client and it will add
> the
> printers so I do not know what the hang up here is.
>
> If you need any further information, please let me and I will post it.
>
> Thank you,
> Jim


.



Relevant Pages

  • Re: Error 8007007E WScript.Network Wscript.CreateObject
    ... Dim objNetwork ... Set objNetwork = WScript.CreateObject ... company application, the script runs. ... This problem frequently occurs after you upgrade a service pack. ...
    (microsoft.public.scripting.vbscript)
  • Re: Logon scripts dont run on 64-bit machines?
    ... Copyright 1985-2003 Microsoft Corp. ... Microsoft Windows Script Host Version 5.6 ... Set ObjNetwork = CreateObject ... Dim strDC, strOU, strOU1, strOU2, intIndex, intIdx ...
    (microsoft.public.scripting.wsh)
  • Re: Error 8007007E WScript.Network Wscript.CreateObject
    ... Dim objNetwork ... Set objNetwork = WScript.CreateObject ... company application, the script runs. ... This problem frequently occurs after you upgrade a service pack. ...
    (microsoft.public.scripting.vbscript)
  • Help; beginner in WSH
    ... script so we can add it as a policy. ... as long as the mapped drives are not present. ... Set objNetwork = Wscript.CreateObject ...
    (microsoft.public.scripting.wsh)
  • Help; beginner in WSH
    ... script so we can add it as a policy. ... as long as the mapped drives are not present. ... Set objNetwork = Wscript.CreateObject ...
    (microsoft.public.scripting.wsh)