Humor me... replace the line:
"Mapping Drives..."

with this:

"Mapping Drives for user " + @UserID ?
Sleep 1

Sounds like it is not waiting for KiX to get the network InGroup() info.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.