Logon Script Hangs Windows 11

kemudd 96 Reputation points
2021-10-27T16:50:20.357+00:00

Hi - so, I recently upgraded one of my PCs to Windows 11 to test in my domain environment. Most everything looks fine except when attempting to install printer drivers from a logon script.

The first attempt installed the printers and it appeared to be normal, but I found that the location and comments information had changed from what should appear to driver information (wsdprint\canoncanon_ir-adv-c5fcbd) and a long string of characters in comments. I read that the October cumulative patch should resolve that, which it did not, but now I'm faced with another issue.

Ever since installing this patch, whenever I logon with my user that has a script associated with the profile it takes ten minutes for it to finally run.

Has anyone else seen something like this or have any suggestions to mitigate?

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,103 questions
{count} votes

Accepted answer
  1. kemudd 96 Reputation points
    2021-10-28T16:18:49.123+00:00

    I was able to resolve this by editing the VB script used to remove the print queue, which included legacy printers.

    The script is written as such:
    On Error Resume Next

    Set ObjNetwork = CreateObject("Wscript.Network")
    objNetwork.RemovePrinterConnection "\printserver*printername*"

    There were 39 objects listed to remove that were legacy, so the time out before the script would skip to the next was causing the delay. Once I removed all the old references, the rest of the process ran in about 90 seconds from start to finish.

    The reason the legacy entries were there was because we recently migrated to a different print server and needed a way to make sure that all users were up to date with the new print queues.


1 additional answer

Sort by: Most helpful
  1. Limitless Technology 39,336 Reputation points
    2021-10-28T07:57:12.417+00:00

    Hello Kemudd,

    This is an old workaround that for some reason seems to work with Windows 11 too.

    Check your GPOs for the setting "Configure Logon Script Delay" in the path "Configuration\Administrative Templates\System\Group Policy" and set to Disabled.

    If in Not Configured, a default 300 seconds delay may be applied due to synchronous/asynchronous load types. Setting Disabled will launch your scripts right away.


    --If the reply is helpful, please Upvote and Accept as answer--