question

kemudd-4628 avatar image
0 Votes"
kemudd-4628 asked kemudd-4628 answered

Logon Script Hangs Windows 11

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
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Just to confirm, you didn't face this issue before installing the update, is that correct?
Try remove the script and add it again and see if the problem persist?

0 Votes 0 ·

Hi Reza - no, there was no problem before installing the update. The script is through the AD user object and does not run off the PC.

0 Votes 0 ·
kemudd-4628 avatar image
0 Votes"
kemudd-4628 answered

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.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered kemudd-4628 commented

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--

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello!

I honestly thought that this might work, but it doesn't. The script launches right after logon, but nothing runs from the script for about 5 to 10 minutes. Essentially, the script calls for printers the current set of print queues to be removed and then reinstalled. It's run flawlessly until now.

Thanks!

0 Votes 0 ·