maybe the line:
use * /DELETE

If you disconnect from the share that is hosting the script, that can happen. When KiX processes through a logon, all NT class machines use UNC and so don't rely on drive letters.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.