I've got an idea, but need to check into it. The other more obvious way would be to create the script on the fly, ie a temp.kix file and then run it... not much different than what you have above though.

And just for my own clarification, when the service stops, its killing the kix32.exe processes, which means the script stops, and then you can't restart the process?
_________________________
(... better days ahead)