sorry but what version of KiXtart do you use ?
I can't get your result with KiXtart 4.60

here is my code for test.kix :
 Code:
exit $a

here is my code for test.cmd :
 Code:
@echo off
 
set scriptdir=%~dp0
set scriptname=%~n0
 
kix32 "%scriptdir%\%scriptname%.kix" $a=0
echo rc=%errorlevel%
 
kix32 "%scriptdir%\%scriptname%.kix" $a=1
echo rc=%errorlevel%
 
kix32 "%scriptdir%\%scriptname%.kix" $a=2
echo rc=%errorlevel%
 
kix32 "%scriptdir%\%scriptname%.kix" $a=3
echo rc=%errorlevel%
 
kix32 "%scriptdir%\%scriptname%.kix" $a=4
echo rc=%errorlevel%


here is the result :
 Code:
rc=0
rc=1
rc=2
rc=3
rc=4
_________________________
Christophe