Yeah, I guess, my mind is no longer capable of decyphering this mangled setup. Pretty much every line of code is totally opposite of what I would use and even hardcoding the Z: drive scares me.
I'd use
code:
use h: /delete /persistent
use h: '\\server\'+@USERID+'$$'

in the KiXtart script. But, hey, everybody is free to code as they like.
_________________________
There are two types of vessels, submarines and targets.