add windows printer connection doesn't work on slow logins RRS feed

  • Question

  • If I run something like this on login with a new profile:

    Set objNetwork = CreateObject("WScript.Network") 
    objNetwork.AddWindowsPrinterConnection "\\server\printer"

    and the login is slow (over a minute?), the printer never appears.  Is there some kind of timeout (smb?) that I can make longer?

    • Edited by JS2010 Monday, April 2, 2018 5:30 PM
    • Moved by Bill_Stewart Wednesday, May 30, 2018 7:26 PM Off-topic
    Monday, April 2, 2018 5:01 PM

All replies

  • Printer connections should be done by Group Policy Preferences and not via a login script.  Login scripts in current Windows are delayed by as much as 5 minutes.  GP assigned printers are not delayed.

    Post you issue in the GP forum.  The script is not the cause or the solution.


    Monday, April 2, 2018 5:10 PM
  • The same thing happens with group policy.

    Monday, April 2, 2018 5:16 PM
  • The same thing happens with group policy.

    Then it is clearly not a scripting issue.  Post in GP forum or contact MS Support form help.

    If you don't use GP printer deployment correctly then it will not work.


    Monday, April 2, 2018 5:19 PM
  • This turned out to be a conflict with Client-Side Rendering introduced in Server 2008, and deleting profiles.  It didn't help that the Print Spooler now listens on a random port.  Maybe not directly related to scripting, but it could interest them.

    • Edited by JS2010 Wednesday, May 30, 2018 7:30 PM
    Wednesday, May 30, 2018 7:30 PM