...you also need to Close() the file before you run it, or it won't have been written to disk.

All the commands in the batch file can be emulated in KiXtart - any reason you are doing it this way?