I think that this is normally more a policy problem: run logonscriptsync reg_dword = 0 or 1

Determines whether the shell waits for the logon script to complete or not. If the value = 0, the logon script is run during the startup of the shell and allows items in the startupgroup to start. If the value is 1, the logon script completes before the shell or any items in the startup group are created. If this value isset also in the computer section, THE COMPUTER SECTION VALUE TAKES PRECEDENCE.

------------------