Christophe's requirement can also be managed entirely in Kix, which may be easier.
 Code:
$aENV = Split('%PATH%', ';')    ; get PATH as array when script loads
;
; now need to alter path
$NPath = 'C:\NewPath'
If AScan($aENV, $NPath) < 0     ; not found - add
  ; either create a new array starting with the NPath value, or
  ; extend the current array and add NPath value to the end
EndIf
$MyPath = Join($aPath, ';')
SETL 'PATH=' + $MyPath
By managing the path as an array, it's easy to determine if an element is present, insert or append an element, or remove an element prior and set the path to invoking any command.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D