Edit or add value (REG_DWORD):

HKEY_CURRENT_USER\software\microsoft\windows nt\currentversion\winlogon

value: RunLogonScriptSync

0 = Don't wait for the logon script to complete before loading the desktop.
1 = Wait for the logon script to complete before loading the desktop.

Also add this to:

HKEY_LOCAL_MACHINE\software\microsoft\windows nt\currentversion\winlogon