I've always used a batch file to call Kix so I may not be the best person to help you. I can tell you that what you are doing seems right.

Just to be clear... are you going from 4.50 or 3.50, to 4.6? Without testing, there is no guarantees that your script will be 100% functional between versions 3 and 4. Also, there have been a few issues with 4.6 and many of us have reverted to using 4.53.
_________________________
(... better days ahead)