• Problem setting default printer with logon script

    Home » Forums » AskWoody support » Windows » Windows – other » Problem setting default printer with logon script

    Author
    Topic
    #457888

    I have users that work at two different sites (on the same LAN), who all have roaming profiles. I use group policy (2003 Domain) to deploy the printers at each site to the computers (XP) according to their location. A logon script (vbs) then sets the default printer to be the one closest to the computer the user has logged on to.

    I have set the script to list the installed printers as one of the first tasks and then set the default. This sometime fails, with the list of printers being empty – though all the printers are there, if you look in Printers and Faxes after the script has run. If the script is then run again manually, it works as intended.

    Is there a way to ensure that the user’s printer list has been populated before the script tries to set the default? Does anyone know what process copies the per machine settings to the user?

    Viewing 0 reply threads
    Author
    Replies
    • #1149459

      Seems as though you might have a slight timing issue with some networking component not initializing quickly enough all the time. Can you put a Sleep – fixed delay in the script and adjust the delay until you find something that works consistently?

      Joe

      --Joe

      • #1149848

        Joe,

        Thanks for the response. I could put in a delay, but users are already complaining at how long the logon scripts take to run! I would like to avoid that if I can. If I knew what the process or component was that is missing, I could have a routine to check it and then wait or kick it off.

        The only other thing I can think of is to install a dummy printer to all PCs and check for it before going on to set the default, but it’s not a very elegant solution.

        Cheers,

    Viewing 0 reply threads
    Reply To: Problem setting default printer with logon script

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: