You've got a long script here... if the problem is at the bottom, what is the last line that functions before the error? You can test this by commenting out a few lines at a time until you no longer get the error....

I also notice you use "command.com" quite a bit in your script. Have you tried using %comspec% instead?

I'm not sure how well KiXtart behaves if redirecting output to a file on a server (UNC PATH). You might be better off redirecting output to a local file then copying that file to the server.

code:
RedirectOutput("%windir%\kix.log",0)
$NETLOGFILE = "\\fhdcchfp1\kixlogs\" + @WKSTA + "\kix.log"
if (exist($NETLOGFILE) = 0)
md "\\fhdcchfp1\kixlogs\@WKSTA"
endif
Copy "%windir%\kix.log" $NETLOGFILE

Brian