How to fix Windows 7/8.1/10 login script issues in ActiveDirectory environments

Logon scripts do not run for five minutes after a user logs on to a Windows 8.1/10-based computer

After a user logs on to a Windows 8.1/10-based computer, the logon scripts do not run for five minutes. This behavior causes the following symptoms to occur:

  • Operations that are performed by the logon scripts may not be visible on Windows 8.1/10-based computers until five minutes after the user logs on.
  • Resources that are made available by the logon scripts may not be available to users on Windows 8.1-based computers until about five minutes after users log on.

This behavior occurs because Windows 8.1 includes a new Group Policy setting, “Configure Logon Script Delay,” that controls the behavior of logon scripts. This script is stored in the following location:

Computer Configuration\Administrative Templates\System\Group Policy

The default value setting for the “Configure Logon Script Delay” (DE: Anmeldeskriptverzögerung) policy is Not Configured. However, the default behavior of a Group Policy client is to wait five minutes before it runs logon scripts. The goal of the five-minute delay is to speed up the loading of the user’s desktop on Windows 8.1-based computers.

If you want the logon scripts to run at user logon without any delay, you should configure the setting to Disabled:

Computer Configuration\Administrative Templates\System\Group Policy: Configure Logon Script Delay ==> Disabled

If you want to change the time that the Group Policy client waits until it runs the logon scripts, you can set the time in minutes:

Computer Configuration\Administrative Templates\System\Group Policy: Configure Logon Script Delay ==> Enabled

Then, in the options section, set minute to the desired value. The maximum value that you can enter is 1,000 minutes.

After you set the policy to Enabled and set the time in minutes, the Group Policy client waits for the specified time before it runs logon scripts at user logon. If you enter the time in minutes as zero (0), the setting is disabled, and the Group Policy client runs the logon scripts at user logon without any delay.

When booting I am getting the message: “Could not reconnect all network drives”

Its seems the computer wants to connect before the network is up. It is not a credential issue, but boot order. Is there anyway to make the network come up before the computer wants to map to it. Multiple possible solutions exist out there:

Disconnect network drive before log off/reboot

Disconnect your network drives before you log off/reboot to avoid the error message appearing.

net use Y: \\storage\share/persistent:no
net use Z: \\storage\share /USER:username [password] /persistent:no

Delay your loginscript

You can tell your system to run a simple batch file with a delay of 10 seconds or more (depending on your system boot times) on logon using the scheduler or other techniques. A sample vb-script with a 10 seconds delay:

' Map network drive script - 10000 = 10 seconds
WScript.Sleep(10000)
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "F:" , "\\server\files"
objNetwork.MapNetworkDrive "M:" , "\\server\music"
objNetwork.MapNetworkDrive "P:" , "\\server\Pictures"
objNetwork.MapNetworkDrive "S:" , "\\server\disks"
objNetwork.MapNetworkDrive "V:" , "\\server\videos"

EnableLinkedConnections in Registry

To configure the EnableLinkedConnections registry value, follow these steps:

  1. Locate and then right-click the following registry subkey:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
  2. Point to New , and then click DWORD Value .
  3. Type EnableLinkedConnections , and then press ENTER.
  4. Right-click EnableLinkedConnections , and then click Modify .
  5. In the Value data box, type 1 , and then click OK .
  6. Exit Registry Editor, and then restart the computer.”

Download REG File: EnableLinkedConnections

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.