I think I found the problem. By default, I copied over KX16, KX32 and KX95.dll. In the manual, it does point out that if KX95.DLL exists without KXRPC.EXE, it might cause performance problems. This is what I am seeing. When our script gets to the point where it queries the network, it just stalls there and KiXtart quits. It is weird because sometimes it works and sometimes it doesn't. On affected machines, I have removed KX95.DLL and the script seems to run fine.

I have tried to run the attached script on Win9x machines and I can't seem to redirect the output to a text file. I will have to find time to modify the code to put it into a text file and get back to you guys.