I use the Associate() UDF when defining the registry keys. Here's the prep code from my script that updates the registry via Associate().

FYI - $BinPath is where the Kix32 exe's are placed; $KIXEDITOR is "notepad.exe", but can be your favorite Kix editor - just so there's no mystery.

The Associate UDF does all the housekeeping needed to create Open and Edit command definitions for a particular file extension. It's posted here on KORG (and part of the KixDev package on my web site). The real point here is to show how I assembled the Open registry value. The problem is that "%" has special meaning, and will be interpreted by Kix32 as an environment value. You should use "%%" instead of "%" so Kix will ignore it. Thats why I used Chr(37) in the example below.

Glenn

 Code:
  ;Define the executables to associate with OPEN and EDIT functions
  ; Modified to pass all args to support V4.53 GetCommandLine()
  ; KiXtart Command Line Scripts - Kix32.exe "%1" %*
  $KXOPEN = $BinPath + '\kix32.exe ' + CHR(34) + Chr(37) + '1' + CHR(34) + ' '  + Chr(37) + '*'
  ; KixForms GUI Scripts
  $KWOPEN = $BinPath + '\Wkix32.exe /I ' + CHR(34) + Chr(37) + '1' + CHR(34) + ' '  + Chr(37) + '*'
  ; Editor for all non-tokenized KiXtart scripts
  $KXEDIT = $KIXEDITOR + ' ' + CHR(34) + Chr(37) + '1' + CHR(34)

  Associate('.KIX', 'KixScript', 'Kixtart Script', $KXOPEN, $KXEDIT, 0)
  Associate('.KX', 'KixTokenizedScript', 'Kixtart Script', $KXOPEN, '', 0)
  Associate('.KXW', 'KixWScript', 'Kixtart GUI Script', $KWOPEN, $KXEDIT, 0)
  Associate('.KW', 'KixTokenizedWScript', 'Kixtart GUI Script', $KWOPEN, '', 0)
_________________________
Actually I am a Rocket Scientist! \:D