OK..

Think we have it..

Ladies and Gentlemen, here it is!

This is no to say that it cannot be improved upon. [Razz]

code:
 CLS
BREAK ON
DIM $max ; vs 3.10
$tmp=ExpandEnvironmentVars('%tmp%\')
$srcdir=@CURDIR+'\'
$destdir=Substr('%WINDIR%',1,3)+'Scripts\'
$msg=JOIN(split(@KIX,'.'),'')
IF Exist($destdir)=0
MD $destdir
ENDIF
IF Len($destdir)=0
$destdir=@lanroot
ENDIF
IF @inwin=1
$max='2'
ELSE
$max='5'
ENDIF
REDIM $kixfl[$max+1]
$kixfl[0]='kix'+$msg+'.ok'
$kixfl[1]='kix32.exe'
$kixfl[2]='wkix32.exe'
$kixfl[3]='kx16.dll'
$kixfl[4]='kx32.dll'
$kixfl[5]='kx95.dll'
$firstinst='yes'
IF Exist($destdir+$kixfl[0])
$firstinst='no'
ELSE
DEL $destdir+'kix*.ok'
ENDIF
$dfl=$destdir+$kixfl[0]
IF SUBSTR($kixfl[0],4,3) = LEFT(JOIN(split(GETFILEVERSION('KIX32.EXE'),', '),''),3)
EXIT(0)
ELSE
$rc=WriteProfileString($dfl,'KiX','KiX release',@PRODUCTTYPE+' -> kix '+@KIX)
WHILE $i <= $max
$srcfl=$srcdir+$kixfl[$i]
$destfil=$destdir+$kixfl[$i]
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,'filedescription') <> GetFileVersion($destfil,'filedescription') OR
GetFileVersion($srcfl,'fileversion') <> GetFileVersion($destfil,'fileversion') OR
GetFileVersion($srcfl,'internalname') <> GetFileVersion($destfil,'internalname') OR
GetFileVersion($srcfl,'language') <> GetFileVersion($destfil,'language') OR
GetFileVersion($srcfl,'originalfilename') <> GetFileVersion($destfil,'originalfilename') OR
GetFileVersion($srcfl,'productname') <> GetFileVersion($destfil,'productname')
COPY $srcfl $destfil /h
IF @error=0
$upok='yes'
$state='install complete at '
$info=$state+@date+' '+@time+' '+$updinfo
ELSE
$upok='no'
$state='install incomplete at '
$info='update kix'+$message
ENDIF
$updinfo=$updinfo+' +'+$kixfl[$i]
ELSE
$updinfo=$updinfo+' ='+$kixfl[$i]
ENDIF
ENDIF
$i=$i+1
$rc=WriteProfileString($destfil,'KiX','KiX',$info)
LOOP
IF Exist($destdir+'kix'+$msg+'.ok')
EXIT(1)
ELSE
EXIT(2)
ENDIF
ENDIF

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's