Sorry, I have not check on this thread in quite a while. MS is still silent on this, I suspect they will provide NO solution and the only real fix is to update or replace the offending server. In my case we have no room on the virtual Host to replace the server and the company will not buy us new equipment to replace it. So we are stuck with a Windows 2003 32 bit server.
I used the script as follows. I put these lines BEFORE the scripts NET USE command to map out the drives. The letter after the 'HKCU\Network' portion of the line is the drive letters being mapped by the following (not shown) NET USE commands.
This still is not a good solution. It does not fix any mappings a user might have set themselves as I have no idea what they are. So the hanging still occurs when those drives are missed. It also will not fix the issue for people outside our corporate site who map drives to our server as I have no idea who the are, what letters they are mapping. Each of our sites uses it's own logon script and will not run ours - which I fixed.
REM Windows 10 update 20.04 introduced a new key and value, it does NOT work on 2003 servers
REM The below commands delete the value and key.
REM Without deletion the script wil take 10 minutes to run and connections will not work
REM Only necessary to run on Windows 2003 mapped drive letters
reg delete HKCU\Network\h /v UseOptions /f
reg delete HKCU\Network\j /v UseOptions /f
reg delete HKCU\Network\n /v UseOptions /f
reg delete HKCU\Network\w /v UseOptions /f
For the hell of it I put the SAME commands at the BOTTOM of the script so that the keys are again deleted AFTER the mapping creates them.
If someone can recommend a way to delete ALL the subkeys that represent the drive letters specified in the HKCU\Network portion of the command. An asterisk (*) does not work as a wild card and marching through ~26 letters of the alphabet does not seem smart.