I think we need to look at the top section of this script.. It should be an array..

Please note the comments in code.

code:
DIM $a,$kxfl
$tmp=ExpandEnvironmentVars('%tmp%\')
$srcdir=@curdir+'\'
$destdir=Substr('%WINDIR%',1,3)+'Scripts\'
$message=JOIN(split(@kix,'.'),'')

IF 0=Exist($destdir)
MD $destdir
ENDIF

IF @inwin=1
$a='kix32.exe',
'wkix32.exe'
FOR EACH $kixfl IN $a
COPYKIX($kixfl)
NEXT
ELSE
$a='kix32.exe',
'wkix32.exe',
'kx16.dll',
'kx32.dll',
'kx95.dll'
FOR EACH $kixfl IN $a
COPYKIX($kixfl)
NEXT
ENDIF

FUNCTION COPYKIX($file)
$srcfl=$srcdir+$file
$destfil=$destdir+$file
IF Exist($destfil)
$rc=SetFileAttr($destfil,128)<>0
ENDIF
IF Exist($srcfl)
IF GetFileSize($srcfl) <> GetFileSize($destfil) OR
GetFileTime($srcfl) <> GetFileTime($destfil) OR
GetFileVersion($srcfl,'fileversion') <> GetFileVersion($destfil,'fileversion')
COPY $srcfl $destfil /h
ENDIF
ENDIF
ENDFUNCTION

$rc=ADDKEY('HKCU\Software\KiXtart')
IF READVALUE('HKCU\Software\KiXtart','KIXPKG')<>'kix'+$message
$rc=WRITEVALUE('HKCU\Software\KiXtart','KIXPKG','kix'+$message,'REG_SZ')
ELSE
EXIT 1
ENDIF

Thanks,

Kent

[ 02. May 2003, 08:10: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's