I'm having some issues here and i am not sure what is causing them.

I have been using shell() in my startup scripts to run robocopy and copy some files locally.
This works perfectly:
 Code:
shell '\\domain\netlogon\robocopy src dest /b /njh /nfl /ndl /E /sec /R:0 /purge /log:c:\log.txt'


However, If i have a lot of files to copy this can cause a wait while robocopy runs. I would therefore like to use the run() command instead and make robocopy not slow my script down.

 Code:
run '\\domain\netlogon\robocopy src dest /b /njh /nfl /ndl /E /sec /R:0 /purge /log:c:\log.txt'


The problem is that this only seems to work intermittantly.
It always runs without any KIX errors but robocopy doesnt seem to be doing anything sometimes.
Soemtimes the robocopy log is normal, but usually it is just an empty file - and robocopy has not run (the files are not there).

If i manualy run the script with run()'s with a logged on user it then always works.

Am I missing something or does windows do something like terminating all my startup script processes automatically once the end of the main script has been reached?
Is there any way round this? Can anybody suggest an alternative to run()